A bug no one talks about: g_object_new: assert

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

A bug no one talks about: g_object_new: assert

pspgen



I use the newest GTK+ installed with MSYS2 and whenever I attempt to use
g_application_send_notification() it always results in the following
assert:


(Notification Project.exe:27780): GLib-GObject-CRITICAL **: g_object_new:
assert
ion 'G_TYPE_IS_OBJECT (object_type)' failed


Why I think it is a bug - because I tried many code samples beside mines
(they are all quite like mines anyway), of people who got it working
(including notifaction by Lars Uebernickel) and it all makes the same
lament.
Assert, followed by crash. Now I really don't know what this means, as it
is probably within gtk internals, but I really hope some of you might have
a clue or experience with this.


install (GNU coreutils) 8.25
GIO version 2.52.3
mingw32/mingw-w64-i686-gtk-engine-unico 1.0.2-2 [installed]
mingw32/mingw-w64-i686-gtk3 3.22.16-1 [installed]
mingw32/mingw-w64-i686-gtkmm3 3.22.0-1 [installed]
mingw32/mingw-w64-i686-spice-gtk 0.33-1 [installed]
mingw32/mingw-w64-i686-webkitgtk3 2.4.11-4 [installed]
mingw64/mingw-w64-x86_64-gtk-engine-unico 1.0.2-2 [installed]
mingw64/mingw-w64-x86_64-gtk3 3.22.16-1 [installed]
mingw64/mingw-w64-x86_64-gtkmm3 3.22.0-1 [installed]
mingw64/mingw-w64-x86_64-spice-gtk 0.33-1 [installed]
mingw64/mingw-w64-x86_64-webkitgtk3 2.4.11-4 [installed]




-------------------------------------

П.П. Знаеш, ли че в СуперХостинг.БГ предлагат цялостно хостинг решение за твоя сайт? Виж повече на www.superhosting.bg.  
 https://www.superhosting.bg/web-hosting-compare-hosting-plans.php?utm_source=mail.bg&utm_medium=footer&utm_content=v2&utm_campaign=webhosting
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: A bug no one talks about: g_object_new: assert

Arnaud
Hi !

On 09/26/2017 10:24 PM, [hidden email] wrote:
> (Notification Project.exe:27780): GLib-GObject-CRITICAL **: g_object_new:
> assertion 'G_TYPE_IS_OBJECT (object_type)' failed

What it means is that, during a call to g_object_new
(https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-new),
a type was checked with G_TYPE_IS_OBJECT
(https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#G-TYPE-IS-OBJECT:CAPS).
The code expected to see a GObject type, but it didn't, hence the
assertion failure.

The most, most likely error here is from the library caller (aka you):
you must be passing wrong pointers.

You say you're using g_application_send_notification (), so have a look
at the manual here:

   
https://developer.gnome.org/gio/stable/GApplication.html#g-application-send-notification

Look closely at the types GApplication and GNotification (section Object
Hierarchy): they're both objects derived from a GObject. So when you
invoke g_application_send_notification (), you can be sure that the
implementation will validate the pointers here and there, and ensure
they're GObject pointers.

While I can't solve your error, I can advice you to double-check the
pointers you're passing. Are you sure it's not NULL pointers ? Are you
sure they're initialized ? How did you obtain these pointers ?

Hope this helps, good luck !

  Arnaud

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list