GtkMenuButton not working on macOS

2023-05-01T23:00:00Z
Hi,
I think that there is a bug in GTK4 on macOS. Or is it GLib?
This small test app works fine on my Ubuntu machine, but not on macOS 13.3.1. I am using GTK 4.10.3 via Homebrew.

The callback:

 void
mutate_to_type(GSimpleAction *simple_action,  GVariant *parameter, gpointer user_data) 

seem not be be invoked.

On quitting the app, I get a number of these message:

(app:75898): GLib-CRITICAL **: 05:58:50.205: g_hash_table_lookup: assertion ‘hash_table != NULL’ failed


#include <iostream>
#include <string>
#include <gtk/gtk.h>


void print_hello_callback(GtkWidget *widget, gpointer user_data) {

   std::cout << "Hello" << std::endl;
}

void
mutate_to_type(GSimpleAction *simple_action,
               GVariant *parameter,
               gpointer user_data) {

   if (parameter) {
      gchar *result;
      g_variant_get(parameter, "s", &result);
      std::string ss(result);
      std::cout << "mutate_to type parameter " << ss << std::endl;
   } else {
     std::cout << "Null parameter" << std::endl;
   }
}


void quit_callback(GtkWindow *window) {
   gtk_window_close(window);
}

inline GMenuModel* menu_model_from_builder(const std::string& m_name, GtkBuilder *builder) {
   GMenuModel *m = G_MENU_MODEL(gtk_builder_get_object(builder, m_name.c_str()));
   return m;
}

void setup_menubuttons(GtkBuilder *builder, GtkApplication *app) {

   GObject *mutate_menubutton = gtk_builder_get_object(builder, "mutate_button");

   GMenuModel *mutate_menu = menu_model_from_builder("mutate-menu", builder);
   gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(mutate_menubutton), mutate_menu);

   std::string action_name = "mutate_to_type";
   GSimpleAction *simple_action = g_simple_action_new(action_name.c_str(), G_VARIANT_TYPE_STRING);
   g_action_map_add_action(G_ACTION_MAP(app), G_ACTION(simple_action));
   g_signal_connect(simple_action, "activate", G_CALLBACK(mutate_to_type), NULL);

}

void activate (GtkApplication* app,
               gpointer        user_data) {

   GtkBuilder *builder = gtk_builder_new();
   gtk_builder_add_from_file(builder, "builder.ui", NULL);

   GObject *window = gtk_builder_get_object(builder, "window");
   gtk_window_set_application(GTK_WINDOW(window), app);

   GObject *button_1 = gtk_builder_get_object(builder, "button_1");
   g_signal_connect(button_1, "clicked", G_CALLBACK(print_hello_callback), NULL);

   GObject *quit_button = gtk_builder_get_object(builder, "quit_button");
   g_signal_connect_swapped(quit_button, "clicked", G_CALLBACK(quit_callback), window);

   setup_menubuttons(builder, app);

   gtk_widget_set_visible(GTK_WIDGET(window), TRUE);
}

int
main (int    argc, char **argv) {

   GtkApplication *app = gtk_application_new ("org.gtk.example", G_APPLICATION_DEFAULT_FLAGS);
   g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
   int status = g_application_run(G_APPLICATION (app), argc, argv);
   g_object_unref(app);
   return status;

}

Here is the builder.ui file:

<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk+" version="4.0"/>

  <menu id="mutate-menu">
    <section>
      <item>
        <attribute name="label" translatable="no">ALA (A)</attribute>
        <attribute name="action">app.mutate_to_type</attribute>
        <attribute name="target">ALA</attribute>
      </item>
      <item>
        <attribute name="label" translatable="no">ARG (R)</attribute>
        <attribute name="action">app.mutate_to_type</attribute>
        <attribute name="target">ARG</attribute>
      </item>
      <item>
        <attribute name="label" translatable="no">ASN (N)</attribute>
        <attribute name="action">app.mutate_to_type</attribute>
        <attribute name="target">ASN</attribute>
      </item>
      <item>
        <attribute name="label" translatable="no">ASP (D)</attribute>
        <attribute name="action">app.mutate_to_type</attribute>
        <attribute name="target">ASP</attribute>
      </item>
    </section>
  </menu>

  <object id="window" class="GtkWindow">
    <property name="title">Grid</property>
    <child>
      <object id="grid" class="GtkGrid">
        <child>
          <object id="button_1" class="GtkButton">
            <property name="label">Button 1</property>
            <layout>
              <property name="column">0</property>
              <property name="row">0</property>
            </layout>
          </object>
        </child>
        <child>
          <object id="mutate_button" class="GtkMenuButton">
            <property name="label">Mutate</property>
            <signal name="activate" handler="on_mutate_button_activate"/>
            <layout>
              <property name="column">1</property>
              <property name="row">0</property>
            </layout>
          </object>
        </child>
        <child>
          <object id="quit_button" class="GtkButton">
            <property name="label">Quit</property>
            <layout>
              <property name="column">0</property>
              <property name="row">1</property>
              <property name="column-span">2</property>
            </layout>
          </object>
        </child>
      </object>
    </child>
  </object>
</interface>

Is there something that I can do in my code that will help identify the problem?

Thanks,

Paul.

Hello, Paul!

Can you run your application under either gdb or lldb with G_DEBUG=fatal-criticals:

G_DEBUG=fatal-criticals gdb ./application
gdb> run

It should pause right when the critical is thrown, then type bt in gdb to print a backtrace of the call stack

Thank you lb90.

In retrospect the title of this post is wrong. It is the menu (GMenuModel)item action that is failing, not the MenuButton.

