[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users 00663] Fw: magicpoint-1.08a crashing in XGetPixel()



I redirect the following message to this ml.

--Kazu
--- Begin Message ---
Hello,

I am wondering if this is a known problem (possibly with a known
solution) --

MagicPoint when run on sample/sample.mgp dies on the third page of
the presentation, after displaying "Command Line".  This only happens
when the truetype fonts are installed, and only when run without "-o"
(perhaps the slightly smaller window size helps).

The system is Linux 2.2, glibc 2.1.3 + lots of irrelevant patches,
XFree86 3.3.5 or 3.3.6 (tried both versions of the X libraries) as
packaged by Red Hat (for RHL 6.1 and 6.2, respectively).  Running at
virtual resolution 1280x1484, 32 bpp.

I've added two debugging printf's to tfont.c --

fprintf(stderr, "%d %d\n", bx + tfc->xoff + x, by - tfc->ascent + y);
                                bc->pixel = XGetPixel(xim, bx + tfc->xoff + x,
                                        by - tfc->ascent + y);
fprintf(stderr, "returned\n");

and it crashes like this --

212 115
returned
213 115
returned
148 116

Program received signal SIGSEGV, Segmentation fault.
0x001b4ffa in _XGetPixel32 () from /usr/X11R6/lib/libX11.so.6
(gdb) bt
#0  0x001b4ffa in _XGetPixel32 () from /usr/X11R6/lib/libX11.so.6
#1  0x0805e3d8 in tfc_image ()
#2  0x080509dd in obj_draw ()
#3  0x0804f00c in draw_line_end ()
#4  0x0804ed22 in process_direc ()
#5  0x0804e53a in draw_one ()
#6  0x0804cfdb in main_loop ()
#7  0x0804c554 in main ()
#8  0x00251c39 in __libc_start_main (main=0x804bec4 <main>, argc=3, 
    argv=0xbffffa14, init=0x804ad20 <_init>, fini=0x80751fc <_fini>, 
    rtld_fini=0x11ad04 <_dl_fini>, stack_end=0xbffffa0c)
    at ../sysdeps/generic/libc-start.c:92
(gdb) disass $eip-20 $eip+20
Dump of assembler code from 0x1b4fe6 to 0x1b500e:
0x1b4fe6 <_XGetPixel32+54>:     mov    0x8(%ebp),%edi
0x1b4fe9 <_XGetPixel32+57>:     movsbl 0xffffbf4c(%ebx),%eax
0x1b4ff0 <_XGetPixel32+64>:     add    0x10(%edi),%ecx
0x1b4ff3 <_XGetPixel32+67>:     mov    0x14(%edi),%edx
0x1b4ff6 <_XGetPixel32+70>:     cmp    %edx,%eax
0x1b4ff8 <_XGetPixel32+72>:     jne    0x1b5000 <_XGetPixel32+80>
0x1b4ffa <_XGetPixel32+74>:     mov    (%ecx),%edx
0x1b4ffc <_XGetPixel32+76>:     jmp    0x1b5049 <_XGetPixel32+153>
0x1b4ffe <_XGetPixel32+78>:     mov    %esi,%esi
0x1b5000 <_XGetPixel32+80>:     cmp    $0x1,%edx
0x1b5003 <_XGetPixel32+83>:     jne    0x1b5027 <_XGetPixel32+119>
0x1b5005 <_XGetPixel32+85>:     xor    %edx,%edx
0x1b5007 <_XGetPixel32+87>:     mov    (%ecx),%dl
0x1b5009 <_XGetPixel32+89>:     shl    $0x18,%edx
0x1b500c <_XGetPixel32+92>:     xor    %eax,%eax
End of assembler dump.
(gdb) i r $ecx
ecx            0x382468 3679336
(gdb) i r $edx
edx            0x0      0
(gdb) i r $eax
eax            0x0      0
(gdb) i r $edi
edi            0x82b8e80        137072256
(gdb) i r $ebx
ebx            0x237dd8 2325976
(gdb) x $ecx
0x382468:       Cannot access memory at address 0x382468

-- 
/sd

--- End Message ---