JDK-6959165 : JVM crash during execution FileDialogBufferOverflowTest.html
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2010-06-07
  • Updated: 2011-01-19
  • Resolved: 2010-06-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b100Fixed
Related Reports
Relates :  
Relates :  
Description
see comments

Comments
SUGGESTED FIX --- old/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c 2010-06-11 20:08:38.000000000 +0400 +++ new/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c 2010-06-11 20:08:38.000000000 +0400 @@ -52,11 +52,15 @@ { if (dialog != NULL) { + fp_gdk_threads_enter(); + fp_gtk_widget_hide (dialog); fp_gtk_widget_destroy (dialog); fp_gtk_main_quit (); dialog = NULL; + + fp_gdk_threads_leave(); } } @@ -162,7 +166,6 @@ (*env)->GetJavaVM(env, &jvm); } - fp_gdk_threads_init(); fp_gdk_threads_enter(); const char *title = (*env)->GetStringUTFChars(env, jtitle, 0);
11-06-2010

EVALUATION The actual problem is that the quit() method lacks gtk synchronization. It calls gtk_widget_hide() etc., but doesn't invoke gdk_threads_enter() prior to that. If the synchronization is in place, the JVM doesn't crash, and the test passes.
11-06-2010

EVALUATION Some observations: 1. The getLocationOnScreen() method of the gtk file dialog returns the (0, 0) point of the main screen. It should probably retrieve the location from gtk instead. 2. The GtkFileDialogPeer and its native counter-part consider that the FileDialog is kind of a singletone. E.g. there's static GtkWidget *dialog = NULL; in the src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c. 3. If the dialog is disposed prior to exiting from the test, the test doesn't crash. 4. If I turn the test to a main test (i.e. @run main ..., and add a corresponding main() mathod that would do new FileDialogBufferOverflowTest().start();) the test always passes. So this may be related to the appletviewer/jtreg machinery somehow.
11-06-2010

EVALUATION The test sometimes passes, sometimes showing the dialog in a very weird size/location. Sometimes it crashes with a stack different from the initally reported one: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0xa70655b4, pid=26336, tid=2769611664 # # JRE version: 7.0 # Java VM: Java HotSpot(TM) Server VM (17.0-b03 mixed mode linux-x86 ) # Problematic frame: # C [libatk-1.0.so.0+0xc5b4] atk_registry_get_factory_type+0x24 # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Stack: [0xa50fe000,0xa514f000], sp=0xa514d6c0, free space=13da514d064k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libatk-1.0.so.0+0xc5b4] atk_registry_get_factory_type+0x24 [error occurred during error reporting (printing native stack), id 0xb] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j sun.awt.X11.GtkFileDialogPeer.run(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z)V+0 j sun.awt.X11.GtkFileDialogPeer.access$100(Lsun/awt/X11/GtkFileDialogPeer;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z)V+10 j sun.awt.X11.GtkFileDialogPeer$1.run()V+64 v ~StubRoutines::call_stub #20 <signal handler called> No symbol table info available. #21 0xa70655b4 in atk_registry_get_factory_type () from /usr/lib/libatk-1.0.so.0 No symbol table info available. #22 0xa7065612 in atk_registry_get_factory () from /usr/lib/libatk-1.0.so.0 No symbol table info available. #23 0xa7362a4d in ?? () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. #24 0xa7356b89 in gtk_widget_get_accessible () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. #25 0xa71ddf5e in ?? () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. #26 0xa6e98518 in g_object_newv () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #27 0xa6e990bf in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #28 0xa6e99250 in g_object_new () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #29 0xa71cd674 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. #30 0xa71e3b69 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. #31 0xa6e98518 in g_object_newv () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #32 0xa6e990bf in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #33 0xa6e99250 in g_object_new () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #34 0xa71df825 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. #35 0xa6e98518 in g_object_newv () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #36 0xa6e990f1 in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #37 0xa6e99250 in g_object_new () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #38 0xa71df2ff in ?? () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. #39 0xa71df3bf in gtk_file_chooser_dialog_new () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. #40 0xa7a79b3c in Java_sun_awt_X11_GtkFileDialogPeer_run ()
08-06-2010

EVALUATION Looks like a regresison of 6913179 (The java.awt.FileDialog should use native GTK file chooser on linux distros).
08-06-2010