I fear that this environment variable didn’t give us anything useful because there is no reaction (and no GLIB-Critical message) when I press the menu item. The GLib-CRITICAL warnings only occur when I press the “Quit” button. Note that the number of these warnings is related to the number of times I press the menu items - mores presses means more warnings. Might it be that the menu item callbacks are being delayed until the appliction exits? Might it be that g_hash_table_lookup is failing because the hash table has been deleted before the signal callback is executed?

One extra data point that might be useful. Yesterday in frustration I sat their just clicking menu item thinking “why won’t you connect!?” - and after about 15 clicks it did connect! - all the menu items in that menu connected and the text was written to the terminal as hoped. They all stayed connect until I quit. I restarted and found that if I clicked on the menu items somewhere between 5 to 20 times, then the items would be connectd to their callback.

I also attach the crash report that I didn’t sent to Apple. This occurs when I have G_DEBUG set and merely click the “Quit” button.

Regards,

Paul

phemius coot/git/gtk4-application-mini-test% lldb ./app
(lldb) target create "./app"
Current executable set to '/Users/pemsley/Projects/coot/git/gtk4-application-mini-test/app' (x86_64).
(lldb) run
Process 14318 launched: '/Users/pemsley/Projects/coot/git/gtk4-application-mini-test/app' (x86_64)
2023-05-05 05:55:51.205439+0100 app[14318:424255] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=14318
2023-05-05 05:55:51.205569+0100 app[14318:424255] SecTaskCopyDebugDescription: app[14318]/0#-1 LF=0

(app:14318): GLib-CRITICAL **: 05:56:18.241: g_hash_table_lookup: assertion 'hash_table != NULL' failed
Process 14318 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
    frame #0: 0x0000000100e1feb9 libglib-2.0.0.dylib`_g_log_abort + 22
libglib-2.0.0.dylib`:
->  0x100e1feb9 <+22>: addq   $0x8, %rsp
    0x100e1febd <+26>: popq   %rbx
    0x100e1febe <+27>: popq   %rbp
    0x100e1febf <+28>: retq   
Target 0: (app) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
  * frame #0: 0x0000000100e1feb9 libglib-2.0.0.dylib`_g_log_abort + 22
    frame #1: 0x0000000100e1f9db libglib-2.0.0.dylib`g_logv + 986
    frame #2: 0x0000000100e1f597 libglib-2.0.0.dylib`g_log + 120
    frame #3: 0x0000000100e0829a libglib-2.0.0.dylib`g_hash_table_lookup + 277
    frame #4: 0x00000001008baa64 libgtk-4.1.dylib`gtk_action_muxer_get_group + 13
    frame #5: 0x000000010092fbb8 libgtk-4.1.dylib`on_window_unmap_cb + 29
    frame #6: 0x00000001001d8cf7 libgobject-2.0.0.dylib`g_closure_invoke + 205
    frame #7: 0x00000001001ed6c2 libgobject-2.0.0.dylib`signal_emit_unlocked_R + 1448
    frame #8: 0x00000001001ee39c libgobject-2.0.0.dylib`g_signal_emit_valist + 1865
    frame #9: 0x00000001001eeaa0 libgobject-2.0.0.dylib`g_signal_emit + 120
    frame #10: 0x000000010089a87b libgtk-4.1.dylib`gtk_widget_unmap + 138
    frame #11: 0x00000001008ae293 libgtk-4.1.dylib`gtk_window_hide + 32
    frame #12: 0x00000001008aa950 libgtk-4.1.dylib`gtk_window_destroy + 98
    frame #13: 0x00000001008aa877 libgtk-4.1.dylib`gtk_window_close + 64
    frame #14: 0x0000000100002db5 app`quit_callback(window=0x0000000102109b20) at app.cc:29:4
    frame #15: 0x00000001001d8ec6 libgobject-2.0.0.dylib`_g_closure_invoke_va + 218
    frame #16: 0x00000001001ee031 libgobject-2.0.0.dylib`g_signal_emit_valist + 990
    frame #17: 0x00000001001eeaa0 libgobject-2.0.0.dylib`g_signal_emit + 120
    frame #18: 0x0000000100729435 libgtk-4.1.dylib`_gtk_marshal_VOID__INT_DOUBLE_DOUBLEv + 192
    frame #19: 0x00000001001d8ec6 libgobject-2.0.0.dylib`_g_closure_invoke_va + 218
    frame #20: 0x00000001001ee031 libgobject-2.0.0.dylib`g_signal_emit_valist + 990
    frame #21: 0x00000001001eeaa0 libgobject-2.0.0.dylib`g_signal_emit + 120
    frame #22: 0x00000001007b905b libgtk-4.1.dylib`gtk_gesture_click_end + 119
    frame #23: 0x00000001001dbe75 libgobject-2.0.0.dylib`g_cclosure_marshal_VOID__BOXEDv + 166
    frame #24: 0x00000001001d8ec6 libgobject-2.0.0.dylib`_g_closure_invoke_va + 218
    frame #25: 0x00000001001ee031 libgobject-2.0.0.dylib`g_signal_emit_valist + 990
    frame #26: 0x00000001001eeaa0 libgobject-2.0.0.dylib`g_signal_emit + 120
    frame #27: 0x00000001007b607a libgtk-4.1.dylib`_gtk_gesture_check_recognized + 55
    frame #28: 0x00000001007b7674 libgtk-4.1.dylib`gtk_gesture_handle_event + 495
    frame #29: 0x00000001007ba5d4 libgtk-4.1.dylib`gtk_gesture_single_handle_event + 575
    frame #30: 0x000000010078f2b7 libgtk-4.1.dylib`gtk_event_controller_handle_event + 235
    frame #31: 0x000000010089ce93 libgtk-4.1.dylib`gtk_widget_run_controllers + 208
    frame #32: 0x000000010089d08e libgtk-4.1.dylib`_gtk_widget_captured_event + 186
    frame #33: 0x00000001007eaaab libgtk-4.1.dylib`gtk_propagate_event_internal + 182
    frame #34: 0x00000001007e9f47 libgtk-4.1.dylib`gtk_main_do_event + 2014
    frame #35: 0x00000001008b1609 libgtk-4.1.dylib`surface_event + 12
    frame #36: 0x00000001009d3f75 libgtk-4.1.dylib`_gdk_marshal_BOOLEAN__POINTERv + 122
    frame #37: 0x0000000100a0e45e libgtk-4.1.dylib`gdk_surface_event_marshallerv + 146
    frame #38: 0x00000001001d8ec6 libgobject-2.0.0.dylib`_g_closure_invoke_va + 218
    frame #39: 0x00000001001ee031 libgobject-2.0.0.dylib`g_signal_emit_valist + 990
    frame #40: 0x00000001001eeaa0 libgobject-2.0.0.dylib`g_signal_emit + 120
    frame #41: 0x0000000100a0da54 libgtk-4.1.dylib`gdk_surface_handle_event + 313
    frame #42: 0x00000001009dd62c libgtk-4.1.dylib`gdk_macos_event_source_dispatch + 43
    frame #43: 0x0000000100e18c64 libglib-2.0.0.dylib`g_main_context_dispatch + 273
    frame #44: 0x0000000100e18f4c libglib-2.0.0.dylib`g_main_context_iterate + 433
    frame #45: 0x0000000100e18fa4 libglib-2.0.0.dylib`g_main_context_iteration + 55
    frame #46: 0x000000010100b707 libgio-2.0.0.dylib`g_application_run + 521
    frame #47: 0x0000000100003172 app`main(argc=1, argv=0x00007ff7bfeff658) at app.cc:76:17
    frame #48: 0x00007ff81b7bc41f dyld`start + 1903
