Bug 25683 - SWT programs crash when launched after AWT has been used
Summary: SWT programs crash when launched after AWT has been used
Status: RESOLVED DUPLICATE of bug 4417
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 22137 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-04 04:58 EST by Oyvind Harboe CLA
Modified: 2003-03-28 10:49 EST (History)
2 users (show)

See Also:


Attachments
replacement swt.jar to try (840.18 KB, application/x-zip-compressed)
2002-11-04 11:42 EST, Grant Gayed CLA
no flags Details
A small SWT app launched by Java Web Start to reproduce crash under Linux (7.83 KB, application/x-zip-compressed)
2002-11-05 04:14 EST, Oyvind Harboe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oyvind Harboe CLA 2002-11-04 04:58:22 EST
(Please mail me for a complete example, I'll try to find somewhere to upload an 
attachment to the bugreport).

When launching a Java Web Start enabled SWT application on Linux Red Hat 8.0, I 
get the following crash:



 An irrecoverable stack overflow has occurred.

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4CC956B6
Function=XFindContext+0x6
Library=/usr/X11R6/lib/libX11.so.6

Current Java thread:
        at org.eclipse.swt.internal.motif.OS.XmCreateScrollBar(Native Method)
        - locked <0x48968720> (a java.lang.Class)
        at org.eclipse.swt.widgets.Display.initializeComposite
(Display.java:1088)
        at org.eclipse.swt.widgets.Display.init(Display.java:1043)
        at org.eclipse.swt.graphics.Device.<init>(Device.java:113)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:319)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:316)
        at Chat.createGUI(Chat.java:50)
        at Chat.run(Chat.java:36)
        at Chat.main(Chat.java:161)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.sun.javaws.Launcher.executeApplication(Launcher.java:778)
        at com.sun.javaws.Launcher.executeMainClass(Launcher.java:740)
        at com.sun.javaws.Launcher.continueLaunch(Launcher.java:625)
        at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:352)
        at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:177)
        at com.sun.javaws.Launcher.run(Launcher.java:145)
        at java.lang.Thread.run(Thread.java:536)

