Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » OpenSolaris: Eclipse/SWT hangs in GTK OS call when trying to change fonts
OpenSolaris: Eclipse/SWT hangs in GTK OS call when trying to change fonts [message #506643] Fri, 08 January 2010 08:33
Andreas Loew is currently offline Andreas Loew
Messages: 1
Registered: January 2010
Junior Member
Hi Eclipse community,

on my brand new OpenSolaris build 129 x64 installation, Eclipse IDE hangs when trying to change fonts (Window - Preferences - General - Appearance - Colors and Fonts, then clicking the "Edit" button to change e.g. the CVS console font) or colors. I think this hang happens when trying to open a standard GTK font or color chooser.

Most surprisingly (although I would expect the exact same event handler being configured for both actions), when double-clicking on the currently configured font name/color instead of using the "Edit" button, there is no hang and the GTK font and/or color chooser opens up just fine...!?

I have tried with the plain Eclipse 3.5.1 package from eclipse.org/downloads as well as with the 3.4.2 build available from the opensolaris.org/dev repository, and also with both the most recent 1.6.0_17 and 1.5.0_22 JDKs and the client as well as the server JVM.

While the main thread is hung, I am getting the following jstack and pstack traces (full thread stacks: see attachments):

"main" prio=3 tid=0x0806fc00 nid=0x2 runnable [0xfe27e000]
java.lang.Thread.State: RUNNABLE
at org.eclipse.swt.internal.gtk.OS.Call(Native Method)
at org.eclipse.swt.widgets.Display.sleep(Display.java:3893)
at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java :364)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2406)

----------------- lwp# 1 / thread# 1 --------------------
feea4fc5 lwp_wait (2, 8046c94)
fee9bc6c _thrp_join (2, 0, 8046d00, 1) + 63
fee9bdbb thr_join (2, 0, 8046d00) + 23
08058be3 ContinueInNewThread (8052260, 50000, 0, 80475a8, 8047560) + 4f
08051f59 main (19, 806c108, 80476a8) + aa1
0805142a _start (1f, 80477b4, 80477d3, 80477db, 80477e4, 80477f9) + 7a
----------------- lwp# 2 / thread# 2 --------------------
feea49e5 pollsys (94c4ec0, 2, fe27de08, 0)
fee48814 poll (94c4ec0, 2, 64, da4732a4, db58151c) + 4c
da4732bc g_poll (94c4ec0, 2, 64, db581690, 0, fe27de78) + 24
d5432acb Java_org_eclipse_swt_internal_gtk_OS_Call__IIII (806fd10, fe27deb8, da473298, 94c4ec0, 2, 64) + 17


As the hang does only happen when using the "Edit" button, but not when double-clicking on the configured font/color, am I correct in assumin that I am more likely hitting a bug in the Eclipse SWT rather than in OpenSolaris GTK infrastructure!?

Interestingly, I have also tried with Eclipse 3.5.1 on the official Open Solaris 2009.06 osol_111b build (running from the live DVD), and opening the font dialog works fine here even through the "Edit" buttons with JVM 1.6.0_13.

Please find the stack traces on OpenSolaris builds 129 and 111b attached.

It's most interesting that while on build 111b, the whole font dialog processing (using the exact same Eclipse 3.5.1 binaries) runs from within one single thread (thread#1/lwp#1), the same thing in 129 uses two threads: thread#1/lwp#1 uses ContinueInNewThread to spawn thread#2/lwp#2.

Maybe this dynamic thread creation is unexpected behavior from the SWT perspective and causes the hang!?

Many thanks for looking into this & best regards,

Andreas

Java stack trace on b129:

"main" prio=3 tid=0x0806fc00 nid=0x2 runnable [0xfe27e000]
   java.lang.Thread.State: RUNNABLE
	at org.eclipse.swt.internal.gtk.OS.Call(Native Method)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:3893)
	at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:364)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2406)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
 
 
Native pstack trace on b129:

