Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 231907 - [Browser] Freeze with XULRunner on Ubuntu
Summary: [Browser] Freeze with XULRunner on Ubuntu
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux-GTK
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-13 14:57 EDT by Christopher Deckers CLA
Modified: 2016-12-22 12:02 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Deckers CLA 2008-05-13 14:57:51 EDT
Build ID: 3.4M7

Steps To Reproduce:
The following code freezes when launching it several times (success ratio to reproduce the freeze is about 1/3)

 public static void main(String[] args) {
   final Display display = new Display();
   final Shell shell = new Shell(display);
   shell.setLayout(new FillLayout());
   final Browser browser = new Browser(shell, SWT.NONE);
   browser.execute("alert(navigator.product);");
   browser.setUrl("http://www.fckeditor.net/demo");
   shell.setSize(800, 600);
   shell.open();
   while(!shell.isDisposed()) {
     if(!display.readAndDispatch()) {
       display.sleep();
     }
   }
   display.dispose();
 }


More information:
I experience random freezes with XULRunner on Linux. When it does so, forcing a stack trace gives the following:

Thread 7402: (state = IN_NATIVE)
 - org.eclipse.swt.internal.mozilla.XPCOM.VtblCall(int, int, char[], int, int, int, int @bci=0 (Interpreted frame)
 - org.eclipse.swt.internal.mozilla.nsIWebNavigation.LoadURI(char[], int, int, int, int) @bci=13 (Interpreted frame)
 - org.eclipse.swt.browser.Mozilla.execute(java.lang.String) @bci=120 (Interpreted frame)
 - org.eclipse.swt.browser.Browser.execute(java.lang.String) @bci=17 (Interpreted frame)
 - test.BrowserSWT.main(java.lang.String[]) @bci=41, line=26 (Interpreted frame)
Comment 1 Grant Gayed CLA 2008-05-14 17:06:36 EDT
I found a ubuntu 7.10 here and could not reproduce this problem or the navigator.product problem, the fckeditor came up and was usable.  The xulrunner was 1.8.1.4, retrieved via Synaptic.  Is there anything unusual about your setup?
Comment 2 Christopher Deckers CLA 2008-05-15 02:52:03 EDT
> Is there anything unusual about your
> setup?

Nothing unusual as far as I know. I use Windows and I only use that Ubuntu installation to check how things work on Linux. Apart from installing XULRunner, I accept all the automatic updates.
This is a VM image, so I could zip and upload it somewhere if you wanted to check the problems there directly.
Comment 3 Martin Oberhuber CLA 2009-01-29 11:44:26 EST
In the Description's code, I find it odd that the Browser is created with SWT.NONE -- how can this be related to XULRunner?

Is this bug a candidate for closing due to its age, or is this still reproducable?
Comment 4 Grant Gayed CLA 2009-01-29 11:53:37 EST
On Linux, SWT.NONE-style Browsers will resolve to xulrunner if one is installed.

I wasn't able to reproduce the problem when I tried previously, but I wouldn't close the report at this point, since some problems on linux turn out to be distro-specific.
Comment 5 Christopher Deckers CLA 2009-01-29 16:23:03 EST
One thing I may have forgotten, is the fact of using the "org.eclipse.swt.browser.XULRunnerPath" system property.

Now my Ubuntu and my XULRunner are both newer, and I cannot reproduce this bug with this configuration.

-Christopher
Comment 6 Andrey Loskutov CLA 2009-06-09 11:09:15 EDT
(In reply to comment #5)
> One thing I may have forgotten, is the fact of using the
> "org.eclipse.swt.browser.XULRunnerPath" system property.
> 
> Now my Ubuntu and my XULRunner are both newer, and I cannot reproduce this bug
> with this configuration.

Hi Christopher,
can you please give some more information about WHICH versions of XulRunner didn't worked for you and which versions do you have now?

I'm facing similar (or same) issue with 3.3.2 Eclipse on RHEL 5 with installed firefox-1.5.0.12-3.el5 and just want to know if it is for the same XulRunner/mozilla version or not.

Comment 7 Grant Gayed CLA 2009-06-09 13:02:02 EDT
As a first step you should run the snippet at http://www.eclipse.org/swt/faq.php#printmozillapath to ensure that the native browser being detected at runtime is the one you're expecting.  I believe that RHEL5 ships with xulrunner 1.9.0.x, and if it's being detected, then eclipse 3.3.x will likely have problems with it, see http://www.eclipse.org/swt/faq.php#browserlinux .
Comment 8 Andrey Loskutov CLA 2009-06-09 16:24:37 EDT
(In reply to comment #7)
> As a first step you should run the snippet at
> http://www.eclipse.org/swt/faq.php#printmozillapath to ensure that the native
> browser being detected at runtime is the one you're expecting.  

We are already specifying the 1.8.1.3 version for Eclipse 3.3+ because of crashes with RHEL 1.9.x versions of xulrunner installed natively on RHEL. 

But before we did that, we had some reports about occasional hangups with either firefox-1.5.0.12-3.el5 or mozilla 1.7.2 or both (again, installed over RHEL native xulrunner 1.9).

So right now I'm just trying to understand which version is known as "crash-AND-hangup-free" for Eclipse 3.3, 3.4 and 3.5. Because we can fully control our Eclipse based product, it is just matter of a good choice ;-)

> RHEL5 ships with xulrunner 1.9.0.x, and if it's being detected, then eclipse
> 3.3.x will likely have problems with it

It just crashes as soon as you use some browser-related code. Works faster then kill -9...
Comment 9 Grant Gayed CLA 2009-06-09 16:35:26 EDT
xulrunner 1.8.1.3 should be crash-and-hang-free for eclipse 3.3 and newer.  Earlier versions of xulrunner/mozilla should be too, but perhaps there are bugs (I don't know of reproducable hangs in older versions).
Comment 10 Christopher Deckers CLA 2009-06-09 16:42:59 EDT
(In reply to comment #6)
> can you please give some more information about WHICH versions of XulRunner
> didn't worked for you and which versions do you have now?
No, because when I found the bug I did not check the version numbers and it got fixed by itself with the auto-updates...
I think it was with a 1.8.x XULRunner (not a Firefox install that is).

-Christopher
Comment 11 Alexander Kurtakov CLA 2016-12-22 12:02:43 EST
Report is against ancient versions and xulrunner is slowly being phased out. SWT defaults to webkitgtk for years.