Troubleshooting
Problem
IBM Rhapsody® crashes if the user plugin implemented with the Java API uses multiple threads.
Symptom
IBM Rhapsody® model being loaded with user plugin uses multiple threads.
During plugin execution, IBM Rhapsody® crashed with error "Rhapsody MFC Application".
Cause
IBM Rhapsody® Java API doesn't support multiple threads.
The reasons are:
The reasons are:
- Native library Rhapsody.dll is not designed to be called from multiple threads.
- COM pointer can not be moved from one thread to another.
If your plugin or Java API application is using multiple threads then there's a chance IBM Rhapsody® becomes unstable and even crashes in the middle of plugin execution.
Resolving The Problem
If your application/plugin needs to use multiple threads such as in designing SWT GUI, try not to call Java APIs from a separated thread that directly updates the model unit files like save().
Or, you could explicitly call below API to associate the new thread with another IBM Rhapsody® instance.
IRPApplication rpyApp = RhapsodyAppServer.getActiveRhapsodyApplication();
This is a product limitation, so you need to carefully validate your plugin/application behavior if using multiple threads.
[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.6;7.6.0.1;7.6.1;7.6.1.1;7.6.1.2;7.6.1.3;7.6.1.4;7.6.1.5;8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5;8.0.6;8.1;8.1.1;8.1.2;8.1.2.1;8.1.3","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21962337