[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNUMail crashes
From: |
Riccardo Mottola |
Subject: |
GNUMail crashes |
Date: |
Fri, 12 Sep 2014 17:13:35 +0200 |
User-agent: |
GNUMail (Version 1.2.1) |
Hi,
when a timeout happens on GNUMail and IMAP, I get a crash:
#0 0xb720d2f3 in objc_msg_lookup ()
from /usr/lib/gcc/i686-pc-linux-gnu/4.8.3/libobjc.so.4
#1 0xb72a370d in -[GSMutableArray addObject:] (self=0x82bedf8,
_cmd=0xb76400a8 <_OBJC_SELECTOR_TABLE+40>, anObject=0x84efe80)
at GSArray.m:472
#2 0xb73318cc in NSAllMapTableKeys (table=0x8208cc8)
at NSConcreteMapTable.m:180
#3 0xb7ed1d92 in number_of_unread_messages ()
at ApplicationIconController.m:176
#4 0xb7ed220b in -[ApplicationIconView drawRect:] (self=0x825ba60,
_cmd=0xb7b0aa80 <_OBJC_SELECTOR_TABLE+2112>, theRect=...)
at ApplicationIconController.m:289
IN this local code, I added two checks:
cache = [[MailboxManagerController singleInstance] cache];
if (cache == nil)
{
NSLog(@"number_of_unread_messages(): nil cache");
return 0;
}
if (_cache == nil)
{
NSLog(@"number_of_unread_messages(): nil _cache. Possibly
connection closed.");
return 0;
}
allKeys = NSAllMapTableKeys(_cache);
result = 0;
Besides the initial confusion between _cache and cache, we know that
_cache is not nil, het NSAllMapTableKeys is nil. Why?
when the connection terminates, It gets treated this way:
- (void) connectionTerminated: (NSNotification *) theNotification
{
NSMapRemove(_cache, [theNotification object]);
[self update];
}
why should I get a crash later?
Riccardo
- GNUMail crashes,
Riccardo Mottola <=