Hi, everyone
I have an exact same problem with my 64bit CPU. After some investigation, I 
added  some dump routines to see what's going on around icon settings as below.
As you can see the result of the printf, the icon bitmap and the size has been 
changed after XChangeProperty function that should not be happen. This cause 
the segmentation fault after next call of ewmh_set_icon function
Is it a fault of XGetWindowProperty function on xlib? or some other problem?

Regards
Hyunwoo Park

~~~~~
diff for debug
~~~~~

[h...@hyun trunk]$ LANG=en_US svn diff
Index: ewmhints.c
===================================================================
--- ewmhints.c  (revision 1505)
+++ ewmhints.c  (working copy)
@@ -440,10 +440,27 @@
 
        if (get_property_value(wnd, "_NET_WM_ICON", 10000, &nitems, &props, 1) 
>= 0)
        {
+               printf( "%s: %d: %d\n", __func__, __LINE__, nitems );
                cur_set = (uint32 *) props;
+               {
+                       int a, len = nitems;
+                       unsigned char *ptr = cur_set;
 
+                       printf( "len: %d\n", len );
+                       for( a=0; a<len; )
+                       {
+                               printf( " %02x", ptr[a] );
+                               a++;
+                               if( (a & 15) == 0 )
+                                       printf( "\n" );
+                       }
+                       if( (a & 15) != 0 )
+                               printf( "\n" );
+               }
+
                for (i = 0; i < nitems;)
                {
+                       printf( "%s: %d: i=%d\n", __func__, __LINE__, i );
                        if (cur_set[i] == width && cur_set[i + 1] == height)
                                break;
 
@@ -462,6 +479,7 @@
        }
        else
        {
+               printf( "%s: %d: new for %dX%d\n", __func__, __LINE__, height, 
width );
                new_set = xmalloc((width * height + 2) * 4);
                icon = new_set;
                nitems = width * height + 2;
@@ -480,6 +498,23 @@
                        ((rgba_data[i * 4 + 2] << 0) & 0x000000FF);
        }
 
+       // dump before changing property
+       {
+               int a, len = nitems;
+               unsigned char *ptr = icon;
+
+               printf( "len: %d\n", len );
+               for( a=0; a<len; )
+               {
+                       printf( " %02x", ptr[a] );
+                       a++;
+                       if( (a & 15) == 0 )
+                               printf( "\n" );
+               }
+               if( (a & 15) != 0 )
+                       printf( "\n" );
+       }
+
        XChangeProperty(g_display, wnd, g_net_wm_icon_atom, XA_CARDINAL, 32,
                        PropModeReplace, (unsigned char *) (new_set ? new_set : 
cur_set), nitems);
 
@@ -487,6 +522,29 @@
                XFree(cur_set);
        if (new_set)
                xfree(new_set);
+
+       // dump after changing preperty
+       if (get_property_value(wnd, "_NET_WM_ICON", 10000, &nitems, &props, 1) 
>= 0)
+       {
+               printf( "%s: %d: %d confirming...\n", __func__, __LINE__, 
nitems );
+               {
+                       int a, len = nitems;
+                       unsigned char *ptr = props;
+
+                       printf( "len: %d\n", len );
+                       for( a=0; a<len; )
+                       {
+                               printf( " %02x", ptr[a] );
+                               a++;
+                               if( (a & 15) == 0 )
+                                       printf( "\n" );
+                       }
+                       if( (a & 15) != 0 )
+                               printf( "\n" );
+               }
+       }
+       else
+       printf( "failed to get property\n" );
 }
 
 void
[h...@hyun trunk]$ 


~~~~~
result of printf
~~~~~

ewmh_set_icon: 482: new for 16X16
len: 258
 10 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 31 9a ce ff 31 9a ce ff 31 96 ce ff 29 96 c6 ff
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 31 9a ce ff
 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 29 8e c6 ff 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 31 9a ce ff ff ff ff ff
 9c ff ff ff 9c ff ff ff 9c ff ff ff 9c ff ff ff
 ff ff ff ff 21 8a bd ff 21 86 bd ff 18 86 b5 ff
 18 82 b5 ff 18 82 b5 ff 10 7d b5 ff 00 00 00 00
 00 00
ewmh_set_icon: 526: 258 confirming...
len: 258
 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 31 9a ce ff ff ff ff ff 31 96 ce ff ff ff ff ff
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 29 8e c6 ff ff ff ff ff 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 31 9a ce ff ff ff ff ff
 9c ff ff ff ff ff ff ff 9c ff ff ff ff ff ff ff
 ff ff ff ff ff ff ff ff 21 86 bd ff ff ff ff ff
 18 82 b5 ff ff ff ff ff 10 7d b5 ff ff ff ff ff
 00 00
seamlessrdp got:SETICON,7105,0x0002024e,0,RGBA,16,16,0000000

-- 
Window creation/destruction causes segmentation fault in seamless mode
https://bugs.launchpad.net/bugs/275545
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to