On Tue, Aug 5, 2008 at 7:51 PM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: > I have a document based app which works perfectly with -O0 or -O1 but > crashes with -O2 or higher. > > When the crash occurs the debugger comes up and says: "Previous frame > identical to this frame (corrupt stack?)" > > When I try to step through the function (which is kind of difficult, as the > optimization has shuffled the lines a lot) at some time the top frame of the > stack gets duplicated. > > The faulty method starts with: > NSString *path = @"/Users/gerriet/Desktop/some alias"; // error > with -O2 > > If it starts with: > NSString *path = @"/Users/gerriet/Desktop/some file"; // ok > with -O2 > then everything works perfectly. > > When I comment out the place where the error seems to occur, it will just > occur at some earlier place.
You are moving things around in memory by chaning the length of your string above and commenting out things. Additionally changing optimizer settings shuffles things around. I have a feeling you are hitting an issue cause by an uninitialized value or something similar in your code that is being hidden in some situations by the code emitted. Also are you sure you are getting any runtime exceptions logged? -Shawn _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]