How to locate errors reported by the MATLAB compiler

4 Ansichten (letzte 30 Tage)
Matt J Dunn
Matt J Dunn am 16 Aug. 2017
Kommentiert: Jan am 18 Aug. 2017
I'm trying to compile a .mlapp file using the MATLAB Compiler. The app does not produce any errors when I run the uncompiled version, and none of my scripts show any 'impossible to run' red error lines.
However, when I try to compile the .mlapp file (which in turn checks the content of all the subfunctions, of which there are hundreds), I am presented with a rather useless error message that simply states:
File analysis cancelled because the following error occurred:
Cell contents reference from a non-cell array object.
There is no line number or filename specified. Given that there are hundreds of files that this error could reside in, I have no idea where to begin.
Is there some way of obtaining more detail about where the error has been detected? Specifically, a filename and line number...

Antworten (1)

Sean de Wolski
Sean de Wolski am 16 Aug. 2017
Turn on stop on errors:
dbstop if error
Now the debugger should stop when the error occurs. If it does not, try dbstop if caught error.
  2 Kommentare
Matt J Dunn
Matt J Dunn am 18 Aug. 2017
Bearbeitet: Matt J Dunn am 18 Aug. 2017
Thanks for this. Using...
dbstop if error
...returns an error in the 'InspectorFactory' function, which appears to be a MATLAB core function (i.e. it has nothing to do with my code). This isn't helpful either, as there is no traceback suggesting there is anything wrong with my code...
Jan
Jan am 18 Aug. 2017
@Matthew: Please show us, where the error occurs. This is the only information, you have about the problem currently, but the readers in the forum do not know any detail. Instead of claiming, that this information is not useful, examine, what happens. Perhaps the problem is caused by a user-defined function, which shadows a built-in function of Matlab and replies a different output. We cannot guess the reasons, but you can start the investigations.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by