Deployed Java package: MWMCROption.OUTPROC causes forrtl error (200) program aborting due to window-close event
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Java Package Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!