Simulink crashing after running s-function builder
Show older comments
Hi everyone,
I have been doing some research on s-function builder and would like to know if it is normal for matlab to continuously crash when I implement something 'out of the ordinary'.
For example, if I include the stdio.h library and try to modify a .txt file using fopen, when I run the block matlab crashes and simulink corrupts some of its .h files (namely bits/libc-header-start.h which is in call with the stdio.h library and simstruc.h and simstruc_compond.h which are in the includes repository).
This happens also with other codes even more basic than the fopen one.
Not being able to restore these files, since the system tells me that they have not been modified I find myself in the situation of having to reinstall matlab every time this happens (8 times every morning) to get the operation back to correct.
Is it because s-function builder is only prepared to work with the math.h library although other libraries can be included?
Thanks for your help.
3 Comments
Ritu
on 11 Oct 2023
SIMULINK crashes for me as well. Could you get the solution for this.
Faissal Bentla
on 27 May 2024
We are experiencing a very similar issue at the moment, which is blocking our development.
We are using the S-Function builder and included the iostream/stdio.h for debugging purpose. Since then we observe a crash every time we run the model and others. Removing the iostream/stdio.h part did not resolve the crash.
The (shortend) bug report given by Matlab sometimes upon crashing is attached.
Help on this topic would be greatly apreciated!
Thanks in advance.
Pramil
on 10 Sep 2024
I tried doing something similar, it worked for me. I will attach my model, just build the S-function builder block and the value.txt gets updated just fine.
Answers (0)
Categories
Find more on Block and Blockset Authoring in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!