Hi,

I found this bug too, but didn't know it was already reported on the list :) I've wrote a quick fix, and attached the patch. You probably want to alter this, because now you will only get an assertion error in the log.

The thing is, task_save_new_from_article() returns NULL, but it will be queued anyway. So I made it skip the request.

Both Ctrl-S and Shift-S versions are fixed in the patch.

John

On Sun, 13 Nov 2005, Robert Marshall wrote:

If you select an article that doesn't have an attachment and try to
download the attachment then pan (built Oct 3rd from cvs) crashes on
me

I get a traceback of

(gdb) where
#0  queue_run_tasks_foreach (task_gpointer=0x0, user_data=0xbffff580)
   at queue.c:839
#1  0xb7b5e382 in g_slist_foreach () from /usr/lib/libglib-2.0.so.0
#2  0xb7b638fc in g_thread_self () from /usr/lib/libglib-2.0.so.0
#3  0x00000000 in ?? ()
#4  0x08539f38 in ?? ()
#5  0xbffff588 in ?? ()
#6  0x080898b1 in queue_upkeep (do_loop=0xb7ba3418) at queue.c:924
Previous frame inner to this frame (corrupt stack?)

I know it's a pretty silly thing for me to do but ....

I was originally trying to select a group of articles and download
their attachments and somewhere in the long list lurked one article
without an attachment

Robert



_______________________________________________
Pan-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pan-devel
Index: article-actions.c
===================================================================
RCS file: /cvs/gnome/pan/pan/article-actions.c,v
retrieving revision 1.67
diff -u -r1.67 article-actions.c
--- article-actions.c   9 Mar 2005 20:15:57 -0000       1.67
+++ article-actions.c   18 Dec 2005 13:31:27 -0000
@@ -314,6 +314,8 @@
        {
                /* queue for decode */
                PanObject * task = task_save_new_from_article (articles[i]);
+               if (!task)
+                       continue;
                task_save_set_attachments (TASK_SAVE(task), NULL, NULL);
                tasks = g_slist_prepend (tasks, task);
        }
Index: save-ui.c
===================================================================
RCS file: /cvs/gnome/pan/pan/save-ui.c,v
retrieving revision 1.43
diff -u -r1.43 save-ui.c
--- save-ui.c   9 Mar 2005 20:15:58 -0000       1.43
+++ save-ui.c   18 Dec 2005 13:31:27 -0000
@@ -125,6 +125,8 @@
                const Article * article = ARTICLE(l->data);
 
                PanObject * task = task_save_new_from_article (article);
+               if (!task)
+                       continue;
 
                if (_save_attachments || _save_text)
                {
_______________________________________________
Pan-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pan-devel

Reply via email to