Deployed Java package: MWMCROption.OUTPROC causes forrtl error (200) program aborting due to window-close event
Show older comments
I used Compiler SDK to package an m-file function as a Java package, which encompasses a class and a method. The external developer reported the following error message when shutting down Tomcat:
forrtl: error (200): program aborting due to window-CLOSE event
The message shows after shutting down Tomcat, appearing on the Tomcat console immediately before it closes. Oddly, it isn't written to the Tomcat logs. To the developer, it suggests that something isn’t getting closed properly.
The only thing found online is this unanswered question: https://www.mathworks.com/matlabcentral/answers/364024
In our case, however, the crash dump shows different DLLs from the question cited above:
libifcoremd.dll
KERNELBASE.dll
KERNEL32.DLL
ntdll.dll
After several repetitions of this, the developer was able to capture a picture of the crash dump on a smartphone:

We note that this error only occurs when the Java invoker uses "MWApplication.initialize(MWMCROption.OUTPROC)". Under multithreading, when the deployed class is instantiated within each thread, this causes the associated MCRs to run as independent processes in order to avoid conflicts.
When specifying "MWMCROption.OUTPROC", what else is needed to properly clean up and enable a proper shutdown?
Accepted Answer
More Answers (0)
Categories
Find more on Java Package Integration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!