-----------------  lwp# 1 / thread# 1  --------------------
 feea4fc5 lwp_wait (2, 8046c94)
 fee9bc6c _thrp_join (2, 0, 8046d00, 1) + 63
 fee9bdbb thr_join (2, 0, 8046d00) + 23
 08058be3 ContinueInNewThread (8052260, 50000, 0, 80475a8, 8047560) + 4f
 08051f59 main     (19, 806c108, 80476a8) + aa1
 0805142a _start   (1f, 80477b4, 80477d3, 80477db, 80477e4, 80477f9) + 7a
-----------------  lwp# 2 / thread# 2  --------------------
 feea49e5 pollsys  (94c4ec0, 2, fe27de08, 0)
 fee48814 poll     (94c4ec0, 2, 64, da4732a4, db58151c) + 4c
 da4732bc g_poll   (94c4ec0, 2, 64, db581690, 0, fe27de78) + 24
 d5432acb Java_org_eclipse_swt_internal_gtk_OS_Call__IIII (806fd10, fe27deb8, da473298, 94c4ec0, 2, 64) + 17
 fb00a032 ???????? (db5e2830, fb0080f9, 64, 2, 94c4ec0, da473298)
 fb002f69 ???????? (0, 1, 1, eb521a50, da473298, 2)
 fb002e61 ???????? (0, eb3732f0, f9380570, f9376d60, fe27df54, db4859a5)
 fb00308d ???????? (f9376d60, fe27df80, dcc648a3, fe27dfb0, dcc6edd0, 0)
 fb002f69 ???????? (0, f9414688, f9376d60, fe27dfb4, dbd5595d, fe27dfe0)
 fb002f69 ???????? (f9376d60, eb3ac2c0, fe27dfe4, dba8399d, fe27e010, dba85870)
 fb00308d ???????? (f92c2cf8, eb3ac2c0, fe27e014, dbbcec6e, fe27e064, dbbdb3c0)
 fb003569 ???????? (0, 0, 0, 0, 0, 0)
 fb00308d ???????? (0, f92c2cf8, eb3ac278, fe27e09c, dc3dda88, fe27e0cc)
 fb00308d ???????? (f92337e0, f92c2cf8, f9233840, f9233840, f9233868, 1)
 fb1ac3c4 ???????? ()
 
================================================================================================================== 

Java stack trace on b111b:

"main" prio=3 tid=0x080d2800 nid=0x1 runnable [0x08046000..0x08047a08]
   java.lang.Thread.State: RUNNABLE
	at org.eclipse.swt.internal.gtk.OS._gtk_dialog_run(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_dialog_run(OS.java:5834)
	at org.eclipse.swt.widgets.FontDialog.open(FontDialog.java:174)
	at org.eclipse.ui.internal.themes.ColorsAndFontsPreferencePage.editFont(ColorsAndFontsPreferencePage.java:1618)
	at org.eclipse.ui.internal.themes.ColorsAndFontsPreferencePage.access$12(ColorsAndFontsPreferencePage.java:1613)
	at org.eclipse.ui.internal.themes.ColorsAndFontsPreferencePage$7.widgetSelected(ColorsAndFontsPreferencePage.java:1025)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:211)
	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
 
 
Native pstack trace on b111b:

