You are not logged in.

#1 2010-12-02 00:25:19

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

[GTK+/Libwnck:] signals not being sent on second popup [SOLVED]

I'm having trouble getting the "viewports-changed", "window-opened", and "window-closed" signals getting sent to the functions in

Diff between the last implementation of the first patched version w/dbus and the reimplementation of dbus: http://pastebin.com/fk0fvUfc

Judging by the diff in the above link, I think it either has to do with how I refreshed the menu or with how dbus is telling the menu...but other than that, I do not know

Files that are possibly related to this problem:
http://compizboxmenu.git.sourceforge.ne … .c;hb=HEAD deskmenu.c
http://compizboxmenu.git.sourceforge.ne … .c;hb=HEAD deskmenu-wnck.c (lines 333-351, 618-647, it is not receiving the mentioned signals, which causes these functions to not carry out properly)
http://compizboxmenu.git.sourceforge.ne … .c;hb=HEAD deskmenu-menu.c (most likely 1063-1073)
http://compizboxmenu.git.sourceforge.ne … .h;hb=HEAD deskmenu-menu.h (most likely for missing variable?)

I also ran this through valgrind, if that helps solve this problem:

valgrind ./compiz-boxmenu-daemon 
==28822== Memcheck, a memory error detector
==28822== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==28822== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==28822== Command: ./compiz-boxmenu-daemon
==28822== 
Starting the daemon...
Creating cache...Done creating cache!
Cacheing new non-default file...
Done loading ./menu.xml!
/home/shadowkyogre/.themes/Dust TrueDark2/gtk-2.0/gtkrc:85: Murrine configuration option "gradients" is no longer supported and will be ignored.
==28822== Invalid read of size 1
==28822==    at 0x804EB40: dmwin_set_decoration (in /media/PATRIOT__/sourceCodeExamples/git/compizboxmenu/compiz-boxmenu-daemon)
==28822==    by 0x804EF37: screen_window_opened (in /media/PATRIOT__/sourceCodeExamples/git/compizboxmenu/compiz-boxmenu-daemon)
==28822==    by 0x48B0847: g_cclosure_marshal_VOID__OBJECT (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x4893A71: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48A689F: ??? (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48AF305: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48AF4B1: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x40D1C09: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822==    by 0x40D2347: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822==    by 0x4919A80: ??? (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==    by 0x491DB71: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==    by 0x491E34F: ??? (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==  Address 0x6371b1a is 0 bytes after a block of size 74 alloc'd
==28822==    at 0x4024A18: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==28822==    by 0x4924873: g_malloc (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==    by 0x493E1E8: g_strdup (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==    by 0x804EB1E: dmwin_set_decoration (in /media/PATRIOT__/sourceCodeExamples/git/compizboxmenu/compiz-boxmenu-daemon)
==28822==    by 0x804EF37: screen_window_opened (in /media/PATRIOT__/sourceCodeExamples/git/compizboxmenu/compiz-boxmenu-daemon)
==28822==    by 0x48B0847: g_cclosure_marshal_VOID__OBJECT (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x4893A71: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48A689F: ??? (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48AF305: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48AF4B1: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x40D1C09: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822==    by 0x40D2347: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822== 
Checking cache...
Done loading ./menu.xml!
Checking cache...
Done loading ./menu.xml!
==28822== Invalid read of size 1
==28822==    at 0x804EB40: dmwin_set_decoration (in /media/PATRIOT__/sourceCodeExamples/git/compizboxmenu/compiz-boxmenu-daemon)
==28822==    by 0x804F11B: window_state_changed (in /media/PATRIOT__/sourceCodeExamples/git/compizboxmenu/compiz-boxmenu-daemon)
==28822==    by 0x40C7A3E: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822==    by 0x4893A71: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48A689F: ??? (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48AF305: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48AF4B1: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x40DE706: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822==    by 0x40DF627: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822==    by 0x4919A80: ??? (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==    by 0x491DB71: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==    by 0x491E34F: ??? (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==  Address 0x65f2ada is 0 bytes after a block of size 74 alloc'd
==28822==    at 0x4024A18: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==28822==    by 0x4924873: g_malloc (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==    by 0x493E1E8: g_strdup (in /usr/lib/libglib-2.0.so.0.2600.1)
==28822==    by 0x804EB1E: dmwin_set_decoration (in /media/PATRIOT__/sourceCodeExamples/git/compizboxmenu/compiz-boxmenu-daemon)
==28822==    by 0x804F11B: window_state_changed (in /media/PATRIOT__/sourceCodeExamples/git/compizboxmenu/compiz-boxmenu-daemon)
==28822==    by 0x40C7A3E: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822==    by 0x4893A71: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48A689F: ??? (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48AF305: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x48AF4B1: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28822==    by 0x40DE706: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822==    by 0x40DF627: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28822== 
==28822== 
==28822== HEAP SUMMARY:
==28822==     in use at exit: 2,653,318 bytes in 62,444 blocks
==28822==   total heap usage: 103,815 allocs, 41,371 frees, 12,976,126 bytes allocated
==28822== 
==28822== LEAK SUMMARY:
==28822==    definitely lost: 2,574 bytes in 13 blocks
==28822==    indirectly lost: 7,080 bytes in 350 blocks
==28822==      possibly lost: 1,998,491 bytes in 50,236 blocks
==28822==    still reachable: 645,173 bytes in 11,845 blocks
==28822==         suppressed: 0 bytes in 0 blocks
==28822== Rerun with --leak-check=full to see details of leaked memory
==28822== 
==28822== For counts of detected and suppressed errors, rerun with: -v
==28822== ERROR SUMMARY: 3 errors from 2 contexts (suppressed: 125 from 10)

Valgrind output of the old version that used the previous implementation dbus method

valgrind ./compiz-deskmenu-menu -m ./menu.xml 
==28928== Memcheck, a memory error detector
==28928== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==28928== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==28928== Command: ./compiz-deskmenu-menu -m ./menu.xml
==28928== 
/home/shadowkyogre/.themes/Dust TrueDark2/gtk-2.0/gtkrc:85: Murrine configuration option "gradients" is no longer supported and will be ignored.
==28928== Invalid read of size 1
==28928==    at 0x804D9B0: dmwin_set_decoration (in /media/PATRIOT__/sourceCodeExamples/compiz-deskmenu2/compiz-deskmenu-menu)
==28928==    by 0x804DDA7: screen_window_opened (in /media/PATRIOT__/sourceCodeExamples/compiz-deskmenu2/compiz-deskmenu-menu)
==28928==    by 0x48B0847: g_cclosure_marshal_VOID__OBJECT (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x4893A71: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x48A689F: ??? (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x48AF305: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x48AF4B1: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x40D1C09: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28928==    by 0x40D2347: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28928==    by 0x4919A80: ??? (in /usr/lib/libglib-2.0.so.0.2600.1)
==28928==    by 0x491DB71: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.2600.1)
==28928==    by 0x491E34F: ??? (in /usr/lib/libglib-2.0.so.0.2600.1)
==28928==  Address 0x50bf6c9 is 0 bytes after a block of size 73 alloc'd
==28928==    at 0x4024A18: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==28928==    by 0x4924873: g_malloc (in /usr/lib/libglib-2.0.so.0.2600.1)
==28928==    by 0x493E1E8: g_strdup (in /usr/lib/libglib-2.0.so.0.2600.1)
==28928==    by 0x804D98E: dmwin_set_decoration (in /media/PATRIOT__/sourceCodeExamples/compiz-deskmenu2/compiz-deskmenu-menu)
==28928==    by 0x804DDA7: screen_window_opened (in /media/PATRIOT__/sourceCodeExamples/compiz-deskmenu2/compiz-deskmenu-menu)
==28928==    by 0x48B0847: g_cclosure_marshal_VOID__OBJECT (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x4893A71: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x48A689F: ??? (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x48AF305: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x48AF4B1: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.2600.1)
==28928==    by 0x40D1C09: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28928==    by 0x40D2347: ??? (in /usr/lib/libwnck-1.so.22.3.31)
==28928== 
==28928== 
==28928== HEAP SUMMARY:
==28928==     in use at exit: 2,634,335 bytes in 61,731 blocks
==28928==   total heap usage: 97,364 allocs, 35,633 frees, 13,140,481 bytes allocated
==28928== 
==28928== LEAK SUMMARY:
==28928==    definitely lost: 2,172 bytes in 7 blocks
==28928==    indirectly lost: 7,080 bytes in 350 blocks
==28928==      possibly lost: 2,065,489 bytes in 52,537 blocks
==28928==    still reachable: 559,594 bytes in 8,837 blocks
==28928==         suppressed: 0 bytes in 0 blocks
==28928== Rerun with --leak-check=full to see details of leaked memory
==28928== 
==28928== For counts of detected and suppressed errors, rerun with: -v
==28928== ERROR SUMMARY: 3 errors from 1 contexts (suppressed: 125 from 10)

I notice that I also get these errors:

(compiz-boxmenu-daemon:15997): Gtk-CRITICAL **: IA__gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed

(compiz-boxmenu-daemon:15997): Gtk-CRITICAL **: IA__gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed

(compiz-boxmenu-daemon:15997): Gtk-CRITICAL **: IA__gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed

(compiz-boxmenu-daemon:15997): Gtk-CRITICAL **: IA__gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed

(compiz-boxmenu-daemon:15997): Gtk-CRITICAL **: IA__gtk_widget_set_no_show_all: assertion `GTK_IS_WIDGET (widget)' failed

(compiz-boxmenu-daemon:15997): Gtk-CRITICAL **: IA__gtk_widget_set_no_show_all: assertion `GTK_IS_WIDGET (widget)' failed

(compiz-boxmenu-daemon:15997): Gtk-CRITICAL **: IA__gtk_widget_set_no_show_all: assertion `GTK_IS_WIDGET (widget)' failed

(compiz-boxmenu-daemon:15997): Gtk-CRITICAL **: IA__gtk_widget_set_no_show_all: assertion `GTK_IS_WIDGET (widget)' failed

(compiz-boxmenu-daemon:15997): Gtk-CRITICAL **: IA__gtk_widget_set_sensitive: assertion `GTK_IS_WIDGET (widget)' failed

Maybe the functions creating these lists are trying to access the previous versions of these widgets, which were cleared.
[EDIT]: Solved by having these functions not refer to any of the old widgets by removing their listening to signals.

Last edited by ShadowKyogre (2010-12-04 01:01:15)


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

Board footer

Powered by FluxBB