Has anyone solved this issue in 2018b? - Undefined function or variable 'fallbackType'
6 views (last 30 days)
Show older comments
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 Comment
RR
on 10 Nov 2018
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
Accepted Answer
Guy Rouleau
on 23 Jul 2019
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 Comment
Ed Smith
on 18 Sep 2019
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"
More Answers (0)
See Also
Categories
Find more on Simulink Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!