Dynamic libraries:
08048000-0804d000 r-xp 00000000 08:02 930851     /usr/java/j2re1.4.1/bin/java
0804d000-0804e000 rw-p 00004000 08:02 930851     /usr/java/j2re1.4.1/bin/java
40000000-40012000 r-xp 00000000 08:02 718085     /lib/ld-2.2.93.so
40012000-40013000 rw-p 00012000 08:02 718085     /lib/ld-2.2.93.so
40013000-4001c000 r-xp 00000000 08:02 
2530276    /usr/java/j2re1.4.1/lib/i386/native_threads/libhpi.so
4001c000-4001d000 ---p 00009000 08:02 
2530276    /usr/java/j2re1.4.1/lib/i386/native_threads/libhpi.so
4001d000-4001e000 rw-p 00009000 08:02 
2530276    /usr/java/j2re1.4.1/lib/i386/native_threads/libhpi.so
4001e000-40021000 r--s 00000000 08:02 
2170984    /usr/java/j2re1.4.1/lib/ext/dnsns.jar
40021000-40025000 r-xp 00000000 08:02 1746320    /usr/X11R6/lib/libXtst.so.6.1
40025000-40026000 rw-p 00004000 08:02 1746320    /usr/X11R6/lib/libXtst.so.6.1
40026000-40033000 r-xp 00000000 08:02 1844169    /lib/i686/libpthread-0.10.so
40033000-40036000 rw-p 0000d000 08:02 1844169    /lib/i686/libpthread-0.10.so
40057000-40059000 r-xp 00000000 08:02 718098     /lib/libdl-2.2.93.so
40059000-4005a000 rw-p 00001000 08:02 718098     /lib/libdl-2.2.93.so
4005a000-404be000 r-xp 00000000 08:02 
1110419    /usr/java/j2re1.4.1/lib/i386/client/libjvm.so
404be000-404db000 rw-p 00463000 08:02 
1110419    /usr/java/j2re1.4.1/lib/i386/client/libjvm.so
404eb000-404fd000 r-xp 00000000 08:02 718102     /lib/libnsl-2.2.93.so
404fd000-404fe000 rw-p 00012000 08:02 718102     /lib/libnsl-2.2.93.so
40500000-40521000 r-xp 00000000 08:02 1844167    /lib/i686/libm-2.2.93.so
40521000-40522000 rw-p 00021000 08:02 1844167    /lib/i686/libm-2.2.93.so
40522000-40531000 r-xp 00000000 08:02 
1485730    /usr/java/j2re1.4.1/lib/i386/libverify.so
40531000-40533000 rw-p 0000e000 08:02 
1485730    /usr/java/j2re1.4.1/lib/i386/libverify.so
40533000-40552000 r-xp 00000000 08:02 
1485731    /usr/java/j2re1.4.1/lib/i386/libjava.so
40552000-40554000 rw-p 0001e000 08:02 
1485731    /usr/java/j2re1.4.1/lib/i386/libjava.so
40554000-40569000 r-xp 00000000 08:02 
1485733    /usr/java/j2re1.4.1/lib/i386/libzip.so
40569000-4056c000 rw-p 00014000 08:02 
1485733    /usr/java/j2re1.4.1/lib/i386/libzip.so
4056c000-41c39000 r--s 00000000 08:02 1485774    /usr/java/j2re1.4.1/lib/rt.jar
41c7c000-41c93000 r--s 00000000 08:02 
1485754    /usr/java/j2re1.4.1/lib/sunrsasign.jar
41c93000-41d04000 r--s 00000000 08:02 
1485756    /usr/java/j2re1.4.1/lib/jsse.jar
41d04000-41d17000 r--s 00000000 08:02 
1485755    /usr/java/j2re1.4.1/lib/jce.jar41d17000-41fd3000 r--s 00000000 08:02 
1485772    /usr/java/j2re1.4.1/lib/charsets.jar
41ffb000-41ffc000 r-xp 00000000 08:02 
522275     /usr/X11R6/lib/X11/locale/common/xlcUTF8Load.so.2
41ffc000-41ffd000 rw-p 00000000 08:02 
522275     /usr/X11R6/lib/X11/locale/common/xlcUTF8Load.so.2
41ffd000-41fff000 r--s 00000000 08:02 
1306162    /home/oyvind/.javaws/cache/file/D/P-
1/DMhome/DMoyvind/DMfun/RMchatx.jar
42000000-42126000 r-xp 00000000 08:02 1844165    /lib/i686/libc-2.2.93.so
42126000-4212b000 rw-p 00126000 08:02 1844165    /lib/i686/libc-2.2.93.so
4c3b3000-4c572000 r--p 00000000 08:02 473365     /usr/lib/locale/locale-archive
4c572000-4c580000 r--s 00000000 08:02 
2170986    /usr/java/j2re1.4.1/lib/ext/ldapsec.jar
4c585000-4c58e000 r-xp 00000000 08:02 718118     /lib/libnss_files-2.2.93.so
4c58e000-4c58f000 rw-p 00008000 08:02 718118     /lib/libnss_files-2.2.93.so
4c793000-4c7b0000 r--s 00000000 08:02 
2170983    /usr/java/j2re1.4.1/lib/ext/sunjce_provider.jar
4c7b0000-4c84f000 r--s 00000000 08:02 
2170985    /usr/java/j2re1.4.1/lib/ext/localedata.jar
4c84f000-4c8e5000 r--s 00000000 08:02 1404178    /home/oyvind/javaws/javaws.jar
4c8e5000-4c8fa000 r--s 00000000 08:02 1404182    /home/oyvind/javaws/javaws-
l10n.jar
4c8fa000-4cb3c000 r-xp 00000000 08:02 
1485741    /usr/java/j2re1.4.1/lib/i386/libawt.so
4cb3c000-4cb51000 rw-p 00241000 08:02 
1485741    /usr/java/j2re1.4.1/lib/i386/libawt.so
4cb76000-4cbe8000 r-xp 00000000 08:02 
1485740    /usr/java/j2re1.4.1/lib/i386/libmlib_image.so
4cbe8000-4cbe9000 rw-p 00071000 08:02 
1485740    /usr/java/j2re1.4.1/lib/i386/libmlib_image.so
4cbe9000-4cbef000 r--s 00000000 08:02 1762752    /usr/lib/gconv/gconv-
modules.cache
4cbfc000-4cc03000 r-xp 00000000 08:02 1746310    /usr/X11R6/lib/libXp.so.6.2
4cc03000-4cc04000 rw-p 00006000 08:02 1746310    /usr/X11R6/lib/libXp.so.6.2
4cc04000-4cc52000 r-xp 00000000 08:02 1746318    /usr/X11R6/lib/libXt.so.6.0
4cc52000-4cc56000 rw-p 0004d000 08:02 1746318    /usr/X11R6/lib/libXt.so.6.0
4cc56000-4cc5e000 r-xp 00000000 08:02 1746288    /usr/X11R6/lib/libSM.so.6.0
4cc5e000-4cc5f000 rw-p 00007000 08:02 1746288    /usr/X11R6/lib/libSM.so.6.0
4cc5f000-4cc73000 r-xp 00000000 08:02 1746284    /usr/X11R6/lib/libICE.so.6.3
4cc73000-4cc74000 rw-p 00013000 08:02 1746284    /usr/X11R6/lib/libICE.so.6.3
4cc76000-4cc83000 r-xp 00000000 08:02 1746298    /usr/X11R6/lib/libXext.so.6.4
4cc83000-4cc84000 rw-p 0000c000 08:02 1746298    /usr/X11R6/lib/libXext.so.6.4
4cc84000-4cd5f000 r-xp 00000000 08:02 1746290    /usr/X11R6/lib/libX11.so.6.2
4cd5f000-4cd62000 rw-p 000da000 08:02 1746290    /usr/X11R6/lib/libX11.so.6.2
4cd62000-4ce22000 r-xp 00000000 08:02 
1485743    /usr/java/j2re1.4.1/lib/i386/libfontmanager.so
4ce22000-4ce23000 ---p 000c0000 08:02 
1485743    /usr/java/j2re1.4.1/lib/i386/libfontmanager.so
4ce23000-4ce4a000 rw-p 000c0000 08:02 
1485743    /usr/java/j2re1.4.1/lib/i386/libfontmanager.so
4cecb000-4cee7000 r-xp 00000000 08:02 
522273     /usr/X11R6/lib/X11/locale/common/ximcp.so.2
4cee7000-4cee9000 rw-p 0001b000 08:02 
522273     /usr/X11R6/lib/X11/locale/common/ximcp.so.2
4d1ef000-4d234000 r-xp 00000000 08:02 
1485779    /usr/java/j2re1.4.1/lib/i386/libswt-motif-2049.so
4d234000-4d237000 rw-p 00044000 08:02 
1485779    /usr/java/j2re1.4.1/lib/i386/libswt-motif-2049.so
4d270000-4d28e000 r-xp 00000000 08:02 
1485739    /usr/java/j2re1.4.1/lib/i386/libdcpr.so
4d28e000-4d2a1000 rw-p 0001d000 08:02 
1485739    /usr/java/j2re1.4.1/lib/i386/libdcpr.so
4d2a1000-4d2b3000 r-xp 00000000 08:02 
1485736    /usr/java/j2re1.4.1/lib/i386/libnet.so
4d2b3000-4d2b4000 rw-p 00011000 08:02 
1485736    /usr/java/j2re1.4.1/lib/i386/libnet.so
4d2b4000-4d2f0000 r-xp 00000000 08:02 
1485744    /usr/java/j2re1.4.1/lib/i386/libjpeg.so
4d2f0000-4d2f2000 rw-p 0003b000 08:02 
1485744    /usr/java/j2re1.4.1/lib/i386/libjpeg.so
4d2f2000-4d3ca000 r--s 00000000 08:02 
1306165    /home/oyvind/.javaws/cache/file/D/P-
1/DMhome/DMoyvind/DMfun/RMlinux_swt.jar
4d3ca000-4d54e000 r-xp 00000000 08:02 
1485781    /usr/java/j2re1.4.1/lib/i386/libXm.so
4d54e000-4d561000 rw-p 00183000 08:02 
1485781    /usr/java/j2re1.4.1/lib/i386/libXm.so

Local Time = Mon Nov  4 10:55:13 2002
Elapsed Time = 38
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (Blackdown-1.4.1-beta mixed mode)
#
# An error report file has been saved as hs_err_pid1012.log.
# Please refer to the file for further information.
#
Comment 1 Grant Gayed CLA 2002-11-04 09:46:37 EST
I've never seen this before but it looks similar to bug 4730.  If it is then 
the problem is that you're picking up lesstif libraries instead of the expected 
open motif libraries.

