Hi,

Threaded gimp crashes very frequently:

|(gdb) run
|Starting program: /usr/local/bin/gimp 
|Message: Passed serialization test
|
|[New Thread 31563 (manager thread)]
|[New Thread 31552 (initial thread)]
|[New Thread 31564]
|starting tile preswapper
|
|** WARNING **: gdisplays_flush() called recursively.
|!
|[Switching to Thread 31564]
|
|Program received signal SIGSEGV, Segmentation fault.
|0x818c596 in tile_idle_thread (data=0x0) at tile_cache.c:300
|300                    list->last = tile->prev;
|(gdb) 

Though I DON'T understand the code well, the following patch (w/ a garbage)
makes gimp much stable. Please check it. Is this correct logic?

Index: tile_cache.c
===================================================================
RCS file: /cvs/gnome/gimp/app/tile_cache.c,v
retrieving revision 1.12
diff -u -r1.12 tile_cache.c
--- tile_cache.c        1999/10/04 15:31:14     1.12
+++ tile_cache.c        1999/11/19 18:04:59
@@ -290,17 +290,18 @@
          if (tile->dirty) 
            {
              list = tile->listhead;
+             if (! list) printf ("!\n");
              
              if (list == &dirty_list) cur_cache_dirty -= tile_size (tile);
              
              if (tile->next) 
                tile->next->prev = tile->prev;
-             else
+             else if (list)
                list->last = tile->prev;
              
              if (tile->prev)
                tile->prev->next = tile->next;
-             else
+             else if (list)
                list->first = tile->next;
              
              tile->next = NULL;

Best regards,
-- 
[EMAIL PROTECTED]                       (Shuji Narazaki)

Reply via email to