Community
Participate
Working Groups
Created attachment 206931 [details] Error report file I'm changing periodically the content of a div, loading SVGs in it via javascript (org.eclipse.swt.browser.Browser.execute()). In a short exceution time the JVM detects a SIGSEGV. Reproducible: always. Thanks in advance.
The attached dump just indicates that the error is occuring in the event loop. Are you able to provide a concrete means of reproducing the problem (ideal snippet template: http://www.eclipse.org/swt/faq.php#whatisasnippet )?
Created attachment 207008 [details] Example application. You must copy example.svg to /tmp
Created attachment 207141 [details] Core file dump backtrace
I've run App.java from the comment 2 attachment, but I do not see the crash, just blue content. Questions: - App.java is the correct thing to run, right? - Can you verify that the crash still happens for you with a JRE from either Sun/Oracle or IBM? OpenJDK is not considered to be supported. - I notice that you're on Ubuntu 11.10; which version of webkitgtk is on there?
Yes(In reply to comment #4) > I've run App.java from the comment 2 attachment, but I do not see the crash, > just blue content. Questions: > - App.java is the correct thing to run, right? Yes, App.java is the correct thing. But after the blue content it must load the file /tmp/example.svg Have you copied the example.svg file to /tmp? > - Can you verify that the crash still happens for you with a JRE from either > Sun/Oracle or IBM? OpenJDK is not considered to be supported. > - I notice that you're on Ubuntu 11.10; which version of webkitgtk is on there? I'm using the packages of the Ubuntu's standard repository, version 1.4.3
Simplified snippet that reproduces the problem with WebKitGTK 1.4: public class App { private static final String JQUERY_FILE = "http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"; private static final String CONTENT1_ID = "blucontent0"; private static final String CONTENT2_ID = "blucontent1"; private static final String FRAME_ID = "bluframe"; private static final String HTML = "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> <style type=\"text/css\"> * { overflow:hidden; margin: 0px; padding: 0px; } </style> <script type=\"text/javascript\" src=\"" + JQUERY_FILE + "\"></script></head><body style=\"width: 200px; height: 200px; background: #84c5e1;\"><div id=\"" + CONTENT1_ID + "\" style=\"z-index: 1; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;\"></div><div id=\"" + CONTENT2_ID + "\" style=\"z-index: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;display: none\"></div><div id=\"" + FRAME_ID + "\" style=\"z-index: 99; position: absolute; top: 0px; left: 0px;\"></div></body></html>"; private static Browser browser; private static int nextContent = 0; public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); FillLayout layout = new FillLayout(); shell.setLayout(layout); browser = new Browser(shell, SWT.NONE); browser.setText(HTML, true); shell.setBounds(10,10,200,200); shell.open(); Runnable runnable = new Runnable() { public void run() { final String nextContentId = (nextContent == 0 ? CONTENT1_ID : CONTENT2_ID); final String currentContentId = (nextContent == 1 ? CONTENT1_ID : CONTENT2_ID); browser.execute( "$(\"div#" + nextContentId + ":first\").load(\"" + "/tmp/example.svg" + "\", null," + "function() {" + "$(\"div#" + nextContentId + ":first\").css(\"z-index\",\"1\");" + "$(\"div#" + currentContentId + ":first\").css(\"z-index\",\"0\");" + "$(\"div#" + nextContentId + ":first\").show(0," + " function() {" + "$(\"div#" + currentContentId + ":first\").hide(0);" + "}); " + "})"); nextContent = (nextContent == 0 ? 1 : 0); display.timerExec(2000, this); } }; display.timerExec(2000, runnable); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } }
Created attachment 207610 [details] html test case This is a better test case, it moves all of the functionality into the .html (attached). Just put it into the same directory as example.svg and view it with a generic Browser snippet like http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148.java to see the crash. I suspect that this will resolve to be a problem in native WebKitGTK, but is not yet confirmed.
This is fixed in WebKitGTK 1.6.x. Closing report since it turned out to not be an swt issue.