Has anyone solved this issue in 2018b? - Undefined function or variable 'fallbackType'
17 ビュー (過去 30 日間)
古いコメントを表示
The error message is this:
Error using autobuild_kernel>autobuild_local (line 197)
Undefined function or variable 'fallbackType'.
Error in autobuild_kernel (line 50)
status = autobuild_local(machineId,targetName,rebuildAllFlag,buildType,chartId,chartHandle);
Error in autobuild_driver (line 118)
status = autobuild_kernel(machineId,'sfun','build','no','no');
Error in slsf (line 128)
autobuild_driver('simbuild',machModelH,'sfun');
I've only seen this error in MATLAB and Simulink 2018b. Anytime I make changes to an embedded MATLAB function called by my Simulink model, the model will fail to run if I have any breakpoints active. I have to delete all of my breakpoints, run the model once, then I can run it again with breakpoints. It's really frustrating to have to do this every time I make a change to my code while debugging. Has anyone encountered this error and knows how to solve it?
1 件のコメント
RR
2018 年 11 月 10 日
I am having the same problem. I also noticed that even if I run without breakpoints (to avoid the 'fallbackType' error), and then place a breakpoint for debugging, any persistent variables appear to be full of garbage (i.e. numbers like NaN 2.12199579047121e-314 1.18575755001899e-322). They look this way with the data tips, and also if evaluated at the command window while debugging, but if left without the semicolon for display, they show up with normal values in the Simulink Diagnostic Viewer.
Here is an example of what it takes to see this:
function buggy(b)
persistent a
if isempty(a)
%set breakpoint somewhere in here
a = 1;%a looks like garbage in the debugger, before and after this line
a %a displays in the Simulink Diagnostic Viewer as a = 1
end
a = b;%a appears not to take on the value of b in the debugger
a %a displays with the value of b in the Diagnostic Viewer
採用された回答
Guy Rouleau
2019 年 7 月 23 日
This is a bug in MATLAB R2018b. To work around, enable the option "allow setting breakpoints during simulation" from the Simulation Target section of the model configuration.
1 件のコメント
Ed Smith
2019 年 9 月 18 日
Thank you, this has been great! It can be hidden under "..." which reveals the Advanced Parameters and then you can see "Allow setting breakpoints during simulation"
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!