(lldb)
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               app [14701]
Path:                  /Users/USER/*/app
Identifier:            app
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        tcsh [1062]
Responsible:           Terminal [676]
User ID:               501

Date/Time:             2023-05-05 06:16:00.4357 +0100
OS Version:            macOS 13.3.1 (22E772610a)
Report Version:        12
Bridge OS Version:     7.4 (20P4252)
Anonymous UUID:        ACD48C51-1132-D51B-B4B9-0D9F89706305

Sleep/Wake UUID:       E552CD0E-91D1-4F32-94A7-2FD9F24F4582

Time Awake Since Boot: 36000 seconds
Time Since Wake:       20214 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000002, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [14701]

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libglib-2.0.0.dylib           	       0x101b7deb9 _g_log_abort + 22
1   libglib-2.0.0.dylib           	       0x101b7d9db g_logv + 986
2   libglib-2.0.0.dylib           	       0x101b7d597 g_log + 120
3   libglib-2.0.0.dylib           	       0x101b6629a g_hash_table_lookup + 277
4   libgtk-4.1.dylib              	       0x101618a64 gtk_action_muxer_get_group + 13
5   libgtk-4.1.dylib              	       0x10168dbb8 on_window_unmap_cb + 29
6   libgobject-2.0.0.dylib        	       0x100f36cf7 g_closure_invoke + 205
7   libgobject-2.0.0.dylib        	       0x100f4b6c2 signal_emit_unlocked_R + 1448
8   libgobject-2.0.0.dylib        	       0x100f4c39c g_signal_emit_valist + 1865
9   libgobject-2.0.0.dylib        	       0x100f4caa0 g_signal_emit + 120
10  libgtk-4.1.dylib              	       0x1015f887b gtk_widget_unmap + 138
11  libgtk-4.1.dylib              	       0x10160c293 gtk_window_hide + 32
12  libgtk-4.1.dylib              	       0x101608950 gtk_window_destroy + 98
13  libgtk-4.1.dylib              	       0x101608877 gtk_window_close + 64
14  app                           	       0x100d60db5 quit_callback(_GtkWindow*) + 21 (app.cc:29)
15  libgobject-2.0.0.dylib        	       0x100f36ec6 _g_closure_invoke_va + 218
16  libgobject-2.0.0.dylib        	       0x100f4c031 g_signal_emit_valist + 990
17  libgobject-2.0.0.dylib        	       0x100f4caa0 g_signal_emit + 120
18  libgtk-4.1.dylib              	       0x101487435 _gtk_marshal_VOID__INT_DOUBLE_DOUBLEv + 192
19  libgobject-2.0.0.dylib        	       0x100f36ec6 _g_closure_invoke_va + 218
20  libgobject-2.0.0.dylib        	       0x100f4c031 g_signal_emit_valist + 990
21  libgobject-2.0.0.dylib        	       0x100f4caa0 g_signal_emit + 120
22  libgtk-4.1.dylib              	       0x10151705b gtk_gesture_click_end + 119
23  libgobject-2.0.0.dylib        	       0x100f39e75 g_cclosure_marshal_VOID__BOXEDv + 166
24  libgobject-2.0.0.dylib        	       0x100f36ec6 _g_closure_invoke_va + 218
25  libgobject-2.0.0.dylib        	       0x100f4c031 g_signal_emit_valist + 990
26  libgobject-2.0.0.dylib        	       0x100f4caa0 g_signal_emit + 120
27  libgtk-4.1.dylib              	       0x10151407a _gtk_gesture_check_recognized + 55
28  libgtk-4.1.dylib              	       0x101515674 gtk_gesture_handle_event + 495
29  libgtk-4.1.dylib              	       0x1015185d4 gtk_gesture_single_handle_event + 575
30  libgtk-4.1.dylib              	       0x1014ed2b7 gtk_event_controller_handle_event + 235
31  libgtk-4.1.dylib              	       0x1015fae93 gtk_widget_run_controllers + 208
32  libgtk-4.1.dylib              	       0x1015fb08e _gtk_widget_captured_event + 186
33  libgtk-4.1.dylib              	       0x101548aab gtk_propagate_event_internal + 182
34  libgtk-4.1.dylib              	       0x101547f47 gtk_main_do_event + 2014
35  libgtk-4.1.dylib              	       0x10160f609 surface_event + 12
36  libgtk-4.1.dylib              	       0x101731f75 _gdk_marshal_BOOLEAN__POINTERv + 122
37  libgtk-4.1.dylib              	       0x10176c45e gdk_surface_event_marshallerv + 146
38  libgobject-2.0.0.dylib        	       0x100f36ec6 _g_closure_invoke_va + 218
39  libgobject-2.0.0.dylib        	       0x100f4c031 g_signal_emit_valist + 990
40  libgobject-2.0.0.dylib        	       0x100f4caa0 g_signal_emit + 120
41  libgtk-4.1.dylib              	       0x10176ba54 gdk_surface_handle_event + 313
42  libgtk-4.1.dylib              	       0x10173b62c gdk_macos_event_source_dispatch + 43
43  libglib-2.0.0.dylib           	       0x101b76c64 g_main_context_dispatch + 273
44  libglib-2.0.0.dylib           	       0x101b76f4c g_main_context_iterate + 433
45  libglib-2.0.0.dylib           	       0x101b76fa4 g_main_context_iteration + 55
46  libgio-2.0.0.dylib            	       0x101d69707 g_application_run + 521
47  app                           	       0x100d61172 main + 114 (app.cc:76)
48  dyld                          	    0x7ff81b7bc41f start + 1903


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000001  rcx: 0x0000000000000002  rdx: 0x000000000000011d
  rdi: 0x0000000000000001  rsi: 0x0000000000000000  rbp: 0x00007ff7bf19fe10  rsp: 0x00007ff7bf19fe00
   r8: 0x0000000000000000   r9: 0x000000000000007f  r10: 0x0000000000001d00  r11: 0x00006000002d26b8
  r12: 0x0000000000000001  r13: 0x0000000000000008  r14: 0x0000000000000001  r15: 0x0000000000000008
  rip: 0x0000000101b7deb9  rfl: 0x0000000000000202  cr2: 0x0000000101b9b34d
  
Logical CPU:     2
Error Code:      0x00000000 
Trap Number:     3

Binary Images:
       0x100d5e000 -        0x100d61fff app (*) <d7a5d7fe-d0bf-303d-9f37-8ed1b429ffa3> /Users/USER/*/app
       0x101473000 -        0x1019bafff libgtk-4.1.dylib (*) <94c2fb7e-d734-39c6-a0c6-0aac2a8bc8a7> /usr/local/Cellar/gtk4/4.10.3_1/lib/libgtk-4.1.dylib
       0x100dd1000 -        0x100de0fff libpangocairo-1.0.0.dylib (*) <4df52f04-52ce-3f30-a5af-8715756581d8> /usr/local/Cellar/pango/1.50.14/lib/libpangocairo-1.0.0.dylib
       0x100e51000 -        0x100e90fff libpango-1.0.0.dylib (*) <02f12a61-b843-3ed2-818a-78fc5bfe9791> /usr/local/Cellar/pango/1.50.14/lib/libpango-1.0.0.dylib
       0x100fc1000 -        0x101078fff libharfbuzz.0.dylib (*) <2b757ed1-ea59-336e-9669-bd72ce3bd6fb> /usr/local/Cellar/harfbuzz/7.1.0/lib/libharfbuzz.0.dylib
       0x100ead000 -        0x100ec8fff libgdk_pixbuf-2.0.0.dylib (*) <b104a8d6-10b3-3edc-a57b-e2ca9475b035> /usr/local/Cellar/gdk-pixbuf/2.42.10_1/lib/libgdk_pixbuf-2.0.0.dylib
       0x100df5000 -        0x100dfcfff libcairo-gobject.2.dylib (*) <685a37ae-1bad-3631-9e40-c2764c16f8ce> /usr/local/Cellar/cairo/1.16.0_5/lib/libcairo-gobject.2.dylib
       0x1011da000 -        0x1012a1fff libcairo.2.dylib (*) <25c2f452-1c0d-38d0-bb98-6165ff6de2ca> /usr/local/Cellar/cairo/1.16.0_5/lib/libcairo.2.dylib
       0x100e09000 -        0x100e18fff libgraphene-1.0.0.dylib (*) <2810c082-31fa-3878-97fb-dca971f4ea1b> /usr/local/Cellar/graphene/1.10.8/lib/libgraphene-1.0.0.dylib
       0x101cdf000 -        0x101dfefff libgio-2.0.0.dylib (*) <dc8df2ae-cbc1-39bf-bb7d-75baf25bdc85> /usr/local/Cellar/glib/2.76.2/lib/libgio-2.0.0.dylib
       0x100f2f000 -        0x100f66fff libgobject-2.0.0.dylib (*) <795cd6a5-ecbd-30c4-8dc6-96905b51a619> /usr/local/Cellar/glib/2.76.2/lib/libgobject-2.0.0.dylib
       0x101b3f000 -        0x101c2afff libglib-2.0.0.dylib (*) <77c470e0-3a19-3ecf-b513-bd1fd984d1d9> /usr/local/Cellar/glib/2.76.2/lib/libglib-2.0.0.dylib
       0x100e29000 -        0x100e34fff libintl.8.dylib (*) <47917c4d-5a51-3544-832c-68c3c83a35a3> /usr/local/Cellar/gettext/0.21.1/lib/libintl.8.dylib
       0x100dbc000 -        0x100dbffff libgmodule-2.0.0.dylib (*) <53c7ecaa-44f0-3be2-824b-4dc60af931fe> /usr/local/Cellar/glib/2.76.2/lib/libgmodule-2.0.0.dylib
       0x100f03000 -        0x100f1efff libfribidi.0.dylib (*) <53222c75-56d4-3606-9117-889175d466da> /usr/local/Cellar/fribidi/1.0.12/lib/libfribidi.0.dylib
       0x1012e2000 -        0x101345fff libepoxy.0.dylib (*) <422f48b1-7476-3110-a08c-5ece9b639b7a> /usr/local/Cellar/libepoxy/1.5.10/lib/libepoxy.0.dylib
       0x1010d5000 -        0x1010f8fff libpng16.16.dylib (*) <ccd54d05-fd84-3c69-b87e-16f2796a4e2b> /usr/local/Cellar/libpng/1.6.39/lib/libpng16.16.dylib
       0x1013ea000 -        0x10144dfff libtiff.6.dylib (*) <6cb1ef3a-ffed-38a3-ab47-cdc0edf1171f> /usr/local/Cellar/libtiff/4.5.0/lib/libtiff.6.dylib
       0x101e7f000 -        0x101f06fff libjpeg.8.2.2.dylib (*) <2834d0c4-c865-3dfa-9e72-f4acb0a7e3cc> /usr/local/Cellar/jpeg-turbo/2.1.5.1/lib/libjpeg.8.2.2.dylib
       0x101109000 -        0x101120fff libcairo-script-interpreter.2.dylib (*) <ffe2a9a3-7330-304a-a795-312b9cfce3d6> /usr/local/Cellar/cairo/1.16.0_5/lib/libcairo-script-interpreter.2.dylib
       0x101f23000 -        0x101faafff libpcre2-8.0.dylib (*) <595ce1fa-34bc-323a-ac22-3319bbb45522> /usr/local/Cellar/pcre2/10.42/lib/libpcre2-8.0.dylib
       0x100f83000 -        0x100f8efff libpangoft2-1.0.0.dylib (*) <16fcaf70-0660-384a-960b-bcf49dcb4c2a> /usr/local/Cellar/pango/1.50.14/lib/libpangoft2-1.0.0.dylib
       0x101177000 -        0x1011aafff libfontconfig.1.dylib (*) <cbce272c-2597-382a-8c3e-eabbe8efa4cf> /usr/local/Cellar/fontconfig/2.14.2/lib/libfontconfig.1.dylib
       0x102056000 -        0x1020d9fff libfreetype.6.dylib (*) <b78b59e4-06e4-3914-91e1-685c92009746> /usr/local/Cellar/freetype/2.13.0_1/lib/libfreetype.6.dylib
       0x101131000 -        0x101148fff libgraphite2.3.2.1.dylib (*) <ca298320-6a97-3433-9faa-7d55bcc391aa> /usr/local/Cellar/graphite2/1.3.14/lib/libgraphite2.3.2.1.dylib
       0x1020f6000 -        0x10216dfff libpixman-1.0.42.2.dylib (*) <178b64f5-63ef-3ac2-a692-21decc1ace82> /usr/local/Cellar/pixman/0.42.2/lib/libpixman-1.0.42.2.dylib
       0x100e41000 -        0x100e44fff libxcb-shm.0.0.0.dylib (*) <7c2fe94d-0223-34d8-9d49-3a8921d513ab> /usr/local/Cellar/libxcb/1.15_1/lib/libxcb-shm.0.0.0.dylib
       0x101c86000 -        0x101c99fff libxcb.1.1.0.dylib (*) <8a02a1ee-6b4e-3342-9ca6-1dcecb07ce58> /usr/local/Cellar/libxcb/1.15_1/lib/libxcb.1.1.0.dylib
       0x100fa3000 -        0x100faafff libxcb-render.0.0.0.dylib (*) <f87da06d-b2dc-3611-bbc0-e609bb75ff2e> /usr/local/Cellar/libxcb/1.15_1/lib/libxcb-render.0.0.0.dylib
       0x100eef000 -        0x100ef6fff libXrender.1.dylib (*) <3d22fbdd-5a93-3971-a57b-3dcb3e969665> /usr/local/Cellar/libxrender/0.9.11/lib/libXrender.1.dylib
       0x10227f000 -        0x102352fff libX11.6.dylib (*) <4cceff5c-b03b-3e51-84d0-51f6c0e9120d> /usr/local/Cellar/libx11/1.8.4/lib/libX11.6.dylib
       0x1011bf000 -        0x1011cafff libXext.6.dylib (*) <fefaba68-90dc-352e-99b7-6924d100343d> /usr/local/Cellar/libxext/1.3.5/lib/libXext.6.dylib
       0x100edd000 -        0x100ee0fff libXau.6.0.0.dylib (*) <17c27a2d-b99a-3113-88bf-956862554d38> /usr/local/Cellar/libxau/1.0.11/lib/libXau.6.0.0.dylib
       0x101159000 -        0x10115cfff libXdmcp.6.dylib (*) <e88b6a07-6092-34d0-88c0-d2fad853c02e> /usr/local/Cellar/libxdmcp/1.1.4/lib/libXdmcp.6.dylib
       0x102377000 -        0x102432fff libzstd.1.5.5.dylib (*) <897bf4de-ce7a-3bdc-a364-a0f39b338ef4> /usr/local/Cellar/zstd/1.5.5/lib/libzstd.1.5.5.dylib
       0x101cb2000 -        0x101cc9fff liblzo2.2.dylib (*) <1789972b-60fb-3dc6-9fde-75cfb4fb886c> /usr/local/Cellar/lzo/2.10/lib/liblzo2.2.dylib
       0x1083a1000 -        0x1083b0fff libobjc-trampolines.dylib (*) <d2da3b5f-f5ba-3ef1-b99d-bc64a8487401> /usr/lib/libobjc-trampolines.dylib
       0x1071f5000 -        0x1071fcfff libpixbufloader-svg.so (*) <8b7fd0f5-f40e-33ba-b71e-6416163b2a2a> /usr/local/Cellar/librsvg/2.56.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
       0x109a98000 -        0x10a1effff librsvg-2.2.dylib (*) <5780f412-0b02-3f24-ac74-38fc2a1b65a5> /usr/local/Cellar/librsvg/2.56.0/lib/librsvg-2.2.dylib
    0x7ff81b7b6000 -     0x7ff81b84e5a7 dyld (*) <f22a1143-9732-3e23-a8b7-cbade6bb8301> /usr/lib/dyld
    0x7ff81bad6000 -     0x7ff81bb0fff7 libsystem_kernel.dylib (*) <08606a44-7008-3658-9f00-6c250b80e9c3> /usr/lib/system/libsystem_kernel.dylib
    0x7ff81bb10000 -     0x7ff81bb1bfff libsystem_pthread.dylib (*) <86dfa543-95fa-36b4-83c6-bf03d01b2aad> /usr/lib/system/libsystem_pthread.dylib
    0x7ff81bb75000 -     0x7ff81c011fef com.apple.CoreFoundation (6.9) <315a3f65-0954-3635-96dc-2f65c691d074> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7ff81ec44000 -     0x7ff81fc4bff0 com.apple.AppKit (6.9) <af96f40f-d333-3647-9da4-eddc52df4753> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 2
    thread_create: 0
    thread_set_state: 82


