Misleading malformed error when switching frequently between features and message views
Problem
When switching frequently between message views of operations in different features of a concern, TouchCORE eventually reaches a point where a feature fails to open, and an error message is displayed saying that the design model attached to this feature is malformed and can’t be opened. Closing and relaunching TouchCORE in these cases always allows the design model to be opened correctly (the model is not actually malformed). In addition, when the error is displayed, the TouchCORE back button (upper left <
) disappears.
Steps to reproduce
- This error is difficult to reproduce on command, but using TouchCORE for a while and frequently switching between features and message views within those features produces this error eventually.
Actual result
GUI error:
The design model ca.mcgill.sel.ram.impl.AspectImpl@3fce9890 (name: Push Automatic OneSubject) is malformed and could not be loaded. Please see log for details.
Console Error:
888526 [AWT-EventQueue-0] INFO .mt4j.sceneManagement.AbstractScene - Destroyed scene: ca.mcgill.sel.ram.impl.AspectImpl@1f0663bf
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
at java.lang.String.substring(Unknown Source)
at ca.mcgill.sel.commons.emf.util.EMFEditUtil.stripTypeName(EMFEditUtil.java:271)
at ca.mcgill.sel.commons.emf.util.EMFEditUtil.getPropertyText(EMFEditUtil.java:160)
at ca.mcgill.sel.ram.ui.views.TextView.getModelText(TextView.java:128)
at ca.mcgill.sel.ram.ui.views.TextView.updateText(TextView.java:327)
at ca.mcgill.sel.ram.ui.views.TextView.setData(TextView.java:284)
at ca.mcgill.sel.ram.ui.views.TextView.<init>(TextView.java:76)
at ca.mcgill.sel.ram.ui.views.TextView.<init>(TextView.java:55)
at ca.mcgill.sel.ram.ui.views.structural.ParameterMappingView.<init>(ParameterMappingView.java:92)
at ca.mcgill.sel.ram.ui.views.structural.OperationMappingContainerView.addParameterMappingView(OperationMappingContainerView.java:84)
at ca.mcgill.sel.ram.ui.views.structural.OperationMappingContainerView.addAllParameterMappings(OperationMappingContainerView.java:74)
at ca.mcgill.sel.ram.ui.views.structural.OperationMappingContainerView.<init>(OperationMappingContainerView.java:64)
at ca.mcgill.sel.ram.ui.views.structural.ClassifierMappingContainerView.addOperationMappingContainerView(ClassifierMappingContainerView.java:124)
at ca.mcgill.sel.ram.ui.views.structural.ClassifierMappingContainerView.addAllOperationMappings(ClassifierMappingContainerView.java:102)
at ca.mcgill.sel.ram.ui.views.structural.ClassifierMappingContainerView.<init>(ClassifierMappingContainerView.java:76)
at ca.mcgill.sel.ram.ui.views.structural.CompositionView.addMappingContainerView(CompositionView.java:153)
at ca.mcgill.sel.ram.ui.views.structural.CompositionView.addAllMappings(CompositionView.java:138)
at ca.mcgill.sel.ram.ui.views.structural.CompositionView.<init>(CompositionView.java:117)
at ca.mcgill.sel.ram.ui.views.structural.CompositionContainerView.createCompositionView(CompositionContainerView.java:234)
at ca.mcgill.sel.ram.ui.views.structural.CompositionContainerView.addAllModelReuseViews(CompositionContainerView.java:209)
at ca.mcgill.sel.ram.ui.views.structural.CompositionContainerView.<init>(CompositionContainerView.java:112)
at ca.mcgill.sel.ram.ui.scenes.DisplayAspectScene.<init>(DisplayAspectScene.java:154)
at ca.mcgill.sel.ram.ui.RamApp.getExistingOrCreateModelScene(RamApp.java:493)
at ca.mcgill.sel.ram.ui.RamApp$4.run(RamApp.java:599)
at org.mt4j.AbstractMTApplication.runApplication(AbstractMTApplication.java:360)
at org.mt4j.AbstractMTApplication.draw(AbstractMTApplication.java:272)
at processing.core.PApplet.handleDraw(PApplet.java:2386)
at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)
at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)
at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Expected result
This error shouldn’t occur.
Environment & Version
Windows 10 Home 1909
TouchCORE version:
- core: branch master, commit c298ba3dfc3d3870bd60ca587c03c10d4e94a7e3
- touchram: branch master, commit 60e62389fa4cbf729287b10ce07cb5c02a0e1772