Zeljko, some advice please ?
In my app (not Lazarus) I see a problem where a thread cannot reliably get a handle to another form. So, a form that is about to exit, spins off a thread that asks for the handle to another form. It may work, it may crash (lots of Gtk3 messages below).
I believe that the problem is creating the handle, not using it.
I 'seem' to be able to fix the problem (for me) by getting a handle to the other form earlier (and not doing anything with it) in the closing form's code, not in the thread.
I cannot replicate this problem is a simple demo, indeed, changing a number of things in my app appears to help but it still happens. Code in question has been working fine in all other widget sets for some time.
When I step through the code, I hit a spot that completely locks up my session and requires me to login to another terminal and kill Lazarus.
Have you seen any issues like this, getting Form handles ?
When the error happens I see this in the console -
Gtk:ERROR:../../../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
Bail out! Gtk:ERROR:../../../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
**
Gtk:ERROR:../../../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
Bail out! Gtk:ERROR:../../../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
And when I try to get the handle (wether it works or not) I see -
(tomboy-ng:2234691): GLib-GObject-[1;35mCRITICAL[0m **: [34m19:50:52.993[0m: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(tomboy-ng:2234691): GLib-GObject-[1;33mWARNING[0m **: [34m19:50:52.993[0m: invalid unclassed pointer in cast to 'GObject'
(tomboy-ng:2234691): GLib-GObject-[1;35mCRITICAL[0m **: [34m19:50:52.993[0m: g_object_freeze_notify: assertion 'G_IS_OBJECT (object)' failed
(tomboy-ng:2234691): Gtk-[1;35mCRITICAL[0m **: [34m19:50:52.993[0m: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed
(tomboy-ng:2234691): Gtk-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: gtk_widget_get_receives_default: assertion 'GTK_IS_WIDGET (widget)' failed
(tomboy-ng:2234691): GLib-GObject-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(tomboy-ng:2234691): Gtk-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: gtk_widget_get_display: assertion 'GTK_IS_WIDGET (widget)' failed
(tomboy-ng:2234691): Gdk-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
(tomboy-ng:2234691): Gdk-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed
(tomboy-ng:2234691): Gdk-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed
(tomboy-ng:2234691): Gdk-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed
(tomboy-ng:2234691): GLib-GObject-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(tomboy-ng:2234691): GLib-GObject-[1;33mWARNING[0m **: [34m19:50:52.994[0m: invalid unclassed pointer in cast to 'GObject'
(tomboy-ng:2234691): GLib-GObject-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: g_object_notify: assertion 'G_IS_OBJECT (object)' failed
(tomboy-ng:2234691): Gtk-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed
(tomboy-ng:2234691): GLib-GObject-[1;33mWARNING[0m **: [34m19:50:52.994[0m: invalid unclassed pointer in cast to 'GObject'
(tomboy-ng:2234691): GLib-GObject-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: g_object_thaw_notify: assertion 'G_IS_OBJECT (object)' failed
(tomboy-ng:2234691): GLib-GObject-[1;35mCRITICAL[0m **: [34m19:50:52.994[0m: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Looks pretty grim but we both know how wordy GTK is.
Davo