discuss-gnustep
[Top][All Lists]
Advanced

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

Re: strange crasher that puzzles me


From: David Chisnall
Subject: Re: strange crasher that puzzles me
Date: Tue, 31 Mar 2009 15:19:24 +0100

On 31 Mar 2009, at 14:32, Sebastian Reitenbach wrote:

   numberStack = [NSMutableArray array];

This line is your problem. It creates an autoreleased array. The next time you enter this method, the numberStack pointer will still be non-nil, but if the autorelease pool has been destroyed (typically at the end of the run loop iteration) then this pointer will be invalid. Attempting to dereference it will cause a segmentation fault. Try changing it to:

   numberStack = [NSMutableArray new];

David




reply via email to

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