Summary: | jvm crash SWT browser javascript error IE dialog | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Rick Leir <reclipsebugs> |
Component: | SWT | Assignee: | Grant Gayed <grant_gayed> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | reclipsebugs |
Version: | 3.2.1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
URL: | http://leirtech.com | ||
Whiteboard: |
Description
Rick Leir
2007-02-28 11:42:29 EST
Can you provide either the page with the javascript error or a link to it to make this easy to reproduce? (In reply to comment #1) > Can you provide either the page with the javascript error or a link to it to > make this easy to reproduce? Hi Grant, The page is internal. I suspect any javascript error would be fine, as long as IE notices it and puts up the dialog. Here is an excerpt from the page: ... <body > <script> ; = aa=22 aa=2 sss </script> ... In IE tools options advanced config you need to select script errors. My app was expecting the location listener to fire, and when that does not occur within a minute it disposes the shell, causing the crash. I have changed my app to not do that! cheers -- Rick import java.util.Timer; import java.util.TimerTask; import org.eclipse.swt.SWT; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class disposecrash { static disposecrash dc = new disposecrash(); static Display display; static Shell shell; static Browser browser; static Timer BWTimer = new Timer(); static TimerTask tt; // fires after a delay private class CheckBW extends TimerTask { CheckBW() { } // runs when there is a timeout public void run() { display.asyncExec(new Runnable() { public void run() { shell.dispose(); } }); } } public static void main(String[] args) { display = new Display(); shell = new Shell(display); shell.setLayout(new FillLayout()); browser = new Browser(shell, SWT.NONE); shell.open(); browser.setText("<html><head> </head>" + "<body >before <script> aa=2 sss</script>after</body></html>"); tt = dc.new CheckBW(); BWTimer.schedule(tt, 10 * 1000); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } } } The snippet in comment 3 does not crash for me on win2000 or XP (IE 6). What is your IE version string (launch IE, Help > About Internet Explorer)? > What IE version string (launch IE, Help > About Internet Explorer)?
IE 7.0.5730.11
Reminder: IE tools options advanced config you need to select script errors.
Run the snippet, Expect a dialog from IE, wait 10 seconds, then touch a dialog button. The workaround, clearly, is to revert to the default config. Are there other dialogs that IE might put up in the default config? I will poke at IE.
cheers -- Rick
Here is a workaround. While IE has the dialog up offering to debug a script error, the LocationListener can not fire. So add a LocationListener to your app's browser instance, and make sure you do not dispose the browser until the LocationListener has fired. Rick This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. |