Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Somebody ruins my project - glib critical when starting java/swt app
icon9.gif  Somebody ruins my project - glib critical when starting java/swt app [message #1403089] Mon, 21 July 2014 10:11 Go to next message
Thomas Barth is currently offline Thomas Barth
Messages: 6
Registered: July 2014
Junior Member
Hi,
I cant start my Java/SWT Application (SWT libs 4.4) anymore on Ubuntu 14.04 and Debian 7.4. The error message is:

tbarth@ubuntu14:~$ javaws h t t p : / /myaddress.de/myprogram.jnlp
(java:16730): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplayManager'

(java:16730): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(java:16730): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed


The error messages I get on Ubuntu 12.04 are much larger:

(java:3461): GLib-GObject-WARNING **: specified instance size for type `SwtFixed' is smaller than the parent type's `GtkContainer' instance size

(java:3461): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(java:3461): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(java:3461): GLib-GObject-WARNING **: specified instance size for type `SwtTextRenderer' is smaller than the parent type's `GtkCellRendererText' instance size

(java:3461): GLib-GObject-WARNING **: specified instance size for type `SwtPixbufRenderer' is smaller than the parent type's `GtkCellRendererPixbuf' instance size

(java:3461): GLib-GObject-WARNING **: specified instance size for type `SwtToggleRenderer' is smaller than the parent type's `GtkCellRendererToggle' instance size

(SWT:3461): GLib-GObject-WARNING **: cannot register existing type `GtkWidget'

(SWT:3461): GLib-GObject-WARNING **: cannot add class private field to invalid type '<invalid>'

(SWT:3461): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(SWT:3461): GLib-GObject-WARNING **: cannot register existing type `GtkBuildable'

(SWT:3461): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion `G_TYPE_IS_INTERFACE (interface_type)' failed

(SWT:3461): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(SWT:3461): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(SWT:3461): Gtk-CRITICAL **: gtk_widget_get_window: assertion `GTK_IS_WIDGET (widget)' failed

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x80d339b4, pid=3461, tid=2190068544
#
# JRE version: Java(TM) SE Runtime Environment (8.0_11-b12) (build 1.8.0_11-b12)
# Java VM: Java HotSpot(TM) Server VM (25.11-b03 mixed mode linux-x86 )
# Problematic frame:
# C  [libgdk-3.so.0+0x259b4]  gdk_window_get_type+0x424
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again


When I start the application in the browser the window just closes without any messages. But I still can start the application with Eclipse without errors!

Who s responsible for this? SWT People? Oracle with new Java? GTK People? I think this will be the end of my project that was working good in the past years. But now I have to find a provider, who can take over my projekt with another os independent technology. I m astonished that Eclipse Luna still can start without a problem.




[Updated on: Mon, 21 July 2014 11:24]

Report message to a moderator

Re: Somebody ruins my project - glib critical when starting java/swt app [message #1403144 is a reply to message #1403089] Mon, 21 July 2014 17:04 Go to previous messageGo to next message
Thomas Barth is currently offline Thomas Barth
Messages: 6
Registered: July 2014
Junior Member
Ok, it s a swt problem. When I sign my application again with swt 4.2.2 libs I can start my JavaWebstart/SWT application without problems on Ubuntu 14.04! The reason why I signed my application with swt 4.4 was, that some of my users reported problems since their last java update on windows 8.1! They just can tell me, that it s not working properly anymore, but I cant test it on win 8.1, because I only have Win 7. But on Win 7 everything is ok. And I had the hope that thier problems get resolved with newer swt libs. I am still waiting for their feedback, but no new complaints so far.

What can I do now to get the devs informed about the problem? Starting a bug report or is this forum also be read by the devs?

[Updated on: Mon, 21 July 2014 17:15]

Report message to a moderator

Re: Somebody ruins my project - glib critical when starting java/swt app [message #1403247 is a reply to message #1403144] Tue, 22 July 2014 15:30 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
Messages: 192
Registered: January 2012
Senior Member

With SWT in 4.4 they moved to using GTK 3 by default. It's possible you're hitting a situation where GTK 2 libraries have already been loaded, which causes a known problem.

You can force SWT to use GTK 2 either by using the launcher option --launcher.GTK_version as documented in the runtime options page (but that will only work if the JNLP invokes the launcher / the executable), or you can also set
SWT_GTK3=0
as an environment variable. It looks like you can also set
SWT_GTK3=0
as a system property too, but you'll have problems if you use the WebKit browser as it only seems to check the environment variable.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Somebody ruins my project - glib critical when starting java/swt app [message #1403302 is a reply to message #1403247] Tue, 22 July 2014 18:34 Go to previous messageGo to next message
Thomas Barth is currently offline Thomas Barth
Messages: 6
Registered: July 2014
Junior Member
Hello Brian, I dont get the errors when starting eclipse luna and I dont get the errors when starting my application with eclipse altough swt 4.4 is imported in workspace. I only get the errors when using javaws to start my application signed with swt 4.4. The variable SWT_GTK doesnt have an effect. As I can see the option --launcher.GTK_version is for ecplipse only.
Re: Somebody ruins my project - glib critical when starting java/swt app [message #1403312 is a reply to message #1403302] Tue, 22 July 2014 20:35 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
Messages: 192
Registered: January 2012
Senior Member

Thomas Barth wrote on Tue, 22 July 2014 14:34
Hello Brian, I don't get the errors when starting eclipse luna and I don't get the errors when starting my application with eclipse although swt 4.4 is imported in workspace.


Sorry, I should have been more explicit. That Eclipse bug describes a situation where the IDE instance was updated from Kepler to Luna. SWT only supported GTK2 in Kepler, whereas Luna supports GTK2 and GTK3. When the updated IDE went to restart, the executable (the eclipse.exe) was already bound to the GTK2 libraries, resulting in an error when SWT tried to bind to GTK3 -- the Eclipse restart is not a true restart.

You might have a similar situation if JNLP is binding to GTK2; does it show a splash screen perhaps?

You wouldn't see this problem with the IDE or when launching your app from the debugger as nothing will be binding to GTK2.

Quote:
I only get the errors when using javaws to start my application signed with swt 4.4. The variable SWT_GTK doesnt have an effect. As I can see the option --launcher.GTK_version is for eclipse only.


Note that it's SWT_GTK3.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Somebody ruins my project - glib critical when starting java/swt app [message #1403354 is a reply to message #1403312] Wed, 23 July 2014 07:47 Go to previous messageGo to next message
Thomas Barth is currently offline Thomas Barth
Messages: 6
Registered: July 2014
Junior Member

Quote:

You might have a similar situation if JNLP is binding to GTK2; does it show a splash screen perhaps?


When using javaws I see the splash of Java and then the download window for the jar files for a second. Then the GLib errors in the console.



Quote:

Note that it's SWT_GTK3.

Yes, I meant SWT_GTK3.

Ok, I continue to use swt 4.2.2.

Next step for me is to test my application on Windows 8.1. Yesterday evening I ordered it just for testing, I will get it on Friday. All my users with Windows 8 and Java7/8 report that it is not working properly, but without exact error descriptions. I already know what to do next weekend...

3 Billion devices running Java and one developer using a desktop application for business? Smile
Re: Somebody ruins my project - glib critical when starting java/swt app [message #1403358 is a reply to message #1403354] Wed, 23 July 2014 08:14 Go to previous message
Thomas Barth is currently offline Thomas Barth
Messages: 6
Registered: July 2014
Junior Member
Quote:

3 Billion devices running Java and one developer using a desktop application for business? Smile


Ah, I know an Online-Broker who offers a trading-software with the same technology (Java/SWT). It would be a disaster if this technology wont work on Windows 8. I really hope, that just MY application has an "error" that I can correct.

[Updated on: Wed, 23 July 2014 08:15]

Report message to a moderator

Previous Topic:Failed to create Ole Client
Next Topic:[Browser] Fix or workaround for wrong user agent HTTP header in embedded IE10?
Goto Forum:
  


Current Time: Thu Oct 30 15:23:11 GMT 2014

Powered by FUDForum. Page generated in 0.01859 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software