On Wed, Jan 07, 2009 at 07:54:51PM -0300, Jorge Arellano Cid wrote:
On Wed, Jan 07, 2009 at 09:59:22PM +0100, Johannes Hofmann wrote:
Sorry, but I'm seeing one more crash with current css-prototype.
Thanks for the politeness. It's good to be testing.
I've long forgotten the mess that image processing code became. That's why I've taken the time to try to push code cleanups...
Program terminated with signal 11, Segmentation fault. #0 0x08073f8e in dw::core::Layout::createImgbuf (this=0x3, type=dw::core::Imgbuf::RGB, width=140, height=80) at ../dw/layout.hh:241 241 return platform->createImgbuf (type, width, height); (gdb) bt #0 0x08073f8e in dw::core::Layout::createImgbuf (this=0x3, type=dw::core::Imgbuf::RGB, width=140, height=80) at ../dw/layout.hh:241 #1 0x0805f016 in a_Dicache_set_parms (url=0x28fa2a00, version=1, Image=0x2952d040, width=140, height=80, type=DILLO_IMG_TYPE_RGB) at dicache.c:268 #2 0x08072f2e in Jpeg_write (jpeg=0x28f85000, Buf=0x28f97000, BufSize=8000) at jpeg.c:299 #3 0x08072df4 in Jpeg_callback (Op=0, Client=0x297b4e20) at jpeg.c:246 #4 0x0805f407 in a_Dicache_callback (Op=0, Client=0x297b4e20) at dicache.c:396
The layout belongs to the bw, so it shouldn't dissappear with repush. It looks like Image is already freed.
Let's see:
jcid@d620:~/C/Dillo/d2/dillo-css-wc2/src$ srch a_Image_ref image.cc:void a_Image_ref(DilloImage *Image) image.hh:void a_Image_ref(DilloImage *Image); gif.c: a_Image_ref(web->Image); jpeg.c: a_Image_ref(web->Image); png.c: a_Image_ref(web->Image); jcid@d620:~/C/Dillo/d2/dillo-css-wc2/src$ srch a_Image_unref html.cc: a_Image_unref(li->image); image.cc:void a_Image_unref(DilloImage *Image) image.cc: a_Image_unref(Image); image.hh:void a_Image_unref(DilloImage *Image); web.cc: a_Image_unref(web->Image);
this looks like unbalanced ref/unref for the Image. Gif/Jpeg/Png match with image.cc The initial Ref=1 matches web.cc html.cc matches ??
Please test with one or two extra a_Image_ref() at dicache.c:269, or at your choice, on the proper place! :-)
That didn't help. Backing out abdae95b1c9e however helps so far. Cheers, Johannes