Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312350 - [Browser] Eclipse crashes on startup on Ubuntu 10.04 with XPCOM error
Summary: [Browser] Eclipse crashes on startup on Ubuntu 10.04 with XPCOM error
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux-GTK
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Grant Gayed CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-10 18:08 EDT by Pawel Piech CLA
Modified: 2016-12-20 11:23 EST (History)
7 users (show)

See Also:


Attachments
Full trace. (6.43 KB, text/plain)
2010-05-11 11:26 EDT, Pawel Piech CLA
no flags Details
.log fie with new exception after commenting out unhookDOMListeners (16.92 KB, text/plain)
2010-05-13 11:32 EDT, Pawel Piech CLA
no flags Details
The offending profile contents. (420.58 KB, application/octet-stream)
2010-05-14 12:58 EDT, Pawel Piech CLA
no flags Details
SWTError: XPCOM error -2147467262 while opening javadoc view (5.33 KB, text/plain)
2010-08-24 14:53 EDT, Alex CLA
no flags Details
Selecting Javadoc View throws exception (5.18 KB, text/plain)
2010-10-17 09:39 EDT, Peter Krutel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Piech CLA 2010-05-10 18:08:39 EDT
Eclipse Build id: I20100509-0800
Mozilla XULRunner 1.9.2.3 - 20100414003610
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1)
OpenJDK Server VM (build 14.0-b16, mixed mode)
Ubuntu 10.04 LTS 32 bit, though I also had the same problem on 64 bit.

I installed Ubuntu 10.04 and I kept running into this error when using a fresh workspace (which showed the help screen).  I do not have this problem with Eclipse 3.5.2.  

I found that if I removed the ~/.mozilla/eclipse directory, then the crash did not happen, but as soon as I close the IDE and relaunch it, the crash comes back.  So my workaround is to make this directory read only.
Comment 1 Grant Gayed CLA 2010-05-11 09:51:49 EDT
What does the full stack look like?  Can you try with a Sun or IBM jre?  Does the exception happen when a Browser is created or when it's disposed?  Is there any possibility that you don't have write permission for your home directory (probably not)?
Comment 2 Pawel Piech CLA 2010-05-11 11:26:57 EDT
Created attachment 167945 [details]
Full trace.

