Community
Participate
Working Groups
Created attachment 261928 [details] Crash log Steps to reproduce: 1. Download, unzip and execute https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/2/eclipse-java-mars-2-win32-x86_64.zip 2. Open the preference page "File Associations" and select any file type. 3. Press the lower "Add..." button to open the editor selection dialog. 4. Select the "External programs" radio button and pick any program. 5. Sometimes the JVM crashes immediately, sometimes when closing the editor selection dialog with OK, sometimes a little bit later, when closing the preference page with OK.
Created attachment 261929 [details] Neon RC1 crash log The same problem occurs with Neon RC1: https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/RC1/eclipse-committers-neon-RC1-win32-x86_64.zip
Created attachment 261930 [details] Mars.2 crash log (startup) One of my Mars.2 IDEs now crashes during startup. Seems I must delete it.
This bug seems duplicate of bug 157010. *** This bug has been marked as a duplicate of bug 157010 ***
Eike, what would happen if you comment out code which loads images for external programs, for example in org.eclipse.ui.internal.misc.ExternalProgramImageDescriptor.getImageData? I suspect that crashes could be caused by loading broken or unusual images on your system.
I have no idea how to comment out code in a downloaded executable.
(In reply to Eike Stepper from comment #5) > I have no idea how to comment out code in a downloaded executable. I meant of course that you run Eclipse from debugger, with related UI code commented out. Since this issue is most likely not reproducible and very specific to your environment, it would be great if you could try to debug it and to find possible root cause. If you never had UI projects in your workspace, you can import them (with source) from yor current Eclipse or even let Eclipse import plugin wizard import them from Git.
(In reply to Andrey Loskutov from comment #6) > Since this issue is most likely not reproducible and very > specific to your environment, So, is this just a suspicion, or has a Platform committer already tried it out in the past ten years?
(In reply to Eike Stepper from comment #7) > (In reply to Andrey Loskutov from comment #6) > > Since this issue is most likely not reproducible and very > > specific to your environment, > > So, is this just a suspicion, or has a Platform committer already tried it > out in the past ten years? I've recently did some work on that dialog and had a pleasure to debug/test exact the described use case with external editors a lot, with not a single crash. Hovewer I was on Linux /Windows 10, and have definitely different programs installed ;)
Here some more insights: I've asked Ed to try it on his laptop and two things were different. In the list of external editors only the default text icon was displayed for all external programs. And we were not able to produce a VM crash there. Back on my laptop, we were able to reproduce the crash in a debug launch. In org.eclipse.ui.internal.misc.ExternalProgramImageDescriptor.getImageData() we logged the program name to the console in the hope to see what program (icon) causes the problem. But the results were different each time we launched. A crash happened each time, but at totally different programs. That is in line with the observation that the crash even happens at different times, e.g., sometimes when displaying the list of external programs, sometimes when pressing OK for a selected external program, and sometimes only when pressing OK on the underlying preference dialog. Then we started to comment out some pieces of code in ExternalProgramImageDescriptor.getImageData(). Surprisingly, even when we replaced the entire body with "return null;" the crash still occured. Then we replaced the entire body of org.eclipse.swt.program.Program.getImageData() with "return null;" -- the crash still occured. That all implies that the problematic code is some native code that is called before the program icons are loaded. So we replaced the org.eclipse.swt.program.Program.getPrograms() body with this: Program program = new Program(); program.command="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""; program.extension=null; program.iconName="C:\\Program Files\\7-Zip\\7z.dll,9"; program.name="001 Archive"; Program [] programs = {program}; return programs; And now we could no longer reproduce a crash! To us that suggests that the problem is somewhere in the OS.RegEnumKeyEx(...) call in Program.getPrograms(). This problem probably doesn't manifest itself immediately, but rather seems to corrupt the Java heap in some random way, so that subsequent heap access leads to VM crashes.