-----------------  lwp# 1 / thread# 1  --------------------
 feed1d15 pollsys  (a1899b0, 9, 8046878, 0)
 fee77834 poll     (a1899b0, 9, 63, fe952b16) + 4c
 fe952f43 g_main_context_iterate (808c658, 1, 1, 809bf10) + 43b
 fe9535f1 g_main_loop_run (a2ab3e8, 0, 8046978, faef7552) + 1dd
 faef766d gtk_dialog_run (98bc2a0, 0, e87822f0, d6cdbde8, 80469a0) + 159
 d6cdbdfa Java_org_eclipse_swt_internal_gtk_OS__1gtk_1dialog_1run (80d2914, 80469dc, 98bc2a0, e86628a3, 80469e0, 80469b4) + 1e
 f7e099af ???????? (e878eaa8, f7e07ef9, 98bc2a0, 80469e8, e874af4c, 8046a18)
 f7e02ea9 ???????? (0, 0, 98bc2a0, 8046a1c, e9b9ba65, 8046a78)
 f7e02ea9 ???????? (0, 0, 0, 0, 0, 0)
 f7e02e67 ???????? (0, d9bbeb58, d97da8b8, d96ab118, d9b9f020, 8046ab8)
 f7e02fcd ???????? (d96ab118, d9b9f020, 8046ae8, e9b992e0, 8046b18, e9b99568)
 f7e02fcd ???????? (d96ab118, d9bbeb18, d9ba2230, 8046b1c, e887c1af, 8046b4c)
 f7e034a9 ???????? (d9bbeb18, d9bbeab8, d9ba2240, 808c65c, 0, 1)
 f81100c4 ???????? (d7c56538, d7c56534, 3, d6cd5224, e8790bd0, d991bd48)
 f81bd134 ???????? (e864b0b6, 8046c04, e87f9368, 0, e864b0d0, 0)
 f81b8114 ???????? (f7e02e67, f7e02da1, d99150d0, 8046c2c, e8632473, 8046c60)
 f7e02da1 ???????? (0, d96ab118, d9ba4c08, d9ba4a68, 8046c64, e863239d)
 f7e02fcd ???????? (d9ba4a68, 8046c90, e9b46e03, 8046cc0, e9b51338, 0)
 f7e02ea9 ???????? (0, d9ba4cf8, d9ba4a68, 8046cc4, e8e8bac5, 8046cf0)
 f7e02ea9 ???????? (d9ba4a68, d9873300, 8046cf4, e8c04885, 8046d20, e8c06740)
 f7e02fcd ???????? (d9ba4d68, d9873300, 8046d24, e8d4612e, 8046d74, e8d52868)
 f7e034a9 ???????? (0, 0, 0, 0, 0, 0)
 f7e02fcd ???????? (0, d9ba4d68, d98cabf8, 8046dac, e9b31858, 8046ddc)
 f7e02fcd ???????? (d9b96ff8, d9ba4d68, d9b96fe8, ffffffff, ffffff1c, ffffff77)
 f81100c4 ???????? (d7c529e8, d7c529e4, 3, d6cd5224, 0, d991bd48)
 f81bd134 ???????? (0, e86d2278, 8046eb0, f7e02da1, 8046eb0, f7e02da1)
 f81b8114 ???????? (8046ee0, f7e02fcd, f7e02da1, d99150d0, 8046ec0, e869267d)
 f7e02da1 ???????? (0, d96ab118, d9705f08, d9705e38, 8046ef8, e869241d)
 f7e02fcd ???????? (0, 0, d99a0648, d99a07d8, d99a07c8, d9705ee8)
 f7e02ea9 ???????? (d9705e38, 0, d9705f30, 8046f84, e8a736cb, 8046fb0)
 f7e02ea9 ???????? (d9705e38, d9705f18, 8046fb4, e8a70750, 8046fe8, e8a728f8)
 f7e034a9 ???????? (0, 0, d9705f18, d9705f40, 8046fec, e868e526)
 f7e02fcd ???????? (d9705f30, d9705f58, d96ab118, 8047020, e867f1de, 804704c)
 f7e02ea9 ???????? (d9705f58, d96ab118, 8047050, e8604670, 8047094, e867f3f0)
 f7e02ea9 ???????? (0, 0, 0, 0, d96aba48, d96ab118)
 f7e03343 ???????? (0, 0, d9665eb0, d96aba40, 0, d9280010)
 f7e03343 ???????? (0, 0, 0, 0, d96abb38, 8047120)
 f7e02e67 ???????? (0, 0, 0, 0, d96abb38, 804715c)
 f7e02e67 ???????? (1, 0, 804718c, e7f9b99b, 80471d4, e7fa3748)
 f7e02e67 ???????? (0, 0, 0, 0, 0, 0)
 f7e002c7 ???????? (8047220, 804752c, a, e7f9c9c8, f7e08da0, 80474a0)
 fa09e30f __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (8047528, 80472f8, 804749c, 80d2800) + 1a3
 fa09e163 __1cCosUos_exception_wrapper6FpFpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v2468_v_ (fa09e16c, 8047528, 80472f8, 804749c, 80d2800) + 27
 fa09e133 __1cJJavaCallsEcall6FpnJJavaValue_nMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (8047528, 80d2fec, 804749c, 80d2800) + 2f
 fa2ef116 __1cKReflectionGinvoke6FnTinstanceKlassHandle_nMmethodHandle_nGHandle_bnOobjArrayHandle_nJBasicType_4bpnGThread__pnHoopDesc__ (80d2fe8, 80d2fec, 80d2fdc, 0, 80d2fe4, c) + bde
 fa0fcbc3 __1cKReflectionNinvoke_method6FpnHoopDesc_nGHandle_nOobjArrayHandle_pnGThread__2_ (d7dd9a20, 80d2fdc, 80d2fe0, 80d2800) + 197
 fa0fc794 JVM_InvokeMethod (80d2914, 80477b8, 80477b4, 80477b0) + 20c
 fa52e8c7 Java_sun_reflect_NativeMethodAccessorImpl_invoke0 (80d2914, 80477a8, 80477b8, 80477b4, 80477b0, 0) + 27
 f7e099af ???????? (e7f2c998, f7e07f16, d9020208, e7fa02a8, d90201b8, 80477bc)
 f7e02e67 ???????? (0, d9020208, e7fa02a8, d90202b0, 80477f4, e7f2cd4a)
 f7e02e67 ???????? (d9020208, e7fa02a8, d90202c8, 8047828, e7c41ef5, 8047870)
 f7e03343 ???????? (0, 0, 0, 0, 0, 0)
 f7e02e67 ???????? (0, d90201b8, e7fa02a8, d8ff2de0, 0, e7f253c8)
 f7e02fcd ???????? (d8ff2e28, d8ff2d48, d8ff2e38, d8ff2ce0, 80478f8, e7f20808)
 f7e02fcd ???????? (0, 0, 0, 0, d8ff2e38, d8ff2ce0)
 f7e002c7 ???????? (8047980, 8047b9c, a, e7f21368, f7e08da0, 8047a84)
 fa09e30f __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (8047b98, 8047a54, 8047a80, 80d2800) + 1a3
 fa09e163 __1cCosUos_exception_wrapper6FpFpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v2468_v_ (fa09e16c, 8047b98, 8047a54, 8047a80, 80d2800) + 27
 fa09e133 __1cJJavaCallsEcall6FpnJJavaValue_nMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (8047b98, 80d2fd0, 8047a80, 80d2800) + 2f
 fa0a9d6a __1cUjni_invoke_nonstatic6FpnHJNIEnv__pnJJavaValue_pnI_jobject_nLJNICallType_pnK_jmethodID_pnSJNI_ArgumentPusher_pnGThread__v_ (80d2914, 8047b98, 80d3b7c, 1, 814fc1c, 8047ba4) + 34a
 fa0df68d jni_CallIntMethod (80d2914, 80d3b7c, 814fc1c, 80d3b74) + 159
 fedb6ce1 startJavaJNI (8064fe0, 80c4ca8, 80cf8f8, 80650a0, 8047cb8) + 2b1
 fedb8168 startJavaVM (8064fe0, 80c4ca8, 80cf8f8, 80650a0) + 24
 fedb3423 run      (1, 8064fb0, 8064d24, 8047d14) + 487
 08051cd7 main     (9, 8064fb0, 8047d40, 8047d2c) + 32f
 080518ed _start   (1, 80650f8, 0, 8047e04, 8064970, 8047ea3) + 7d
  

[Updated on: Fri, 08 January 2010 08:54]

Report message to a moderator

Previous Topic:Application Menu bar disappears when used OLEControlSite
Next Topic:non-transparent image transfer
Goto Forum:
  


Current Time: Thu Jul 24 02:43:49 EDT 2014

Powered by FUDForum. Page generated in 0.01453 seconds