-----------
Full Report
-----------

{"app_name":"app","timestamp":"2023-05-05 06:16:01.00 +0100","app_version":"","slice_uuid":"d7a5d7fe-d0bf-303d-9f37-8ed1b429ffa3","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 13.3.1 (22E772610a)","roots_installed":0,"incident_id":"5474DDD1-5571-4952-94B2-934AD7C7C0FF","name":"app"}
{
  "uptime" : 36000,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro16,2",
  "coalitionID" : 545,
  "osVersion" : {
    "train" : "macOS 13.3.1",
    "build" : "22E772610a",
    "releaseType" : "User"
  },
  "captureTime" : "2023-05-05 06:16:00.4357 +0100",
  "incident" : "5474DDD1-5571-4952-94B2-934AD7C7C0FF",
  "pid" : 14701,
  "cpuType" : "X86-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-05-05 06:15:58.3081 +0100",
  "procStartAbsTime" : 36942638647238,
  "procExitAbsTime" : 36944763556808,
  "procName" : "app",
  "procPath" : "\/Users\/USER\/*\/app",
  "parentProc" : "tcsh",
  "parentPid" : 1062,
  "coalitionName" : "com.apple.Terminal",
  "crashReporterKey" : "ACD48C51-1132-D51B-B4B9-0D9F89706305",
  "responsiblePid" : 676,
  "responsibleProc" : "Terminal",
  "codeSigningID" : "",
  "codeSigningTeamID" : "",
  "codeSigningValidationCategory" : 0,
  "codeSigningTrustLevel" : 0,
  "wakeTime" : 20214,
  "bridgeVersion" : {"build":"20P4252","train":"7.4"},
  "sleepWakeUUID" : "E552CD0E-91D1-4F32-94A7-2FD9F24F4582",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000002, 0x0000000000000000","rawCodes":[2,0],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"},
  "termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace\/BPT trap: 5","byProc":"exc handler","byPid":14701},
  "os_fault" : {"process":"app"},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":82,"task_for_pid":2},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":436552,"instructionState":{"instructionStream":{"bytes":[107,220,4,0,76,137,238,232,183,64,4,0,72,137,223,76,137,238,232,172,64,4,0,72,141,61,201,101,4,0,76,137,238,232,157,64,4,0,72,139,5,242,209,10,0,72,139,0,72,59,69,208,117,15,72,131,196,104,91,65,92,65,93,65,94,65,95,93,195,232,155,63,4,0,85,72,137,229,83,80,137,251,232,157,212,1,0,133,192,117,12,133,219,116,18,204,72,131,196,8,91,93,195,191,1,0,0,0,232,152,63,4,0,232,153,63,4,0,85,72,137,229,65,87,65,86,65,85,65,84,83,72,129,236,136,6,0,0,137,181,28,250,255,255,72,141,181,80,249,255,255,72,137,86,16,72,137,78,24,76,137,70,32,76,137,78,40,132,192,116,56,15,41,133,128,249,255,255,15,41,141,144,249,255,255,15,41,149,160,249,255,255],"offset":96}},"threadState":{"r13":{"value":8},"rax":{"value":0},"rflags":{"value":514},"cpu":{"value":2},"r14":{"value":1},"rsi":{"value":0},"r8":{"value":0},"cr2":{"value":4323914573},"rdx":{"value":285},"r10":{"value":7424},"r9":{"value":127},"r15":{"value":8},"rbx":{"value":1},"trap":{"value":3},"err":{"value":0},"r11":{"value":105553119225528},"rip":{"value":4323794617,"matchesCrashFrame":1},"rbp":{"value":140702039801360},"rsp":{"value":140702039801344},"r12":{"value":1},"rcx":{"value":2},"flavor":"x86_THREAD_STATE","rdi":{"value":1}},"queue":"com.apple.main-thread","frames":[{"imageOffset":257721,"symbol":"_g_log_abort","symbolLocation":22,"imageIndex":11},{"imageOffset":256475,"symbol":"g_logv","symbolLocation":986,"imageIndex":11},{"imageOffset":255383,"symbol":"g_log","symbolLocation":120,"imageIndex":11},{"imageOffset":160410,"symbol":"g_hash_table_lookup","symbolLocation":277,"imageIndex":11},{"imageOffset":1727076,"symbol":"gtk_action_muxer_get_group","symbolLocation":13,"imageIndex":1},{"imageOffset":2206648,"symbol":"on_window_unmap_cb","symbolLocation":29,"imageIndex":1},{"imageOffset":31991,"symbol":"g_closure_invoke","symbolLocation":205,"imageIndex":10},{"imageOffset":116418,"symbol":"signal_emit_unlocked_R","symbolLocation":1448,"imageIndex":10},{"imageOffset":119708,"symbol":"g_signal_emit_valist","symbolLocation":1865,"imageIndex":10},{"imageOffset":121504,"symbol":"g_signal_emit","symbolLocation":120,"imageIndex":10},{"imageOffset":1595515,"symbol":"gtk_widget_unmap","symbolLocation":138,"imageIndex":1},{"imageOffset":1675923,"symbol":"gtk_window_hide","symbolLocation":32,"imageIndex":1},{"imageOffset":1661264,"symbol":"gtk_window_destroy","symbolLocation":98,"imageIndex":1},{"imageOffset":1661047,"symbol":"gtk_window_close","symbolLocation":64,"imageIndex":1},{"imageOffset":11701,"sourceLine":29,"sourceFile":"app.cc","symbol":"quit_callback(_GtkWindow*)","imageIndex":0,"symbolLocation":21},{"imageOffset":32454,"symbol":"_g_closure_invoke_va","symbolLocation":218,"imageIndex":10},{"imageOffset":118833,"symbol":"g_signal_emit_valist","symbolLocation":990,"imageIndex":10},{"imageOffset":121504,"symbol":"g_signal_emit","symbolLocation":120,"imageIndex":10},{"imageOffset":82997,"symbol":"_gtk_marshal_VOID__INT_DOUBLE_DOUBLEv","symbolLocation":192,"imageIndex":1},{"imageOffset":32454,"symbol":"_g_closure_invoke_va","symbolLocation":218,"imageIndex":10},{"imageOffset":118833,"symbol":"g_signal_emit_valist","symbolLocation":990,"imageIndex":10},{"imageOffset":121504,"symbol":"g_signal_emit","symbolLocation":120,"imageIndex":10},{"imageOffset":671835,"symbol":"gtk_gesture_click_end","symbolLocation":119,"imageIndex":1},{"imageOffset":44661,"symbol":"g_cclosure_marshal_VOID__BOXEDv","symbolLocation":166,"imageIndex":10},{"imageOffset":32454,"symbol":"_g_closure_invoke_va","symbolLocation":218,"imageIndex":10},{"imageOffset":118833,"symbol":"g_signal_emit_valist","symbolLocation":990,"imageIndex":10},{"imageOffset":121504,"symbol":"g_signal_emit","symbolLocation":120,"imageIndex":10},{"imageOffset":659578,"symbol":"_gtk_gesture_check_recognized","symbolLocation":55,"imageIndex":1},{"imageOffset":665204,"symbol":"gtk_gesture_handle_event","symbolLocation":495,"imageIndex":1},{"imageOffset":677332,"symbol":"gtk_gesture_single_handle_event","symbolLocation":575,"imageIndex":1},{"imageOffset":500407,"symbol":"gtk_event_controller_handle_event","symbolLocation":235,"imageIndex":1},{"imageOffset":1605267,"symbol":"gtk_widget_run_controllers","symbolLocation":208,"imageIndex":1},{"imageOffset":1605774,"symbol":"_gtk_widget_captured_event","symbolLocation":186,"imageIndex":1},{"imageOffset":875179,"symbol":"gtk_propagate_event_internal","symbolLocation":182,"imageIndex":1},{"imageOffset":872263,"symbol":"gtk_main_do_event","symbolLocation":2014,"imageIndex":1},{"imageOffset":1689097,"symbol":"surface_event","symbolLocation":12,"imageIndex":1},{"imageOffset":2879349,"symbol":"_gdk_marshal_BOOLEAN__POINTERv","symbolLocation":122,"imageIndex":1},{"imageOffset":3118174,"symbol":"gdk_surface_event_marshallerv","symbolLocation":146,"imageIndex":1},{"imageOffset":32454,"symbol":"_g_closure_invoke_va","symbolLocation":218,"imageIndex":10},{"imageOffset":118833,"symbol":"g_signal_emit_valist","symbolLocation":990,"imageIndex":10},{"imageOffset":121504,"symbol":"g_signal_emit","symbolLocation":120,"imageIndex":10},{"imageOffset":3115604,"symbol":"gdk_surface_handle_event","symbolLocation":313,"imageIndex":1},{"imageOffset":2917932,"symbol":"gdk_macos_event_source_dispatch","symbolLocation":43,"imageIndex":1},{"imageOffset":228452,"symbol":"g_main_context_dispatch","symbolLocation":273,"imageIndex":11},{"imageOffset":229196,"symbol":"g_main_context_iterate","symbolLocation":433,"imageIndex":11},{"imageOffset":229284,"symbol":"g_main_context_iteration","symbolLocation":55,"imageIndex":11},{"imageOffset":567047,"symbol":"g_application_run","symbolLocation":521,"imageIndex":9},{"imageOffset":12658,"sourceLine":76,"sourceFile":"app.cc","symbol":"main","imageIndex":0,"symbolLocation":114},{"imageOffset":25631,"symbol":"start","symbolLocation":1903,"imageIndex":39}]},{"id":436553,"name":"pool-spawner","frames":[{"imageOffset":16622,"symbol":"__psynch_cvwait","symbolLocation":10,"imageIndex":40},{"imageOffset":26456,"symbol":"_pthread_cond_wait","symbolLocation":1242,"imageIndex":41},{"imageOffset":533271,"symbol":"g_cond_wait","symbolLocation":37,"imageIndex":11},{"imageOffset":43604,"symbol":"g_async_queue_pop_intern_unlocked","symbolLocation":99,"imageIndex":11},{"imageOffset":384585,"symbol":"g_thread_pool_spawn_thread","symbolLocation":117,"imageIndex":11},{"imageOffset":383468,"symbol":"g_thread_proxy","symbolLocation":66,"imageIndex":11},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":41},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":41}]},{"id":436554,"name":"gmain","frames":[{"imageOffset":41602,"symbol":"__select","symbolLocation":10,"imageIndex":40},{"imageOffset":289067,"symbol":"g_poll","symbolLocation":505,"imageIndex":11},{"imageOffset":229110,"symbol":"g_main_context_iterate","symbolLocation":347,"imageIndex":11},{"imageOffset":229284,"symbol":"g_main_context_iteration","symbolLocation":55,"imageIndex":11},{"imageOffset":233591,"symbol":"glib_worker_main","symbolLocation":30,"imageIndex":11},{"imageOffset":383468,"symbol":"g_thread_proxy","symbolLocation":66,"imageIndex":11},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":41},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":41}]},{"id":436555,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":41}]},{"id":436556,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":41}]},{"id":436573,"name":"pool-app","frames":[{"imageOffset":16622,"symbol":"__psynch_cvwait","symbolLocation":10,"imageIndex":40},{"imageOffset":26509,"symbol":"_pthread_cond_wait","symbolLocation":1295,"imageIndex":41},{"imageOffset":533667,"symbol":"g_cond_wait_until","symbolLocation":120,"imageIndex":11},{"imageOffset":43593,"symbol":"g_async_queue_pop_intern_unlocked","symbolLocation":88,"imageIndex":11},{"imageOffset":43974,"symbol":"g_async_queue_timeout_pop","symbolLocation":56,"imageIndex":11},{"imageOffset":387323,"symbol":"g_thread_pool_thread_proxy","symbolLocation":295,"imageIndex":11},{"imageOffset":383468,"symbol":"g_thread_proxy","symbolLocation":66,"imageIndex":11},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":41},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":41}]},{"id":436583,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":41}]},{"id":436584,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":41}]},{"id":436587,"name":"com.apple.NSEventThread","frames":[{"imageOffset":5554,"symbol":"mach_msg2_trap","symbolLocation":10,"imageIndex":40},{"imageOffset":63277,"symbol":"mach_msg2_internal","symbolLocation":78,"imageIndex":40},{"imageOffset":34276,"symbol":"mach_msg_overwrite","symbolLocation":692,"imageIndex":40},{"imageOffset":6298,"symbol":"mach_msg","symbolLocation":19,"imageIndex":40},{"imageOffset":512431,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":145,"imageIndex":42},{"imageOffset":506928,"symbol":"__CFRunLoopRun","symbolLocation":1365,"imageIndex":42},{"imageOffset":503921,"symbol":"CFRunLoopRunSpecific","symbolLocation":560,"imageIndex":42},{"imageOffset":1698057,"symbol":"_NSEventThread","symbolLocation":132,"imageIndex":43},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":41},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":41}]},{"id":436590,"frames":[{"imageOffset":41602,"symbol":"__select","symbolLocation":10,"imageIndex":40},{"imageOffset":289067,"symbol":"g_poll","symbolLocation":505,"imageIndex":11},{"imageOffset":2919293,"symbol":"select_thread_func","symbolLocation":228,"imageIndex":1},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":41},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":41}]}],

Thanks! Could you open an issue in Issues · GNOME / gtk · GitLab?

The error is triggered from gtk/gtkapplication-quartz.c · 4.10.3 · GNOME / gtk · GitLab. The code was introduced in macos: plug leak of application windows (004f0a65) · Commits · GNOME / gtk · GitLab, but there’s a typo: "quartz-muxer-umap" in g_object_get_data (should be unmap, as in the corresponding set_data call)

Not sure if it’s related to the missing action activations (don’t think), but may help with the errors on close.

1 Like

Fixed here:

Hi Paul, could you test if that MR fixes the issue?

I cannot reproduce on macOS 11, so may be related to widgets not reacting to mouse hover/click on macOS Ventura (#5305) · Issues · GNOME / gtk · GitLab

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.