On 09/06/2009, at 5:05 PM, Brasseur Valéry wrote:

I am developing an NSDocument base app. When I run it without modifying my doc, all is working. If I made a modifcation, the application hang while display the "unsaved sheet" ...

I don't know how to debug that ...

any ideas would help.


I had this exact problem some time ago.

It turned out to be subtle corruption of my application's heap in a completely unrelated part of the program. As such, it was extremely difficult to track down, but the symptoms were exactly as you describe.

The cause, as I recall, was that I had two methods defined thus:

- (float) someMethod;
- (int)   someMethod;

Despite the different returns types, these have the same signature. However, the compiler will use the signature of whichever one it happens to encounter first during compilation, and emit code accordingly. In my case, it went for the int version as it was defined by a system framework. The resulting code will tend to corrupt things pretty badly, yet do so without causing an immediate fault.

This is only one way that heap/stack corruption can occur of course, but when it does occur, it seems to commonly cause a problem for the "save changes" sheet. So you might want to look for similar corruption occurring.

--Graham


_______________________________________________

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 arch...@mail-archive.com

Reply via email to