Assuming that you have a motif installation of Eclipse on your machine, can you 
try hardcoding the first entry in your LD_LIBRARY_PATH environment variable to 
the Eclipse root directory (ie.- something 
like "/opt/<eclipseInstallDir>/eclipse") before running your problem scenario?  
The intent here is to ensure that the libXm.so* files that live in this 
directory are found first.  Please follow up and indicate if this helps you at 
all.

Also, if it doesn't help and you want to attach a sample snippet then you can 
do so here.  It's only when composing a new bug report that Bugzilla doesn't 
let you make an attachment.
Comment 2 Oyvind Harboe CLA 2002-11-04 10:35:38 EST
Note! I'm not trying to run Eclipse, but I'm trying to deploy an application I 
have written using SWT via Java Web Start. I would like to deploy my 
application on Windows(works fine), Linux(crashes) and Solaris(I'm still 
working on that one) using JWS.

>Assuming that you have a motif installation of Eclipse on your 
>machine, can you try hardcoding the first entry in your 
>LD_LIBRARY_PATH environment variable to the Eclipse root 
>directory (ie.- something like "/opt/<eclipseInstallDir>/eclipse") 
>before running your problem scenario?  

a) I have no problem launching the application from the command line, i.e. it 
seems to be picking up the correct libraries 
b) I don't know how to control the LD_LIBRARY_PATH and it may not be possible 
to control the -Djava.library.path when launching and app via Java Web Start. 
Java Web Start (AFAIK) relies on overriding the behaviour of System.loadLibrary
() to load the native binaries.

>Also, if it doesn't help and you want to attach a sample snippet then 
>you can do so here.  It's only when composing a new bug report that 
>Bugzilla doesn't let you make an attachment.

Regarding uploading attachment to bugreport: I was not able to upload my sample 
application, because it is 5 MBs. There is a 1MB limitation on attachments.  
My "hello world" application is actually ~5kb, the rest are SWT binaries. My 
example includes a working Windows Java Web Start example and the Linux version 
that fails.

If it is possible to e-mail/ftp my JWS application directly, please advice.

Øyvind
 
Comment 3 Grant Gayed CLA 2002-11-04 11:41:25 EST
To set the LD_LIBRARY_PATH in a given shell:
   if using csh: setenv LD_LIBRARY_PATH <value>
   if using other: export LD_LIBRARY_PATH=<value>

Set this environment variable in the shell in which JWS will be invoked (note 
that I've never used JWS so I'm making an assumption here).  Invoke JWS, which 
then invokes your swt application.  At this point this variable value should be 
utilized.

If this doesn't help then try replacing the swt.jar that's being used with the 
one that I'll attach next.  It would be more advantageous for you if the 
LD_LIBRARY_PATH solution helps though.
Comment 4 Grant Gayed CLA 2002-11-04 11:42:12 EST
Created attachment 2308 [details]
replacement swt.jar to try
Comment 5 Oyvind Harboe CLA 2002-11-04 12:11:39 EST
I am running with the 2049 Linux binaries and the replacmenet swt.jar required 
2047:

java.lang.UnsatisfiedLinkError: no swt-motif-2047 in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403)
	at java.lang.Runtime.loadLibrary0(Runtime.java:788)
	at java.lang.System.loadLibrary(System.java:832)
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:104)
	at org.eclipse.swt.internal.motif.OS.<clinit>(OS.java:16)
	at org.eclipse.swt.widgets.Display.createDisplay(Display.java:507)
	at org.eclipse.swt.widgets.Display.create(Display.java:493)
	at org.eclipse.swt.graphics.Device.<init>(Device.java:112)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:319)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:316)
	at Chat.createGUI(Chat.java:50)
	at Chat.run(Chat.java:36)
	at Chat.main(Chat.java:161)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at com.sun.javaws.Launcher.executeApplication(Launcher.java:778)
	at com.sun.javaws.Launcher.executeMainClass(Launcher.java:740)
	at com.sun.javaws.Launcher.continueLaunch(Launcher.java:625)
	at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:352)
	at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:177)
	at com.sun.javaws.Launcher.run(Launcher.java:145)
	at java.lang.Thread.run(Thread.java:536)
Comment 6 Oyvind Harboe CLA 2002-11-04 12:12:40 EST
May I e-mail you an example .zipped up JWS application that reproduces the 
problem? It is 5MB.

Øyvind
Comment 7 Oyvind Harboe CLA 2002-11-04 12:13:12 EST
It did not help changing LD_LIBRARY_PATH to make sure that the correct 
libXm.so* where being loaded.

Øyvind
Comment 8 Grant Gayed CLA 2002-11-04 12:34:21 EST
You can copy your existing libswt-motif-2049.so file to a new one called libswt-
motif-2047.so so that it's found by the replacement jar.  And if this doesn't 
help, please check whether the dumped stack trace is the same as your original 
problem.

I can't receive an email that's 5 meg in size.  It would be better if a small 
snippet that captured the problem could be attached here.  But also note that I 
don't have anything JWS-related here, so it may not help very much.
Comment 9 Oyvind Harboe CLA 2002-11-04 13:09:08 EST
the replacement swt.jar still produces the crash. Verified that *2047.so was 
loaded and hence that the alternative swt.jar was indeed used.

An irrecoverable stack overflow has occurred.

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4CD296B6
Function=XFindContext+0x6
Library=/usr/X11R6/lib/libX11.so.6

Current Java thread:
        at org.eclipse.swt.internal.motif.OS.XmCreateScrollBar(Native Method)
        - locked <0x4892ddf0> (a java.lang.Class)
        at org.eclipse.swt.widgets.Display.initializeComposite
(Display.java:1088)
        at org.eclipse.swt.widgets.Display.init(Display.java:1043)
        at org.eclipse.swt.graphics.Device.<init>(Device.java:113)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:319)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:316)
        at Chat.createGUI(Chat.java:50)
        at Chat.run(Chat.java:36)
        at Chat.main(Chat.java:161)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.sun.javaws.Launcher.executeApplication(Launcher.java:778)
        at com.sun.javaws.Launcher.executeMainClass(Launcher.java:740)
        at com.sun.javaws.Launcher.continueLaunch(Launcher.java:625)
        at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:352)
        at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:177)
        at com.sun.javaws.Launcher.run(Launcher.java:145)
        at java.lang.Thread.run(Thread.java:536)

