Community
Participate
Working Groups
When I am running widgets like ControlExample or HelloWorld with Argument: "-DSWT_GTK3=1" it works fine, whereas when I try running Eclipse Application with this argument I am getting run-time errors and Eclipse Application crashed: (Eclipse:21440): GLib-GObject-WARNING **: cannot register existing type `GdkDisplayManager' (Eclipse:21440): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed (Eclipse:21440): GLib-GObject-CRITICAL **: g_type_register_static: assertion `parent_type > 0' failed (Eclipse:21440): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed (Eclipse:21440): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed Errors are triggered after this line: Display.CreateDisplay(DeviceData) line 920: if (!OS.gtk_init_check (new long /*int*/ [] {0}, null)) { Any help is highly appreciated!
To run eclipse you need to set the environment variable "SWT_GTK3" instead of the java system property. This is necessary because the eclipse launcher cannot check java system properties to decide whether it should load GTK2 or GTK3. If running that host eclipse, just type this in the command line: export SWT_GTK3=1 eclipse When self-hosting a inner Eclipse use the "Environment" tab in the Run Configuration dialog to add the var.
(In reply to comment #1) > To run eclipse you need to set the environment variable "SWT_GTK3" instead > of the java system property. This is necessary because the eclipse launcher > cannot check java system properties to decide whether it should load GTK2 or > GTK3. > > If running that host eclipse, just type this in the command line: > > export SWT_GTK3=1 > eclipse > > When self-hosting a inner Eclipse use the "Environment" tab in the Run > Configuration dialog to add the var. Thank you for your response Silenio, unfortunately it does not solve the problem: When I put Environmental variable and Run from Eclipse it still gives me same errors, whereas when I do export and run eclipse, it just launches Eclipse on GTK2.
Which eclipse build are you using? You need at least I20121113-0800.
(In reply to comment #3) > Which eclipse build are you using? You need at least I20121113-0800. My eclipse build is: M20120914-1800, but I am building SWT myself, and everything except of Eclipse Application is running successfully. I have tried exporting SWT_GTK3, I have tried putting as an Environmental Variable in Run Configuration -DSWT_GTK3=1. ControlExample works fine, whereas Eclipse Application brings this GdkDisplayManager error
Eclipse will not work unless you have a new 4.3 build (>=I20121113-0800). You need the fix I did for bug#393681. This fix will not be ported back to 4.2 maintenance builds. It is possible to run on older builds, but you have to specify the "-noSplash" option when launching eclipse. This can be done in the Run Configuration dialog, Arguments tab, Program Arguments.
(In reply to comment #5) > Eclipse will not work unless you have a new 4.3 build (>=I20121113-0800). > You need the fix I did for bug#393681. This fix will not be ported back to > 4.2 maintenance builds. > > It is possible to run on older builds, but you have to specify the > "-noSplash" option when launching eclipse. This can be done in the Run > Configuration dialog, Arguments tab, Program Arguments. Thanks Silenio "-noSplash" works perfectly!
Great!