Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342518

Summary: JVM crash on ctrl+space for code completion
Product: [Eclipse Project] Platform Reporter: Kresten Peter Vester <kresten+eclipse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: critical    
Priority: P3 CC: amj87.iitr, grant_gayed, remy.suen
Version: 3.6.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
crash log none

Description Kresten Peter Vester CLA 2011-04-12 04:48:33 EDT
Build Identifier: 

Whenever I create a new workspace eclipse crashes. When I work in an existing workspace and press ctrl+space in a java editor window (for code completion) eclipse crashes.

I happens in both the RCP and the JEE version of eclipse.

I'm running openSUSE 11.4 64 bit. 

I'm running with Oracles JDK:
java -version:
java version "1.6.0_24"                                                                                                                                                                                                          
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)                                                                                                                                                                             
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)                                                                                                                                                                   

I have subversive with SVNKit connector plugins installed.

This message appears when eclipse crashes: /usr/bin/java: symbol lookup error: /usr/lib64/libproxy-0.4.6/modules/pacrunner_mozjs.so: undefined symbol: JS_NewCompartmentAndGlobalObject


And this is the error dialog that is displayed:
JVM terminated. Exit code=127
/usr/bin/java
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/username/opt/eclipse-jee-helios-SR2-linux-gtk-x86_64//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /home/username/opt/eclipse-jee-helios-SR2-linux-gtk-x86_64/eclipse
-name Eclipse
--launcher.library /home/username/opt/eclipse-jee-helios-SR2-linux-gtk-x86_64//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.2.R36x_v20101019_1345/eclipse_1310.so
-startup /home/username/opt/eclipse-jee-helios-SR2-linux-gtk-x86_64//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
-exitdata f9001d
-product org.eclipse.epp.package.jee.product
-clean
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/username/opt/eclipse-jee-helios-SR2-linux-gtk-x86_64//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar 


Reproducible: Always

Steps to Reproduce:
1. Start eclipse
2. Select a new not existing workspace location
3. Click ok.
Comment 1 Ayushman Jain CLA 2011-04-12 05:08:53 EDT
Are you saying eclipse crashes in 2 ways for u:
1) Either while starting up in a fresh workspace
2) or, pressing CTRL+SPACE

Or are both of the above necessary conditions for the crash?

I think its most probably a problem in the file /usr/lib64/libproxy-0.4.6/modules/pacrunner_mozjs.so.
A bit of googling tells me that this file has dependencies on Mozilla firefox browser. So maybe when eclipse starts and the browser widget is loaded, this unresolved dependency causes the crash.
Comment 2 Kresten Peter Vester CLA 2011-04-12 05:13:39 EDT
It crashes in 2 ways. Either 1 or 2 causes the crash.

But the same message occurs in both cases.
Comment 3 Ayushman Jain CLA 2011-04-12 05:16:17 EDT
Can you please attach the core dump/crash log?

Moving to Platform/SWT.
Comment 4 Kresten Peter Vester CLA 2011-04-12 05:23:23 EDT
Created attachment 193018 [details]
crash log

I deleted my eclipse installation and created a new one. The crash log is from starting eclipse with an existing workspace. It crashes after clicking ok in the dialog for selecting workspace.
Comment 5 Kresten Peter Vester CLA 2011-04-12 05:30:32 EDT
I tried with java version "1.6.0_23" and are seeing the same problem.
Comment 6 Kresten Peter Vester CLA 2011-04-12 07:57:29 EDT
Now i have reinstalled eclipse and all my plugins + upgrading all available packages for my openSUSE OS. Now it works again but I still have no idea what caused it.
Comment 7 Kresten Peter Vester CLA 2011-04-12 08:04:13 EDT
I have now recreated the issue in another RCP application.

This code seems to cause the error:
		IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
		try {
			browserSupport.createBrowser(null).openURL(new URL("http://www.ob.dk/"));

		} catch (PartInitException e) {
			e.printStackTrace();
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
Comment 8 Kresten Peter Vester CLA 2011-04-12 09:08:42 EDT
Found a workaround.

The issue only occurs when eclipse is configured to use the internal browser. If the browser is changed to firefox it does not crash anymore.
Comment 9 Grant Gayed CLA 2011-04-14 16:01:03 EDT
The crash log is identical to bug 330476, marking report as a duplicate.

*** This bug has been marked as a duplicate of bug 330476 ***