Dynamic libraries:
08048000-0804d000 r-xp 00000000 08:02 930851     /usr/java/j2re1.4.1/bin/java
0804d000-0804e000 rw-p 00004000 08:02 930851     /usr/java/j2re1.4.1/bin/java
40000000-40012000 r-xp 00000000 08:02 718085     /lib/ld-2.2.93.so
40012000-40013000 rw-p 00012000 08:02 718085     /lib/ld-2.2.93.so
40013000-4001c000 r-xp 00000000 08:02 
2530276    /usr/java/j2re1.4.1/lib/i386/native_threads/libhpi.so
4001c000-4001d000 ---p 00009000 08:02 
2530276    /usr/java/j2re1.4.1/lib/i386/native_threads/libhpi.so
4001d000-4001e000 rw-p 00009000 08:02 
2530276    /usr/java/j2re1.4.1/lib/i386/native_threads/libhpi.so
4001e000-40021000 r--s 00000000 08:02 
2170984    /usr/java/j2re1.4.1/lib/ext/dnsns.jar
40021000-40025000 r-xp 00000000 08:02 1746320    /usr/X11R6/lib/libXtst.so.6.1
40025000-40026000 rw-p 00004000 08:02 1746320    /usr/X11R6/lib/libXtst.so.6.1
40026000-40033000 r-xp 00000000 08:02 1844169    /lib/i686/libpthread-0.10.so
40033000-40036000 rw-p 0000d000 08:02 1844169    /lib/i686/libpthread-0.10.so
40057000-40059000 r-xp 00000000 08:02 718098     /lib/libdl-2.2.93.so
40059000-4005a000 rw-p 00001000 08:02 718098     /lib/libdl-2.2.93.so
4005a000-404be000 r-xp 00000000 08:02 
1110419    /usr/java/j2re1.4.1/lib/i386/client/libjvm.so
404be000-404db000 rw-p 00463000 08:02 
1110419    /usr/java/j2re1.4.1/lib/i386/client/libjvm.so
404eb000-404fd000 r-xp 00000000 08:02 718102     /lib/libnsl-2.2.93.so
404fd000-404fe000 rw-p 00012000 08:02 718102     /lib/libnsl-2.2.93.so
40500000-40521000 r-xp 00000000 08:02 1844167    /lib/i686/libm-2.2.93.so
40521000-40522000 rw-p 00021000 08:02 1844167    /lib/i686/libm-2.2.93.so
40522000-40531000 r-xp 00000000 08:02 
1485730    /usr/java/j2re1.4.1/lib/i386/libverify.so
40531000-40533000 rw-p 0000e000 08:02 
1485730    /usr/java/j2re1.4.1/lib/i386/libverify.so
40533000-40552000 r-xp 00000000 08:02 
1485731    /usr/java/j2re1.4.1/lib/i386/libjava.so
40552000-40554000 rw-p 0001e000 08:02 
1485731    /usr/java/j2re1.4.1/lib/i386/libjava.so
40554000-40569000 r-xp 00000000 08:02 
1485733    /usr/java/j2re1.4.1/lib/i386/libzip.so
40569000-4056c000 rw-p 00014000 08:02 
1485733    /usr/java/j2re1.4.1/lib/i386/libzip.so
4056c000-41c39000 r--s 00000000 08:02 1485774    /usr/java/j2re1.4.1/lib/rt.jar
41c7c000-41c93000 r--s 00000000 08:02 
1485754    /usr/java/j2re1.4.1/lib/sunrsasign.jar
41c93000-41d04000 r--s 00000000 08:02 
1485756    /usr/java/j2re1.4.1/lib/jsse.jar
41d04000-41d17000 r--s 00000000 08:02 
1485755    /usr/java/j2re1.4.1/lib/jce.jar41d17000-41fd3000 r--s 00000000 08:02 
1485772    /usr/java/j2re1.4.1/lib/charsets.jar
41ffb000-41ffc000 r-xp 00000000 08:02 
522275     /usr/X11R6/lib/X11/locale/common/xlcUTF8Load.so.2
41ffc000-41ffd000 rw-p 00000000 08:02 
522275     /usr/X11R6/lib/X11/locale/common/xlcUTF8Load.so.2
41ffd000-41fff000 r--s 00000000 08:02 
947188     /home/oyvind/.javaws/cache/http/D10.0.0.2/P80/DMfun/RMchatx.jar
42000000-42126000 r-xp 00000000 08:02 1844165    /lib/i686/libc-2.2.93.so
42126000-4212b000 rw-p 00126000 08:02 1844165    /lib/i686/libc-2.2.93.so
4c3b3000-4c572000 r--p 00000000 08:02 473365     /usr/lib/locale/locale-archive
4c572000-4c580000 r--s 00000000 08:02 
2170986    /usr/java/j2re1.4.1/lib/ext/ldapsec.jar
4c585000-4c58e000 r-xp 00000000 08:02 718118     /lib/libnss_files-2.2.93.so
4c58e000-4c58f000 rw-p 00008000 08:02 718118     /lib/libnss_files-2.2.93.so
4c793000-4c7b0000 r--s 00000000 08:02 
2170983    /usr/java/j2re1.4.1/lib/ext/sunjce_provider.jar
4c7b0000-4c84f000 r--s 00000000 08:02 
2170985    /usr/java/j2re1.4.1/lib/ext/localedata.jar
4c84f000-4c8e5000 r--s 00000000 08:02 1404178    /home/oyvind/javaws/javaws.jar
4c8e5000-4c8f7000 r-xp 00000000 08:02 
1485736    /usr/java/j2re1.4.1/lib/i386/libnet.so
4c8f7000-4c8f8000 rw-p 00011000 08:02 
1485736    /usr/java/j2re1.4.1/lib/i386/libnet.so
4c8f8000-4c93d000 r-xp 00000000 08:02 
131285     /home/oyvind/.javaws/cache/http/D10.0.0.2/P80/DMfun/RNlinux_swt_lib.j
ar/libswt-motif-2049.so
4c93d000-4c940000 rw-p 00044000 08:02 
131285     /home/oyvind/.javaws/cache/http/D10.0.0.2/P80/DMfun/RNlinux_swt_lib.j
ar/libswt-motif-2049.so
4c979000-4c98e000 r--s 00000000 08:02 1404182    /home/oyvind/javaws/javaws-
l10n.jar
4c98e000-4cbd0000 r-xp 00000000 08:02 
1485741    /usr/java/j2re1.4.1/lib/i386/libawt.so
4cbd0000-4cbe5000 rw-p 00241000 08:02 
1485741    /usr/java/j2re1.4.1/lib/i386/libawt.so
4cc0a000-4cc7c000 r-xp 00000000 08:02 
1485740    /usr/java/j2re1.4.1/lib/i386/libmlib_image.so
4cc7c000-4cc7d000 rw-p 00071000 08:02 
1485740    /usr/java/j2re1.4.1/lib/i386/libmlib_image.so
4cc7d000-4cc83000 r--s 00000000 08:02 1762752    /usr/lib/gconv/gconv-
modules.cache
4cc90000-4cc97000 r-xp 00000000 08:02 1746310    /usr/X11R6/lib/libXp.so.6.2
4cc97000-4cc98000 rw-p 00006000 08:02 1746310    /usr/X11R6/lib/libXp.so.6.2
4cc98000-4cce6000 r-xp 00000000 08:02 1746318    /usr/X11R6/lib/libXt.so.6.0
4cce6000-4ccea000 rw-p 0004d000 08:02 1746318    /usr/X11R6/lib/libXt.so.6.0
4ccea000-4ccf2000 r-xp 00000000 08:02 1746288    /usr/X11R6/lib/libSM.so.6.0
4ccf2000-4ccf3000 rw-p 00007000 08:02 1746288    /usr/X11R6/lib/libSM.so.6.0
4ccf3000-4cd07000 r-xp 00000000 08:02 1746284    /usr/X11R6/lib/libICE.so.6.3
4cd07000-4cd08000 rw-p 00013000 08:02 1746284    /usr/X11R6/lib/libICE.so.6.3
4cd0a000-4cd17000 r-xp 00000000 08:02 1746298    /usr/X11R6/lib/libXext.so.6.4
4cd17000-4cd18000 rw-p 0000c000 08:02 1746298    /usr/X11R6/lib/libXext.so.6.4
4cd18000-4cdf3000 r-xp 00000000 08:02 1746290    /usr/X11R6/lib/libX11.so.6.2
4cdf3000-4cdf6000 rw-p 000da000 08:02 1746290    /usr/X11R6/lib/libX11.so.6.2
4cdf6000-4ceb6000 r-xp 00000000 08:02 
1485743    /usr/java/j2re1.4.1/lib/i386/libfontmanager.so
4ceb6000-4ceb7000 ---p 000c0000 08:02 
1485743    /usr/java/j2re1.4.1/lib/i386/libfontmanager.so
4ceb7000-4cede000 rw-p 000c0000 08:02 
1485743    /usr/java/j2re1.4.1/lib/i386/libfontmanager.so
4cf5f000-4cf7b000 r-xp 00000000 08:02 
522273     /usr/X11R6/lib/X11/locale/common/ximcp.so.2
4cf7b000-4cf7d000 rw-p 0001b000 08:02 
522273     /usr/X11R6/lib/X11/locale/common/ximcp.so.2
4d202000-4d23e000 r-xp 00000000 08:02 
1485744    /usr/java/j2re1.4.1/lib/i386/libjpeg.so
4d23e000-4d240000 rw-p 0003b000 08:02 
1485744    /usr/java/j2re1.4.1/lib/i386/libjpeg.so
4d304000-4d322000 r-xp 00000000 08:02 
1485739    /usr/java/j2re1.4.1/lib/i386/libdcpr.so
4d322000-4d335000 rw-p 0001d000 08:02 
1485739    /usr/java/j2re1.4.1/lib/i386/libdcpr.so
4d335000-4d40e000 r--s 00000000 08:02 
947189     /home/oyvind/.javaws/cache/http/D10.0.0.2/P80/DMfun/RMlinux_mod_swt_l
ib.jar
4d40e000-4d592000 r-xp 00000000 08:02 
131269     /home/oyvind/.javaws/cache/http/D10.0.0.2/P80/DMfun/RNlinux_swt_lib.j
ar/libXm.so
4d592000-4d5a5000 rw-p 00183000 08:02 
131269     /home/oyvind/.javaws/cache/http/D10.0.0.2/P80/DMfun/RNlinux_swt_lib.j
ar/libXm.so
4d5a6000-4d5eb000 r-xp 00000000 08:02 
131297     /home/oyvind/.javaws/cache/http/D10.0.0.2/P80/DMfun/RNlinux_swt_lib.j
ar/libswt-motif-2047.so
4d5eb000-4d5ee000 rw-p 00044000 08:02 
131297     /home/oyvind/.javaws/cache/http/D10.0.0.2/P80/DMfun/RNlinux_swt_lib.j
ar/libswt-motif-2047.so

