Community
Participate
Working Groups
Created attachment 231990 [details] Crash message screenshot This error has happened a couple of times before quite recently. This is a stability issue. 1) I closed all diagrams in a model and saved it. 2) I shutdown Eclipse/Papyrus. 3) I lauched the workspace again = Crash. Attached is the pop-up crash message and the error log. Importing the project containing the model for which I closed all diagrams into a new workspace and it all works fine. Making a diff between the original and imported project and all its files shows that they are exactly the same. This tells me that there is something wrong in the .metadata folder. Trying to open the original workspace and it crashes every time, and there is a LOT of projects in that ws, but I worked on only one of them. I am pretty sure that closing all diagrams was exactly what I did when I got this crash the last time, while working on the same model. (the one attached to Bug 409573, but the original one) I have saved this workspace to that you can ask questions about it after studying the error log and ask for additional files to attach to this report. Having to re-create the ws yet another time feels quite annoying. I liked to "repair" the ws myself but I have no idea what to look for.
Created attachment 231991 [details] The error log.
Hi Toni, It seems that this problem comes from a problem during Eclipse plartform shutdown. I found many logs similar on the web from Eclipse users. One solution was the following: - close all running processes concerning Eclipse - remove the following file : YOUR_WORKSPACE/.metadata/.plugins/org.eclipse.core.resources/.snap - restart Eclipse Could you try on your crashed workspace?
Created attachment 232017 [details] Screenshot of startup problems after deleting the .snap file Hi Remi. Deleting the .snap file feels a bit like taking an aspirin instead of going to the choripractor. (= it appears to solve the problem short term) The attached screenshot appeared after deleting the .snap file and then re-launching the workspace, where the details shows a number of java.lang.NullPointerException messages. No like/time investigating what they mean. I have prepared a stripped ws to send for testing shortly. /Toni
Created attachment 232088 [details] Workspace crashing during launch. Here is a copy of the workspace I was working on. I have used a "parallel" workspace do delete all contents in the projects of this workspace (from the side, so to speak), except for the project TEST_PuschActivator_5_dragAndDropActivity, in which I instead replaced the content with the content from the project attached to Bug 409573. When unzipping this ws it will crash during launch. Launching the ws agan and it will open OK. My original ws however crashes every time, simply refuring to be opened.
Created attachment 232089 [details] Same workspace, but which opens OK. ...simply refusing to be opened. (from previous comment) This is the same workspace after it has been opened twice, and opened OK the second time. You can use this one to make diff's, if you need. I googled a bit on .snap files and they appear to be crash recovery files, so something made my Eclipse crash, at least made it believe that it did. The only thing I did, and also the last time, was to work on the problematic Papyrus model, close all diagrams in the model and then shut down Papyrus. I have also seen some google info that crashes can be caused by stack overflow, and I will soon submit another bug related to memory leaks in Papyrus. Perhaps the crash-type-problem get solved when solving those memory leaks.
The SysML IBD (And maybe others) initializes preferences in its Activator#start. At some point, this initialization tries to access the current Display, which may not yet be initialized. In this case, the initialization of the JFace class PreferenceConverter fails (Because it tries to access the default display statically, during the class loading), resulting in all these "NoClassDefFoundError". Preferences should not be initialized in the Activator.
Actually, the error comes from JFace, as described in Bug 342711
Is this bug still a problem? From what I can tell of the discussion on bug 342711 (in particular, bug 342711 comment 11), Papyrus has already worked around the JFace bug that causes the current (Papyrus) bug.
> Is this bug still a problem? From what I can tell of the discussion on bug 342711 (in particular, bug 342711 comment 11), Papyrus has already worked around the JFace bug that causes the current (Papyrus) bug. The bug has been worked around in the "Infra" preference pages, but basically, any class referencing the PreferenceConverter outside the UI Thread can cause this issue. The bug is difficult to reproduce, but I think one of the triggers was the Properties View loader, which is now executed from a background job, in the Properties View Activator. Loading the properties view configuration can lead to activating some plug-ins (contributing to the properties view, and their dependencies). So, we ended up with Activators being started in a Worker thread. If this Activator initializes its preferences (and "touches" PreferenceConverter), then potentially we have an InvalidThreadAccess. The bug can be locally worked around, but I'm pretty sure there is no long term solution (Other than deprecating PreferenceConverter#FONTDATA_DEFAULT_DEFAULT and removing the static initialization in this class). So, only JFace can properly fix this bug. Since the PreferenceConverter static initialization can only be done once, if any plug-in loads it from the UI Thread *before* we try to access it from a worker thread, the bug can't be reproduced. So... It's hard to tell whether we're safe now or not. Finally, the fact that we removed most of the Preference Pages in diagrams suggests that we probably don't have any remaining reference to PreferenceConverter in the static initialization. But it's hard to be certain.
I close this old issue.