Mint 22.3: xapp-sn-watcher segfaults on the second right-click of a tray icon (c445c22 not on 3.2-maintenance)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c, linux
- Área
- desktop, operating-systems
Línea de trabajo
Start with xapp-status-icon.c, where synthesize_event() creates the dummy rect window and the popup event takes it without a ref (around lines 367 and 383), then compare with the fix in commit c445c22 on master. The backport needs that change applied on the 3.2-maintenance branch, and the crash should no longer appear in a repeated right-click loop on a tray icon. Reproducing it needs an AppIndicator tray icon and a display where the watcher can be run under gdb.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Distribution
Linux Mint 22.3, Cinnamon 6.6
Package version
libxapp1 3.2.4+mint22.3 (libgtk-3-0t64 3.24.41-4ubuntu1.3)
Graphics hardware in use
No response
Frequency
Only occasionally
Bug description
xapp-sn-watcher crashed when I right-clicked the Whatsie tray icon, and all tray icons reloaded once cinnamon-session restarted it. As far as I can tell this is the use-after-free that c445c22 fixes on master, where it showed up as "GdkWindow unexpectedly destroyed" warnings. The dummy rect window from synthesize_event() goes into the popup event without a ref, so on the second popup of the same menu the old dummy is freed while its XID is still in GDK's table, and the DestroyNotify lookup can hand back freed memory.
Crashing thread:
#0 gdk_event_source_get_filter_window () at gdk/x11/gdkeventsource.c:123
#1 gdk_event_source_translate_event () at gdk/x11/gdkeventsource.c:189
#2 _gdk_x11_display_queue_events () at gdk/x11/gdkeventsource.c:341
#3 gdk_display_get_event () at gdk/gdkdisplay.c:442
#4 gdk_event_source_dispatch () at gdk/x11/gdkeventsource.c:354
#5 g_main_dispatch () at glib/gmain.c:3344
...
#8 g_application_run ()
#9 main ()
The event is a DestroyNotify for 0x2c002a5. In the core that XID still maps to a freed 416-byte GdkWindow. It is the dummy from my first right-click on Whatsie, and Whatsie's menu from the second click was still open.
Steps to reproduce
Right-click an AppIndicator tray icon, close the menu, and right-click the same icon again. The second popup frees the first dummy every time, but whether the watcher then segfaults depends on the heap, so it can take many tries.
Expected behavior
The menu opens and xapp-sn-watcher keeps running.
Additional information
A gdb watchpoint on the dummy's ref_count showed 2 at gtk_menu_popup_at_rect, 1 after gdk_event_free (xapp-status-icon.c:383), and 0 inside the second popup's g_object_set_data_full (line 367), before the DestroyNotify arrived. A right-click loop on a separate X display with the packaged 3.2.4 crashed in 3 of 5 runs, same frame #0, and the other 2 survived 200 cycles. With c445c22 applied on top of 3.2.4 the dummy stays alive until GDK has handled its DestroyNotify and dropped the XID.
c445c22 is on master but not on 3.2-maintenance, so Mint 22 still has the bug. Could it go into the next 3.2.x? Happy to test a build, or to send the cherry-pick as a PR if that is easier.
- Lenguaje dominante
- C
- Estrellas
- 173
- Forks
- 52
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de linuxmint/xapp
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
xapp-sn-watcher segfaults in g_dbus_proxy_get_name every time Blip (Flatpak) registers its tray iconAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
Todos los issues de linuxmint/xapp
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenPrinting/cups#1826 ·
Los mantenedores suelen responder en 1 día
-
Backport to 3.0 advertises a suffix that does not existPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
389ds/389-ds-base#8152 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
RetroAchievements/rcheevos#580 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
meta:feature-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
mpv-player/mpv#18855 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día