Coder Social home page Coder Social logo

Comments (7)

bilelmoussaoui avatar bilelmoussaoui commented on June 19, 2024

Have some Gtk assertions "bugs"

(terminix:5533): Gtk-CRITICAL **: gtk_label_set_text_with_mnemonic: assertion 'str != NULL' failed

(terminix:5533): Gtk-CRITICAL **: gtk_label_set_text_with_mnemonic: assertion 'str != NULL' failed

(terminix:5533): GLib-CRITICAL **: g_variant_get_int64: assertion 'g_variant_is_of_type (value, G_VARIANT_TYPE_INT64)' failed

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

Thanks, the third one about INT64 has been fixed, it was actually causing a crash on some platforms. I'm working on resolving the others and getting to the point where it runs clean.

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

I'm inclined to think that the gtk_window_get_default_widget and gtk_window_set_default messages a bug in GTK 3.18.6-2 as they don't happen in older version (RHEL 7.2) or newer versions (Rawhide). They don't seem to be causing any stability so closing this issue.

For information purposes, below is the stack trace when this occurs:

#0  0x00007ffff1d5e64b in g_logv () from /usr/lib/libglib-2.0.so.0
#1  0x00007ffff1d5e7bf in g_log () from /usr/lib/libglib-2.0.so.0
#2  0x00007fffeddb9f64 in gtk_window_get_default_widget () from /usr/lib/libgtk-3.so.0
#3  0x00007fffedcbc6d6 in ?? () from /usr/lib/libgtk-3.so.0
#4  0x00007ffff1224015 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#5  0x00007ffff1235b9c in ?? () from /usr/lib/libgobject-2.0.so.0
#6  0x00007ffff123edfc in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#7  0x00007ffff123f12f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#8  0x00007fffeddad530 in gtk_widget_map () from /usr/lib/libgtk-3.so.0
#9  0x00007fffeddb01e7 in gtk_widget_set_parent () from /usr/lib/libgtk-3.so.0
#10 0x00007fffeddc21f7 in ?? () from /usr/lib/libgtk-3.so.0
#11 0x00007fffedcbc7ad in ?? () from /usr/lib/libgtk-3.so.0
#12 0x00007ffff1227117 in g_cclosure_marshal_VOID__OBJECTv () from /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff1224244 in ?? () from /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff123ea46 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#15 0x00007ffff123f12f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#16 0x00007fffedd9f439 in ?? () from /usr/lib/libgtk-3.so.0
#17 0x00007fffedb61007 in ?? () from /usr/lib/libgtk-3.so.0
#18 0x00007fffedd9f4e2 in ?? () from /usr/lib/libgtk-3.so.0
#19 0x00007fffedd9f4e2 in ?? () from /usr/lib/libgtk-3.so.0
#20 0x00007fffedb61007 in ?? () from /usr/lib/libgtk-3.so.0
#21 0x00007fffedd9f4e2 in ?? () from /usr/lib/libgtk-3.so.0
#22 0x00007fffedb61007 in ?? () from /usr/lib/libgtk-3.so.0
#23 0x00007fffedd9f4e2 in ?? () from /usr/lib/libgtk-3.so.0
#24 0x00007fffedc9c6c2 in ?? () from /usr/lib/libgtk-3.so.0
#25 0x00007fffedd9f4e2 in ?? () from /usr/lib/libgtk-3.so.0
#26 0x00007fffedda2433 in ?? () from /usr/lib/libgtk-3.so.0
#27 0x00007fffeddb01aa in gtk_widget_set_parent () from /usr/lib/libgtk-3.so.0
#28 0x00007fffedb63777 in ?? () from /usr/lib/libgtk-3.so.0
#29 0x00007ffff1227117 in g_cclosure_marshal_VOID__OBJECTv () from /usr/lib/libgobject-2.0.so.0
#30 0x00007ffff1224244 in ?? () from /usr/lib/libgobject-2.0.so.0
#31 0x00007ffff123ea46 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#32 0x00007ffff123f12f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#33 0x00007fffedba6b95 in gtk_container_add () from /usr/lib/libgtk-3.so.0
#34 0x00000000008bb634 in gtk.Container.Container.add(gtk.Widget.Widget) (this=0x7ffff7f2e800, widget=0x7ffff7ee3800) at ../../GtkD/src/gtk/Container.d:310
#35 0x000000000083ac7a in gx.terminix.session.Session.insertTerminal(gx.terminix.terminal.terminal.Terminal, gx.terminix.terminal.terminal.Terminal, gtkc.gtktypes.GtkOrientation, int) (this=0x7ffff7f2e800, child=2, orientation=<incomplete type>, src=0x7fffdbc02000, dest=0x7fffdbc00000) at source/gx/terminix/session.d:349
#36 0x000000000083a7ad in gx.terminix.session.Session.onTerminalRequestSplit(gx.terminix.terminal.terminal.Terminal, gtkc.gtktypes.GtkOrientation) (this=0x7ffff7f2e800, 
    orientation=<incomplete type>, terminal=0x7fffdbc00000) at source/gx/terminix/session.d:245

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

This one has been bugging me for a long time and as part of the drive towards 1.0 I took another look at this. The good news is that I finally managed to track down what is causing it.

The GTKPopover calls the get and set default widget methods in map/unmap events. Normally this is not an issue, however because when you split the terminal the session unparents and then parents the terminal it causes all widgets in the terminal, including the displayed popover, to go through a unmap/map cycle causing these messages.

If you do the split through a keyboard shortcut, these error messages don't appear.

Here's the relevant code in gtkpopover.c

static void
gtk_popover_map (GtkWidget *widget)
{
  GtkPopoverPrivate *priv = GTK_POPOVER (widget)->priv;

  priv->prev_default = gtk_window_get_default_widget (priv->window);
  if (priv->prev_default)
    g_object_ref (priv->prev_default);

  GTK_WIDGET_CLASS (gtk_popover_parent_class)->map (widget);

  gdk_window_show (gtk_widget_get_window (widget));
  gtk_popover_update_position (GTK_POPOVER (widget));

  gtk_window_set_default (priv->window, priv->default_widget);
}

static void
gtk_popover_unmap (GtkWidget *widget)
{
  GtkPopoverPrivate *priv = GTK_POPOVER (widget)->priv;

  priv->button_pressed = FALSE;

  gdk_window_hide (gtk_widget_get_window (widget));
  GTK_WIDGET_CLASS (gtk_popover_parent_class)->unmap (widget);

  if (gtk_window_get_default_widget (priv->window) == priv->default_widget)
    gtk_window_set_default (priv->window, priv->prev_default);
  g_clear_object (&priv->prev_default);
}

The bad news is I haven't been able to fix it so far, I've tried explicitly hiding the popover, deferring the action via addIdle and processing events before triggering the split but no luck. However, now that I know what the issue is I'm optimistic about putting this one to rest. I'll ping the IRC channel in the morning about this as well, I'm wondering if this is a gtk+ bug in the sense that it should check if the window is available first.

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

Opened GTK+ bug for this:

https://bugzilla.gnome.org/show_bug.cgi?id=766323

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

A patch has been attached to the bug report in GTK and I don't see any way to work around it on my end so closing this as a GTK bug.

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

This has been fixed in GTK 3.20.6

from tilix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.