Hello.

I have noticed since upgrading past Imlib-1.1, that Eterm will SEGV whenever
I try to resize or reload with most of my jpeg Eterm backgrounds...  I had
originally thought that it was a problem with Imlib, and decided to live
with it for a few weeks while Imlib was still a moving target expecting it
to go away.

I now think that it must be something to do with Eterm misusing the new
Imlib API somehow, because I have rolled back changes through Eterm-DR-0.7+PL4
and the problem goes away when I get back to PL5 without the Imlib-1.1
patch, linked against Imlib-1.0.

I have tried to follow the problem with gdb, but Eterm has one of those
annoying heisenbugs which causes it to exit(1) when run from gdb, and
process attaching shows that the rgb_data for the image points to invalid
memory by the time the initial background has loaded.  The SEGV then happens
in imlib_free_pixmap when the first background (with the corrupted rgb_data
pointer) is freed in preparation for loading the next.

I have only noticed this problem with scaled images, though I don't use
jpegs for my tiled backgrouds, so they too may be problematic.  I can also
load the same jpegs into ee, and rescale them, reload them etc. with no
problems, using the same version of Imlib.

Is this a know bug?  Any idea where I should be looking?

TIA,
        Gary V. Vaughan
        

Just incase this helps:
I am using DR-0.8-pre9 with no changes to feature.h, linked against todays
gnome cvs snapshot of Imlib-1.4.

$ configure [edited to add -lgif]
[blah blah]
Configuration:

  Source code location:       .
  Compiler:                   gcc, 
  Architecture:               i586
  Operating system:           Linux
  Compiler flags:             -g -O
  POSIX threads:              
  Graphics libraries:         -lImlib -lXext -lm -lpng -lz -ljpeg -ltiff -lgif
  Install path:               /usr/local/bin
$ make
[blah blah]
$ ldd src/Eterm
        /lib/nfslock.so.0 => /lib/nfslock.so.0 (0x4000d000)
        libutil.so.1 => /lib/libutil.so.1 (0x40013000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40016000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x4001f000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40035000)
        libImlib.so.1 => /usr/local/lib/libImlib.so.1 (0x400d3000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x400f6000)
        libm.so.6 => /lib/libm.so.6 (0x40101000)
        libgif.so => /usr/local/lib/libgif.so (0x4011a000)
        libpng.so.2 => /usr/lib/libpng.so.2 (0x40123000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40146000)
        libjpeg.so.6a => /usr/lib/libjpeg.so.6a (0x40155000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0x40171000)
        libc.so.6 => /lib/libc.so.6 (0x401a7000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
$ src/Eterm &
[1] 25163
ImlibRender(410x250)
$ gdb src/Eterm 25163
(gdb) p *imlib_bg->im
$1 = {rgb_width = 1076075672, rgb_height = 1076075672, 
  rgb_data = 0x4024c008 <Address 0x4024c008 out of bounds>, alpha_data = 0x0, 
  filename = 0x806bfe0 "garyv@rothmans:~/Eterm-DR-0.8-pre9", width = 640, 
   height = 480, shape_color = {r = -1, g = -1, b = -1, pixel = 0}, border = {
    left = 0, right = 0, top = 0, bottom = 0}, pixmap = 41943052, 
  shape_mask = 0, cache = 1 '\001', mod = {gamma = 256, brightness = 256, 
    contrast = 256}, rmod = {gamma = 256, brightness = 256, contrast = 256}, 
  gmod = {gamma = 256, brightness = 256, contrast = 256}, bmod = {gamma = 256, 
    brightness = 256, contrast = 256},
  rmpap = "\000\001\002\003\004\005\006\a\b\t\n\013\f\r\016\017\020\021\022
[blah blah]
(gdb) p imlib_bg->im->rgb_data
$3 = (unsigned char *) 0x4024c008 <Address 0x4024c008 out of bounds>
(gdb) bre Imlib_destroy_image
Breakpoint 1 at 0x400de92e: file ../../Imlib/misc.c, line 1067.
(gdb) c
Continuing.

Breakpoint 1, nullify_image (id=0x8072170, im=0x80727d0)
    at ../../Imlib/cache.c:485
(gdb) p im->rgb_data
$3 = (unsigned char *) 0x4024c008 <Address 0x4024c008 out of bounds>
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x401e55db in free ()
(gdb) bt
#0  0x401e55db in free ()
#1  0x400d7fc9 in nullify_image (id=0x8072080, im=0x80726e0)
    at ../../Imlib/cache.c:488
#2  0x400d7a3e in free_image (id=0x8072080, im=0x80726e0)
    at ../../Imlib/cache.c:181
#3  0x400de928 in Imlib_destroy_image (id=0x8072080, im=0x80726e0)
    at ../../Imlib/misc.c:1067
#4  0x8050e04 in set_bgPixmap (file=0x8093fe0 "Neopolis.ppm") at pixmap.c:816
#5  0x805297b in xterm_seq (op=20, str=0xbffff718 "Neopolis.ppm;100x100+50+50")
    at main.c:1298
#6  0x804eefd in process_xterm_seq () at command.c:3511
#7  0x804e855 in process_escape_seq () at command.c:3267
#8  0x804fd25 in main_loop () at command.c:3863
#9  0x80534fc in main (argc=3, argv=0xbffff958) at main.c:1867
    

-- 
  ___              _   ___   __              _             
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___ 
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
 \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
PGP Key from/___/                      /___/               
http://www.cl.cam.ac.uk/PGP/pks-commands.html#extract      
http://pgp.ai.mit.edu/~bal/pks-commands.html#extract       

PGP signature

Reply via email to