• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: nsdocument application hang ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >nsdocument application hang ... (From: Brasseur Valéry <email@hidden>)

  • Prev by Date: nsdocument application hang ...
  • Next by Date: [NSTask] -launch return
  • Previous by thread: nsdocument application hang ...
  • Next by thread: Re: nsdocument application hang ...
  • Index(es):
    • Date
    • Thread