Local Time = Mon Nov  4 19:11:19 2002
Elapsed Time = 38
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (Blackdown-1.4.1-beta mixed mode)
#
# An error report file has been saved as hs_err_pid1895.log.
# Please refer to the file for further information.
#

Comment 10 Oyvind Harboe CLA 2002-11-04 13:23:48 EST
Please find enclosed information on how to reproduce the problem under 
Linux/SWT and Java Web Start.

I'll be happy to perform other investigations as well, but I wanted to include 
too much rather than too little information in the bugreport.




The running environment of Java Web Start can be subtly different from 
the "java" or "javaw" environment, e.g. if JWS puts up a requester asking if 
you would like to create an icon, then Swing has been used and you must use 
System.exit(0) to quit your program to make sure that process exists(i.e. 
falling the main() function is no longer sufficient).

I have no problems with SWT unless I try to run it from JWS under Linux, and 
hence I am not sure it is possible to remove it from the equation. 

Please find the example SWT Java Web Start application for download at 
http://www.harboe.org/oyvind/swtjws.zip

Instructions for use:

- Install Java Web Start for Linux. Follow either Suns or 
http://www.blackdown.org's instruction.
- unzip swtjws.zip to e.g. /home/foo/swttest
- Modify the fun.jnlp as follows
  codebase="http://10.0.0.2/swtcrash" 
->
  codebase="file:/home/foo/swttest" 
- Enter the following command line:

javaws /home/foo/swttest/fun.jnlp

Øyvind
Comment 11 Oyvind Harboe CLA 2002-11-05 03:10:21 EST
I have not made any progress reproducing the problem outside the Java Web Start 
environment, but I have some other pieces of information. In no particular 
order or theories about their relevance:

- There exists a special security context under Java Web Start.
- Java Web Start overrides or interacts with how e.g. System.loadLibrary() 
works, e.g. it will extract libXm.so from a JAR file.
- The problem is reproduceable with the following command line, which should 
open up a new avenue of debugging

