Re: nsdocument application hang ...
Re: nsdocument application hang ...
- Subject: Re: nsdocument application hang ...
- From: Graham Cox <email@hidden>
- Date: Tue, 9 Jun 2009 17:21:51 +1000
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 (email@hidden)
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:
This email sent to email@hidden