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

9 visualizzazioni (ultimi 30 giorni)
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 Commento
RR
RR il 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

Accedi per commentare.

Risposta accettata

Guy Rouleau
Guy Rouleau il 23 Lug 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 Commento
Ed Smith
Ed Smith il 18 Set 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"

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Configure and View Diagnostics in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by