/usr/java/j2re1.4.1/bin/java -Djnlpx.home=/home/oyvind/javaws -
Djnlpx.heapsize=NULL,NULL -Djnlpx.jvm=/usr/java/j2re1.4.1/bin/java -
Djava.security.policy=/home/oyvind/javaws/javaws.policy -
cp /home/oyvind/javaws/javaws.jar:/home/oyvind/javaws/javaws-110n.jar 
com.sun.javaws.Main http://10.0.0.2/fun/fun.jnlp

Extract from http://www.vamphq.com/jwsfaq.html#debug follows:

-------------------------------

Q: How can I debug apps under Web Start? 

Here is a simple solution to debug your app under Web Start: 

C:\Program Files\JavaSoft\JRE\1.3.0_02\bin\javaw.exe
-Xdebug -Dnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,aaddress=8118
"-Djnlpx.home=C:\Program Files\Java Web Start"
"-Djnlpx.heapsize=NULL,NULL"
"-Djnlpx.jvm=C:\Program Files\JavaSoft\JRE\1.3.0_02\bin\javaw.exe"
"-Djava.security.policy=file:C:\Program Files\Java Web Start/javaws.policy"
"-DtrustProxy=true"
-classpath "C:\Program Files\Java Web Sttart\javaws.jar;
        C:\Program Files\Java Web Start\javaws-l10n.jar"
com.sun.javaws.Main http://yourwebserver/your.jnlp

The basic idea in this frightening command line is to start Web Start yourself 
without the help of the native wrapper that hides all these juicy details. To 
make this work at your very own desktop you have to adjust the path settings 
accordingly and attach a debugger. The key is that 

-Xrunjdwp:transport=dt_socket,server=y,aaddress=8118

will make your app wait for a socket connection to port 8118 and you can now 
fire up a debugger that supports remote debugging and attach it to the VM via 
port 8118. 


--------------------------

Comment 12 Oyvind Harboe CLA 2002-11-05 04:14:09 EST
Created attachment 2313 [details]
A small SWT app launched by Java Web Start to reproduce crash under Linux

I have managed to reduce the size of the attachment that is necessary to
reproduce the problem, but it still requireds Java Web Start.

It may be easier to debug, as it can use any swt.jar and .so files on the
machine. 

Instructions:

1. Install Java Web Start
2. Extract the swtjws.zip attachment to e.g. /home/foo/swttest
3. Modify /home/foo/swttest/fun.jnlp as follows:

  codebase="file:/home/oyvind/fun" 
->
  codebase="file:/home/foo/swttest" 

4. REQUIRED! Copy the required swt.jar and libswt*.so files to
/home/foo/swttest(the modified javaws.policy assumes that swt.jar is in the
current directory).
5. Execute the following command line

cd /home/foo/swtttest

6. Verify that all the pieces are in place by running the following command
line that runs the app:

/usr/java/j2re1.4.1/bin/java -cp swt.jar:chatx.jar -Djava.library.path=. Chat

7. You should now see an SWT app window, close it.

8. Run the following command line

/usr/java/j2re1.4.1/bin/java -Djnlpx.home=/home/foo/javaws
-Djnlpx.heapsize=NULL,NULL -Djnlpx.jvm=/usr/java/j2re1.4.1/bin/java 
-Djava.security.policy=./javaws.policy -cp
/home/foo/javaws/javaws.jar:/home/foo/javaws/javaws-110n.jar:./swt.jar 
-Djava.library.path=. com.sun.javaws.Main fun.jnlp

9. The application crashes:


An irrecoverable stack overflow has occurred.

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4CCDEF19
Function=_XtGetPerDisplay+0x9
Library=/usr/X11R6/lib/libXt.so.6

Current Java thread:
	at org.eclipse.swt.internal.motif.OS.XmCreateScrollBar(Native Method)
	- locked <0x488f7608> (a java.lang.Class)
	at
org.eclipse.swt.widgets.Display.initializeComposite(Display.java:1088)
	at org.eclipse.swt.widgets.Display.init(Display.java:1043)
	at org.eclipse.swt.graphics.Device.<init>(Device.java:113)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:319)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:316)
	at Chat.createGUI(Chat.java:50)
	at Chat.run(Chat.java:36)
	at Chat.main(Chat.java:128)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

	at java.lang.reflect.Method.invoke(Method.java:324)
	at com.sun.javaws.Launcher.executeApplication(Launcher.java:778)
	at com.sun.javaws.Launcher.executeMainClass(Launcher.java:740)
	at com.sun.javaws.Launcher.continueLaunch(Launcher.java:625)
	at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:352)
	at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:177)
	at com.sun.javaws.Launcher.run(Launcher.java:145)
	at java.lang.Thread.run(Thread.java:536)

Dynamic libraries:
08048000-0804d000 r-xp 00000000 08:02 930851	 /usr/java/j2re1.4.1/bin/java
0804d000-0804e000 rw-p 00004000 08:02 930851	 /usr/java/j2re1.4.1/bin/java
40000000-40012000 r-xp 00000000 08:02 718085	 /lib/ld-2.2.93.so
40012000-40013000 rw-p 00012000 08:02 718085	 /lib/ld-2.2.93.so
40013000-4001c000 r-xp 00000000 08:02 2530276	
/usr/java/j2re1.4.1/lib/i386/native_threads/libhpi.so
4001c000-4001d000 ---p 00009000 08:02 2530276	
/usr/java/j2re1.4.1/lib/i386/native_threads/libhpi.so
4001d000-4001e000 rw-p 00009000 08:02 2530276	
/usr/java/j2re1.4.1/lib/i386/native_threads/libhpi.so
4001e000-40021000 r--s 00000000 08:02 2170984	
/usr/java/j2re1.4.1/lib/ext/dnsns.jar
40021000-40025000 r-xp 00000000 08:02 1746320	 /usr/X11R6/lib/libXtst.so.6.1
40025000-40026000 rw-p 00004000 08:02 1746320	 /usr/X11R6/lib/libXtst.so.6.1
40026000-40033000 r-xp 00000000 08:02 1844169	 /lib/i686/libpthread-0.10.so
40033000-40036000 rw-p 0000d000 08:02 1844169	 /lib/i686/libpthread-0.10.so
40057000-40059000 r-xp 00000000 08:02 718098	 /lib/libdl-2.2.93.so
40059000-4005a000 rw-p 00001000 08:02 718098	 /lib/libdl-2.2.93.so
4005a000-404be000 r-xp 00000000 08:02 1110419	
/usr/java/j2re1.4.1/lib/i386/client/libjvm.so
404be000-404db000 rw-p 00463000 08:02 1110419	
/usr/java/j2re1.4.1/lib/i386/client/libjvm.so
404eb000-404fd000 r-xp 00000000 08:02 718102	 /lib/libnsl-2.2.93.so
404fd000-404fe000 rw-p 00012000 08:02 718102	 /lib/libnsl-2.2.93.so
40500000-40521000 r-xp 00000000 08:02 1844167	 /lib/i686/libm-2.2.93.so
40521000-40522000 rw-p 00021000 08:02 1844167	 /lib/i686/libm-2.2.93.so
40522000-40531000 r-xp 00000000 08:02 1485730	
/usr/java/j2re1.4.1/lib/i386/libverify.so
40531000-40533000 rw-p 0000e000 08:02 1485730	
/usr/java/j2re1.4.1/lib/i386/libverify.so
40533000-40552000 r-xp 00000000 08:02 1485731	
/usr/java/j2re1.4.1/lib/i386/libjava.so
40552000-40554000 rw-p 0001e000 08:02 1485731	
/usr/java/j2re1.4.1/lib/i386/libjava.so
40554000-40569000 r-xp 00000000 08:02 1485733	
/usr/java/j2re1.4.1/lib/i386/libzip.so
40569000-4056c000 rw-p 00014000 08:02 1485733	
/usr/java/j2re1.4.1/lib/i386/libzip.so
4056c000-41c39000 r--s 00000000 08:02 1485774	 /usr/java/j2re1.4.1/lib/rt.jar

