Compiled MATLAB application returning FF error code?
2 次查看(过去 30 天)
显示 更早的评论
Hi! I have a compiled MATLAB ap being run by a DOS batch file, which in turn is being run by the Windows Task Scheduler; all this works splendidly when I'm the one who has scheduled the tasks, i.e., the tasks have been scheduled by me as the logged in user. Unfortunately, the security policy where I work dictates that, long-term, my account can't be the one scheduling the jobs, so a dedicated "pseudo-user" account, "matlab," was created. Now our IT Dept. is trying to debug why "matlab" can't run the ap. Long story short, the Scheduler's log for the latest attempt ends with: "Result: The task completed with an exit code of (ff)." Very helpful. :-( We googled "exit code of (ff)" and a respondent to the number one result (a thread) claims "The exit code is determined by the application you run, not by the Task Scheduler." Assuming this is correct, either my ap or my batch file is "determining" the ff, and I'd like to rule out the ap, if possible. So, what might make a compiled matlab ap either return a code of ff, or provoke DOS to do so?
1 个评论
Kaustubha Govind
2011-3-9
Have you tried using the mcc -R -logfile option to compile your application, so that the program output is logged. This should help you determine if the compiled application is erroring out.
回答(1 个)
Walter Roberson
2011-3-9
All I have been able to find so far is "Returned values from standalone applications will be 0 for successful completion or a nonzero value otherwise." That was in a somewhat unlikely place to look.
I was also able to find that for Windows 32 bit executables, ff (255) is an error code that has to do with extended attributes of a file. It is unlikely that that is your difficulty.
On DOS executables, ff (255) is the maximum error code, and indicates that the exit code that the program returned was not one of the recognized ones (e.g., was negative.)
On Unix, an exit code of 255 is the maximum that can be generated as the code is only 8 bits long, so anything the program tried to return would be taken mod 256. A program that tried to return -1 would end up returning 255 in Unix. (There is one other hypothetical case that is unlikely to ever be approved in practice.)
So, with the information we have, we cannot rule out the possibility that the standalone application generated an error and that 255 became the error code.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!