Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2012-09-11 14:21:42 +0000
committerSilenio Quarti2012-09-14 18:19:09 +0000
commitf0be9f915dba46e9df445f6adc7fc4de1d5e9f85 (patch)
treeaf79d2d9756c9d6c5721aeb8877f475d64488b6a
parent75be4410b79fd2b825a6185d89bda51356b828b6 (diff)
downloadeclipse.platform.swt-f0be9f915dba46e9df445f6adc7fc4de1d5e9f85.tar.gz
eclipse.platform.swt-f0be9f915dba46e9df445f6adc7fc4de1d5e9f85.tar.xz
eclipse.platform.swt-f0be9f915dba46e9df445f6adc7fc4de1d5e9f85.zip
Bug 383890 - JVM (Eclipse) crash with SIGSEGV in ld-linux-x86-64.so.2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java
index 3a92ce31f8..3b1a5d7ad8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java
@@ -122,25 +122,26 @@ static void loadAdditionalLibraries (String mozillaPath) {
String libName = "libswt-xulrunner-fix.so"; //$NON-NLS-1$
File libsDir = new File (getProfilePath () + "/libs/" + Mozilla.OS() + '/' + Mozilla.Arch ()); //$NON-NLS-1$
File file = new File (libsDir, libName);
- java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName);
- if (is != null) {
- if (!libsDir.exists ()) {
- libsDir.mkdirs ();
- }
- int read;
- byte [] buffer = new byte [4096];
- try {
- FileOutputStream os = new FileOutputStream (file);
- while ((read = is.read (buffer)) != -1) {
- os.write(buffer, 0, read);
+ if (!file.exists()) {
+ java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName);
+ if (is != null) {
+ if (!libsDir.exists ()) {
+ libsDir.mkdirs ();
+ }
+ int read;
+ byte [] buffer = new byte [4096];
+ try {
+ FileOutputStream os = new FileOutputStream (file);
+ while ((read = is.read (buffer)) != -1) {
+ os.write(buffer, 0, read);
+ }
+ os.close ();
+ is.close ();
+ } catch (FileNotFoundException e) {
+ } catch (IOException e) {
}
- os.close ();
- is.close ();
- } catch (FileNotFoundException e) {
- } catch (IOException e) {
}
}
-
if (file.exists ()) {
byte[] bytes = Converter.wcsToMbcs (null, file.getAbsolutePath (), true);
OS.dlopen (bytes, OS.RTLD_NOW | OS.RTLD_GLOBAL);

Back to the top