41c7c000-41c93000 r--s 00000000 08:02 1485754	
/usr/java/j2re1.4.1/lib/sunrsasign.jar
41c93000-41d04000 r--s 00000000 08:02 1485756	
/usr/java/j2re1.4.1/lib/jsse.jar
41d04000-41d17000 r--s 00000000 08:02 1485755	
/usr/java/j2re1.4.1/lib/jce.jar41d17000-41fd3000 r--s 00000000 08:02 1485772   
/usr/java/j2re1.4.1/lib/charsets.jar
41ffb000-41ffc000 r-xp 00000000 08:02 522275	
/usr/X11R6/lib/X11/locale/common/xlcUTF8Load.so.2
41ffc000-41ffd000 rw-p 00000000 08:02 522275	
/usr/X11R6/lib/X11/locale/common/xlcUTF8Load.so.2
41ffd000-41fff000 r--s 00000000 08:02 2383381	
/home/oyvind/.javaws/cache/file/D/P-1/DMhome/DMoyvind/DMswttest/RMchatx.jar
42000000-42126000 r-xp 00000000 08:02 1844165	 /lib/i686/libc-2.2.93.so
42126000-4212b000 rw-p 00126000 08:02 1844165	 /lib/i686/libc-2.2.93.so
4c3b3000-4c572000 r--p 00000000 08:02 473365	 /usr/lib/locale/locale-archive

4c572000-4c580000 r--s 00000000 08:02 2170986	
/usr/java/j2re1.4.1/lib/ext/ldapsec.jar
4c585000-4c58e000 r-xp 00000000 08:02 718118	 /lib/libnss_files-2.2.93.so
4c58e000-4c58f000 rw-p 00008000 08:02 718118	 /lib/libnss_files-2.2.93.so
4c793000-4c7b0000 r--s 00000000 08:02 2170983	
/usr/java/j2re1.4.1/lib/ext/sunjce_provider.jar
4c7b0000-4c84f000 r--s 00000000 08:02 2170985	
/usr/java/j2re1.4.1/lib/ext/localedata.jar
4c84f000-4c8e5000 r--s 00000000 08:02 1404178	 /home/oyvind/javaws/javaws.jar

4c8e5000-4c9bd000 r--s 00000000 08:02 816510	 /home/oyvind/swttest/swt.jar
4c9bd000-4cbff000 r-xp 00000000 08:02 1485741	
/usr/java/j2re1.4.1/lib/i386/libawt.so
4cbff000-4cc14000 rw-p 00241000 08:02 1485741	
/usr/java/j2re1.4.1/lib/i386/libawt.so
4cc39000-4ccab000 r-xp 00000000 08:02 1485740	
/usr/java/j2re1.4.1/lib/i386/libmlib_image.so
4ccab000-4ccac000 rw-p 00071000 08:02 1485740	
/usr/java/j2re1.4.1/lib/i386/libmlib_image.so
4ccac000-4ccb2000 r--s 00000000 08:02 1762752	
/usr/lib/gconv/gconv-modules.cache
4ccbf000-4ccc6000 r-xp 00000000 08:02 1746310	 /usr/X11R6/lib/libXp.so.6.2
4ccc6000-4ccc7000 rw-p 00006000 08:02 1746310	 /usr/X11R6/lib/libXp.so.6.2
4ccc7000-4cd15000 r-xp 00000000 08:02 1746318	 /usr/X11R6/lib/libXt.so.6.0
4cd15000-4cd19000 rw-p 0004d000 08:02 1746318	 /usr/X11R6/lib/libXt.so.6.0
4cd19000-4cd21000 r-xp 00000000 08:02 1746288	 /usr/X11R6/lib/libSM.so.6.0
4cd21000-4cd22000 rw-p 00007000 08:02 1746288	 /usr/X11R6/lib/libSM.so.6.0
4cd22000-4cd36000 r-xp 00000000 08:02 1746284	 /usr/X11R6/lib/libICE.so.6.3
4cd36000-4cd37000 rw-p 00013000 08:02 1746284	 /usr/X11R6/lib/libICE.so.6.3
4cd39000-4cd46000 r-xp 00000000 08:02 1746298	 /usr/X11R6/lib/libXext.so.6.4
4cd46000-4cd47000 rw-p 0000c000 08:02 1746298	 /usr/X11R6/lib/libXext.so.6.4
4cd47000-4ce22000 r-xp 00000000 08:02 1746290	 /usr/X11R6/lib/libX11.so.6.2
4ce22000-4ce25000 rw-p 000da000 08:02 1746290	 /usr/X11R6/lib/libX11.so.6.2
4ce25000-4cee5000 r-xp 00000000 08:02 1485743	
/usr/java/j2re1.4.1/lib/i386/libfontmanager.so
4cee5000-4cee6000 ---p 000c0000 08:02 1485743	
/usr/java/j2re1.4.1/lib/i386/libfontmanager.so
4cee6000-4cf0d000 rw-p 000c0000 08:02 1485743	
/usr/java/j2re1.4.1/lib/i386/libfontmanager.so
4cf8e000-4cfaa000 r-xp 00000000 08:02 522273	
/usr/X11R6/lib/X11/locale/common/ximcp.so.2
4cfaa000-4cfac000 rw-p 0001b000 08:02 522273	
/usr/X11R6/lib/X11/locale/common/ximcp.so.2
4d2b2000-4d2f7000 r-xp 00000000 08:02 816506	
/home/oyvind/swttest/libswt-motif-2049.so
4d2f7000-4d2fa000 rw-p 00044000 08:02 816506	
/home/oyvind/swttest/libswt-motif-2049.so
4d2fb000-4d47f000 r-xp 00000000 08:02 816508	
/home/oyvind/swttest/libXm.so.2
4d47f000-4d492000 rw-p 00183000 08:02 816508	
/home/oyvind/swttest/libXm.so.2
Local Time = Tue Nov  5 10:15:04 2002
Elapsed Time = 36
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (Blackdown-1.4.1-beta mixed mode)
#
# An error report file has been saved as hs_err_pid3861.log.
# Please refer to the file for further information.
#
Comment 13 Grant Gayed CLA 2002-11-05 15:11:59 EST
It seems to be related to the previous use of awt widgets.  The following 
snippet causes the same trace to occur without using JWS.

