On Thu, Dec 25, 2008 at 10:43:06AM -0300, Jorge Arellano Cid wrote:
Hi,
On Sun, Dec 21, 2008 at 04:48:42PM -0300, Jorge Arellano Cid wrote:
Hi Johannes,
Here I'm attaching the second part of the CSS loading patch. This one is coherent and works better :-). Please commit after some testing.
Note: images are still truncated sometimes, but AFAIS this is a problem in the dicache, not in CSS loading. I hope to fix this soon.
Well, in fact, images were always truncated when the repush caught them still rendering.
I've been working on this for days and yes, it's a problem in the dicache. Unfortunately the cache/dicache/image-decode/image code is so entangled that it needs a rewrite. Quite surprising it works stable "as is".
BTW, what about removing the dicache altogether? Or is anyone using use_dicache=YES ?
The idea is to try to devise a single path of execution that allows handling each image request (repeated or not) as a simple cache client. It's more complex than it sounds!
The good news is that after you merge the latest cleanups in dillo main, the attached patch will more or less make it work as desired. There'll be some added unstability, and the underlying mess ;), but it should be a good basis to keep improving CSS while I work in the image process stream.
With the patch below I get frequent crashes like that: Program received signal SIGSEGV, Segmentation fault. a_Image_imgbuf_unref (v_imgbuf=0x0) at image.cc:214 214 ((Imgbuf*)v_imgbuf)->unref(); (gdb) bt #0 a_Image_imgbuf_unref (v_imgbuf=0x0) at image.cc:214 #1 0x0805c63e in Dicache_remove (Url=<value optimized out>, version=<value optimized out>) at dicache.c:190 #2 0x0805a486 in a_Cache_stop_client (Key=63) at cache.c:1268 #3 0x080542fb in a_Bw_stop_clients (bw=0x2860f2c0, flags=3) at bw.c:188 #4 0x08059b4b in Nav_open_url (bw=0x2860f2c0, url=0x2866b1c0, offset=0) at nav.c:231 #5 0x08059e23 in Nav_repush (bw=0x2860f2c0) at nav.c:366 #6 0x08059e46 in Nav_repush_callback (data=0x2860f2c0) at nav.c:373 #7 0x080c3c1d in fltk::wait () #8 0x080c3cad in fltk::run () #9 0x0804f1a0 in main (argc=1, argv=0x4) at dillo.cc:334 (gdb) Cheers, Johannes