Bug 560 - Gears applet crashes if close button clicked on detached applet (messaging a dead object)
Summary: Gears applet crashes if close button clicked on detached applet (messaging a ...
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: applet (show other bugs)
Version: 2
Hardware: All macosx
: --- major
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2012-03-05 21:16 CET by david_durrence
Modified: 2012-05-01 09:22 CEST (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
4e0eb391d6c64f956ea5c87c0385ab48a24b2175
Workaround: ---


Attachments
Mac OS X crash log (93.12 KB, application/octet-stream)
2012-03-05 21:16 CET, david_durrence
Details

Note You need to log in before you can comment on or make changes to this bug.
Description david_durrence 2012-03-05 21:16:10 CET
Created attachment 332 [details]
Mac OS X crash log

When the Gears applet is detached, clicking the close button on the applet's frame will lead to a crash due to messaging a dead object.

* STEPS TO REPRODUCE
1) Load the following URL in Safari: http://jogamp.org/deployment/jogamp-current/jogl-applet-runner-newt-gears-normal-launcheronly.html
2) Click the applet to give the applet focus
3) Press/release the r key (this will detach the applet)
4) Close the applet window by click the red window button

* RESULTS
Java crashes:
* BACKTRACE ('>' indicates stack frame used for CrashTracer aggregation)

   1 libobjc.A.dylib                0x99ae8d47 objc_msgSend + 0x17
>  2 libnewt.jnilib                 0x18011a94 Java_jogamp_newt_driver_macosx_MacWindow_lockSurface0 + 0x44
   3                                0x0380b9d9 0 + 58767833
   4                                0x03a6288c 0 + 61221004
   5                                0x03801374 0 + 58725236
   6 libclient.dylib                0x0039e6a7 JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 0x0 (/SourceCache/JavaJDK16Dev/JavaJDK16-402/hotspot/src/share/vm/runtime/javaCalls.cpp:416)
   7 libclient.dylib                0x0039e419 os::os_exception_wrapper(void (*)(JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 0x0 (/SourceCache/JavaJDK16Dev/JavaJDK16-402/hotspot/src/os/macosx/vm/os_macosx.cpp:2539)
   8 libclient.dylib                0x003aa8e9 JavaCalls::call_virtual(JavaValue*, KlassHandle, symbolHandle, symbolHandle, JavaCallArguments*, Thread*) + 0x0 (/SourceCache/JavaJDK16Dev/JavaJDK16-402/hotspot/src/share/vm/runtime/javaCalls.cpp:321)
   9 libclient.dylib                0x003aa7dd JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, symbolHandle, symbolHandle, Thread*) + 0x0 (/SourceCache/JavaJDK16Dev/JavaJDK16-402/hotspot/src/share/vm/runtime/javaCalls.cpp:223)
  10 libclient.dylib                0x003aa75b thread_entry(JavaThread*, Thread*) + 0x0 (/SourceCache/JavaJDK16Dev/JavaJDK16-402/hotspot/src/share/vm/prims/jvm.cpp:2649)
  11 libclient.dylib                0x003aa5b5 JavaThread::thread_main_inner() + 0x0 (/SourceCache/JavaJDK16Dev/JavaJDK16-402/hotspot/src/share/vm/runtime/thread.cpp:1654)
  12 libclient.dylib                0x003aa3f3 JavaThread::run() + 0x0 (/SourceCache/JavaJDK16Dev/JavaJDK16-402/hotspot/src/share/vm/runtime/thread.cpp:1631)
  13 libclient.dylib                0x0031437c java_start + 0x0 (/SourceCache/JavaJDK16Dev/JavaJDK16-402/hotspot/src/os/macosx/vm/os_macosx.cpp:773)
  14 libsystem_c.dylib              0x9226ced9 _pthread_start + 0x14f
  15 libsystem_c.dylib              0x922706de thread_start + 0x22
Comment 1 Julien Gouesse 2012-03-15 22:39:56 CET
Hi

What do you mean by "a crash due to messaging a dead object"?
Comment 2 Sven Gothel 2012-03-18 16:08:53 CET
Dank you David, looks interesting, ie. not taking care of the 'NEWT' lifecycle when 'pulling the Applet'.

Will look at it later ..
Comment 3 Sven Gothel 2012-05-01 09:22:16 CEST
Fixed w/ JOGL commit 4e0eb391d6c64f956ea5c87c0385ab48a24b2175