(In reply to comment #1)
> What does the full stack look like?  Can you try with a Sun or IBM jre? 
Here's the full exception trace.  This time reproduced with sun 1.6 jvm.

> Does the exception happen when a Browser is created or when it's disposed?  
My workbench window does not even come up as the welcome screen brings it down first.

> Is there any possibility that you don't have write permission for your home 
> directory (probably not)?
No, although in a way it is my workaround.  When I disable eclipse from writing to my ~/.mozilla/eclipse it prevents this error from happening.
Comment 3 Grant Gayed CLA 2010-05-13 10:46:59 EDT
I've been thinking for a while that crashing when a failure occurs in unhookDOMListeners() is harsh because this doesn't necessarily affect future Browser use.  I assume in your case there's a prior error happening that is causing the Browser to be prematurely disposed, and the error in unhookDOMListeners() is hiding the original error.  Can you try the following:

- launch eclipse with command line:
     ./eclipse -vmargs -Dorg.eclipse.swt.browser.XULRunnerPath=/dev/null
- retrieve swt into your workspace and compile for gtk: http://www.eclipse.org/swt/cvs.php
- self-host (Run > Run As... > Eclipse Application) and ensure that you crash
- in class Mozilla comment out the whole body of method unhookDOMListeners() (note the signature, there are two unhookDOMListeners() methods)
- in class Device set static field DEBUG = true
- self-host again:
  -> which browser file path is written to stdout?
  -> do you see a different error/exception?
Comment 4 Pawel Piech CLA 2010-05-13 11:32:24 EDT
Created attachment 168399 [details]
.log fie with new exception after commenting out unhookDOMListeners

(In reply to comment #3)
>   -> which browser file path is written to stdout?
XULRunner path: /usr/lib/xulrunner-1.9.2.3/libxpcom.so

>   -> do you see a different error/exception?
Yes... I think.  The first error still seems to be the widget disposed one.  Full log is attached.

BTW, it was easier to just import org.eclipse.swt.gtk.linux.x86 source plugin from the target platform.
Comment 5 Grant Gayed CLA 2010-05-13 11:42:07 EDT
XPCOM error -2147024882 is NS_ERROR_OUT_OF_MEMORY, and it's failing when navigating to about:blank.  Bizarre, this doesn't happen on our Ubuntu 10.04.

You mentioned that making the profile directory read-only seemed to work around the problem.  When you do this does the Browser actually work, or does it just not crash?  For example, does the Welcome page have a greenish strip across its top or is it totally white?  Or, does the General - Internal Web Browser view navigate fine?  And if so, presumably not to https: pages?
Comment 6 Pawel Piech CLA 2010-05-13 12:01:52 EDT
(In reply to comment #5)
> XPCOM error -2147024882 is NS_ERROR_OUT_OF_MEMORY, and it's failing when
> navigating to about:blank.  Bizarre, this doesn't happen on our Ubuntu 10.04.
I agree that it's bizzare... perhaps something goes wrong reading the data from the profile directory.
 
> You mentioned that making the profile directory read-only seemed to work around
> the problem.  When you do this does the Browser actually work, or does it just
> not crash?  For example, does the Welcome page have a greenish strip across its
> top or is it totally white?  Or, does the General - Internal Web Browser view
> navigate fine?  And if so, presumably not to https: pages?
It works, it navigates to www.wsj.com just fine too, except it gives a warning about initializing the "application security component".  I should also mention that the first time I run it the browser with the profile directory writable, it works fine.  It's only after the profile directory is populated and I launch the IDE that it crashes.  Would you like me to attach the profile dir (it's 400k).
Comment 7 Grant Gayed CLA 2010-05-13 14:31:55 EDT
> Would you like me to attach the profile dir

Sure, it may prove to be useful.

As a side note, as the first eclipse 3.6-stream user to report Browser problems on Ubuntu 10.04, may I suggest the nicer workaround of launching eclipse with:

./eclipse -vmargs -Dorg.eclipse.swt.browser.UseWebKitGTK=true

;-)
Comment 8 Pawel Piech CLA 2010-05-14 12:58:11 EDT
Created attachment 168565 [details]
The offending profile contents.

(In reply to comment #7)
> As a side note, as the first eclipse 3.6-stream user to report Browser problems
> on Ubuntu 10.04, may I suggest the nicer workaround of launching eclipse with:
> 
> ./eclipse -vmargs -Dorg.eclipse.swt.browser.UseWebKitGTK=true
Good to know, but with so many short-cuts, launch configs, etc., my original workaround is actually very convenient :-)
Comment 9 Grant Gayed CLA 2010-05-18 12:28:09 EDT
Running with your mozilla profile works fine here on Ubuntu 10.04, so the problem seems to reside elsewhere.  Making your profile read-only probably works around the problem by disabling the functionality that encounters the problem.

Setting owner to swt-triaged because I don't think this will be investigated for eclipse 3.6 unless more reports are received for this problem.
Comment 10 Hasan Ceylan CLA 2010-06-13 18:36:55 EDT
(In reply to comment #7)
> > Would you like me to attach the profile dir
> 
> Sure, it may prove to be useful.
> 
> As a side note, as the first eclipse 3.6-stream user to report Browser problems
> on Ubuntu 10.04, may I suggest the nicer workaround of launching eclipse with:
> 
> ./eclipse -vmargs -Dorg.eclipse.swt.browser.UseWebKitGTK=true
> 
> ;-)

I am too having this problem on Ubuntu Lucid.

I can confirm that the above arg resolves issue...
Comment 11 Alex CLA 2010-08-24 14:51:35 EDT
Hi.

I have encountered this bug on my linux workstation (not an ubuntu).

uname -a
Linux debby 2.6.32-gentoo-r7 #2 SMP Mon Apr 26 10:29:01 EDT 2010 x86_64 Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz GenuineIntel GNU/Linux

ls /usr/lib/xulrunner-1.9.2/
LICENSE             icons                modules                 xpcshell
README.txt          javaxpcom.jar        mozilla-xremote-client  xpidl
chrome              libjavaxpcomglue.so  platform.ini            xpt_dump
components          libmozjs.so          plugin-container        xpt_link
defaults            libsqlite3.so        plugins                 xulrunner
dependentlibs.list  libxpcom.so          res                     xulrunner-bin
greprefs            libxul.so            run-mozilla.sh          xulrunner-stub

xulrunner-1.9.2 -v
Mozilla XULRunner 1.9.2.8 - 20100824133624

The only way to make eclipse IDE start is by append this to eclipse.ini:
-Dorg.eclipse.swt.browser.XULRunnerPath=''

However, this is a problem when I do rcp development because my junit tests still fail with a popup "Unhandled event loop exception XPCOM error -2147024882"
since some tests open eclipse.

Checking the logs and I see this error: "org.eclipse.swt.SWTError: XPCOM error -2147467262"

removing ~/.mozilla/eclipse makes the application work the first time. Opening the IDE with a browser widget will crash it again.
Comment 12 Alex CLA 2010-08-24 14:53:35 EDT
Created attachment 177354 [details]
SWTError: XPCOM error -2147467262 while opening javadoc view
Comment 13 Peter Krutel CLA 2010-10-17 09:34:54 EDT
Hi.

I commit the behaviour as Alex on openSUSE 11.3 64bit
# uname -a
Linux x.y.z 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux

I must adapt eclipse.ini:
-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib64/xulrunner-1.9.2/

Then, when clicking in Eclipse to JavaDoc View, exception occurs (see attachment).

Problem is, that when Eclipse is closed in this state, actual view in workbench (<WORKSPACE>/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml) is Javadoc View and workspace cannot be started. workbench.xml must be manually adapted to enable workspace to start again.
Comment 14 Peter Krutel CLA 2010-10-17 09:39:21 EDT
Created attachment 181049 [details]
Selecting Javadoc View throws exception
Comment 15 Eric Williams CLA 2016-12-20 11:23:38 EST
I can't reproduce this issue.