MATLAB Answers

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

조회 수: 21(최근 30일)
Phillip 2018년 11월 7일
댓글: Ed Smith 2019년 9월 18일
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)
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
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개)




Community Treasure Hunt

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

Start Hunting!

Translated by