Has anyone solved this issue in 2018b? - Undefined function or variable 'fallbackType'

8 次查看(过去 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
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
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
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 CenterFile Exchange 中查找有关 Configure and View Diagnostics 的更多信息

产品


版本

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by