gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange issue with Mutable Dictionary


From: Riccardo Mottola
Subject: Re: strange issue with Mutable Dictionary
Date: Fri, 16 Mar 2018 14:57:53 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1

Fred Kiefer wrote:
Hi Riccardo,

it is hard to help out with the amount of information given. Which version of 
Pantomime is Sebastian using? And how was the object causing the issue created? 
(init, initWithData:, initWithCoder:)

I have some further information here, Sebastian send me other stacks (he is using current SVN) of repeated crashes and they are all related in CWIMAPCacheManager and the method initInRange

http://svn.savannah.gnu.org/viewvc/gnustep-nonfsf/frameworks/pantomime/Framework/Pantomime/CWIMAPCacheManager.m?revision=643&view=markup&sortby=date

Here a message is allocated with:
aMessage = [[CWIMAPMessage alloc] init];


then a series of properties are set using CWParser parseXXXX (including the subject)

The crashes happen either when the pool is released in line 224 and NSData
or in the setter of one of the properties, as the first stack or with a crash at line 181, which is still inside this method.

Thus, this restricts to the "standard" init method of CWImapMessage (and the chain of CWMessage and CWPart), one of the setter/parser methods  or some memory error of the file handling.

I Don't see at a glance a gross error in CWImapCacheManager - initInRange, neither in the init hierarchy of CWIMAP-Message-CWMessage-CWPart

The class CWMessage itself is quite a mess. The init method set the version 
number, this belongs of course into the initialize method that is also present. 
The initWithData: method work only because the super implementation of this 
method calls the init method. The initWithData:charset: method is wrong, but it 
could as well just be deleted as this method is present on the super class and 
correct there. And the initWithCoder: method does not initialize the 
_properties ivar.

I would suggest that you clean up these issues first (and similar ones in the 
super class CWPart) and if the problem persists we have another go on it. If 
you have trouble with the clean up and am willing to help. I just don’t want to 
analyse a clearly broken class.


Yes it is confusing... also CWMessage has many subclases, so changes need to be kept in-sync. I'd appreciate some experience here and if possible, I'd clean up things gradually. As first, all "plain" init methods, whech seem to be the one involved in this crash, extenging them to the others. There are many comments in the code on how it is dangerous e.g. to set things using accessors instead of setting private IVars or other things which sound very scary.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]