import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import java.awt.*;
import java.awt.event.*;

public class MixAWTandSWT {

	public static void main(String[] args) {
		final Frame frame = new Frame();
		frame.setTitle("awt");
		frame.setSize(200, 200);
			
		java.awt.Button button = new java.awt.Button("Push");
		frame.add(button);
		frame.setVisible(true);
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				frame.dispose();
				Display display = new Display();	// <-- 
dies
				final Shell shell = new Shell();
				shell.setText("swt");
				shell.setBounds(10,10,200,200);
				org.eclipse.swt.widgets.Button swtButton = new 
org.eclipse.swt.widgets.Button(shell,SWT.PUSH);
				swtButton.setText("Push");
				swtButton.addListener(SWT.Selection, new 
org.eclipse.swt.widgets.Listener() {
					public void handleEvent
(org.eclipse.swt.widgets.Event event) {
						shell.dispose();
					}
				});
				shell.open();
				while (!shell.isDisposed()) {
					if (!display.readAndDispatch()) 
display.sleep();
				}
				System.exit(0);
			}
		});
	}
}
Comment 14 Grant Gayed CLA 2002-11-05 15:24:46 EST
I just spoke to Silenio about this and he says that this is a known problem 
with swt on motif.  A conflict of some sort occurs with awt and swt both 
linking to motif libraries.  There is not currently a way to make this work.
Comment 15 Oyvind Harboe CLA 2002-11-05 15:33:25 EST
I tried the MixAWTandSWT program and it produced a crash which AFAICT, is 
identical to the problem I'm seeing.

Q: Is my Solaris version broken as well?

Q: Is this something that will be supported or should I look for ways to rework 
my program?

I haven't gotten my Java Web Start sorted yet, but once I do, I'll check.


Øyvind
Comment 16 Grant Gayed CLA 2002-11-05 16:27:03 EST
I just ran my snippet on Solaris a few times and it seems to work, so you 
probably will not encounter your problem on Solaris.

We would certainly like this to work on linux-motif as well, but I don't know 
if we'll investigate this any time soon, especially since it was already looked 
at in the past.

As a side note, my snippet will work on linux if the gtk version of swt is used 
instead of the motif one.  So you can probably run your stuff on linux if you 
do the same.
Comment 17 Oyvind Harboe CLA 2002-11-06 02:17:21 EST
>As a side note, my snippet will work on linux if the gtk version of swt 
>is used instead of the motif one.  So you can probably run your stuff 
>on linux if you do the same.

I see.

The thing about Java Web Start is that it is supposed to make installation a 
breeze. If I "support" Java Web Start for Linux, but it is hard to get to work, 
then that undermines the whole purpose of using Java Web Start.

It is possible(and much easier) for our users to manually install our 
program than to switch from GNOME/KDE to GTK if they are already using 
GNOME/KDE.

Øyvind

Comment 18 Grant Gayed CLA 2002-11-06 14:41:11 EST
*** Bug 22137 has been marked as a duplicate of this bug. ***
Comment 19 Grant Gayed CLA 2002-11-06 14:43:03 EST
Changing summary to describe underlying problem.
Comment 20 Oyvind Harboe CLA 2002-11-11 10:12:42 EST
I have tried to find a way to launch my Java Web Start appliaction without 
having AWT, but it seems this is not possible.

This effectively makes SWT incompatible with Java Web Start under Linux where 
this bug is reproduceable.


Øyvind
Comment 21 Veronika Irvine CLA 2003-03-28 09:38:13 EST
>It is possible(and much easier) for our users to manually install our 
>program than to switch from GNOME/KDE to GTK if they are already using 
>GNOME/KDE.

Øyvind,
GNOME and KDE are window managers and GTK is a widget set  Both GNOME and KDE 
come with GTK installed.  It is not required that the user change their window 
manager in order to run with GTK.  If they have RedHat 8.0 or SUSE 8.1 
installed (or later versions) then the supported GTK widget set will already 
be installed and just work.

Assigning this bug report to Steve because he is tracking the AWT/SWT 
interaction issues.
Comment 22 Oyvind Harboe CLA 2003-03-28 09:42:27 EST
>>It is possible(and much easier) for our users to manually install our 
>>program than to switch from GNOME/KDE to GTK if they are already using 
>>GNOME/KDE.
>
>Øyvind,
>GNOME and KDE are window managers and GTK is a widget set  Both GNOME and KDE 
>come with GTK installed.  It is not required that the user change their window 
>manager in order to run with GTK.  If they have RedHat 8.0 or SUSE 8.1 
>installed (or later versions) then the supported GTK widget set will already 
>be installed and just work.
>
>Assigning this bug report to Steve because he is tracking the AWT/SWT 
>interaction issues.

I don't understand what the above means. I'm pretty Linux illiterate, but I'd 
like my SWT JWS program to run under Linux out of the box.

My SWT JWS app works like a charm under Solaris.

My clients marching orders are to not support Linux if it doesn't work out of 
the box.



Øyvind
Comment 23 Steve Northover CLA 2003-03-28 10:49:36 EST
It's caused by the way Sun links their VM on Linux.  When this issue gets 
resolved, your code will work.

*** This bug has been marked as a duplicate of 4417 ***