• 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: App hangs when displaying any sheet in 10.5 [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App hangs when displaying any sheet in 10.5 [SOLVED]


  • Subject: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • From: Michael Vannorsdel <email@hidden>
  • Date: Tue, 10 Jun 2008 03:07:04 -0600

Ah ok. I was bit by something similar a few years ago. I had forgotten to put the prototype in my class interface and believed the compiler was using a prototype from an unrelated class which had different arg and return types. But the twist was the missing prototype caused the default id return and '...' arg types to be used (determined through asm studying). The presence of the other class's prototype was just suppressing the usual 'may not respond to selector' warning.

As far as trashing memory it was very likely trashing a floating point register your calling code was using and eventually using the trashed value for calculations and/or storing it to memory. For instance on i386 it might have had a float the calling code was using in fp0 and expecting the return value of your called method to come back on EAX, therefore believing fp0 would stay unchanged. But the called method was writing its return in fp0 (destroying the original value) and the calling code was casting whatever junk was in EAX to your float. Actual register names might differ but the effect is the same.


On Jun 8, 2008, at 6:29 AM, Graham Cox wrote:

No, this is not it. The method definitely did have a prototype - in fact it had *two*, differing only in return type. Judging by the assembler code, it used the one returning an int (actually an enum) not a float. It's still unclear why this generated code that trashed memory, but it did. It also did silently cast the result as well, which is perhaps why no warning was issued, because in some cases that's the desired behaviour.

_______________________________________________

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: 
 >Where to start looking to fix hang? (From: Graham Cox <email@hidden>)
 >Re: Where to start looking to fix hang? (From: j o a r <email@hidden>)
 >App hangs when displaying any sheet in 10.5 [was Re: Where to start looking to fix hang?] (From: Graham Cox <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [was Re: Where to start looking to fix hang?] (From: Graham Cox <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [was Re: Where to start looking to fix hang?] (From: Andy Lee <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: Graham Cox <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: Brian Stern <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: "Hamish Allan" <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: Graham Cox <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: "Hamish Allan" <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: Michael Vannorsdel <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Spotlight sources w/o actual files?
  • Next by Date: failure to create NSStatusItem
  • Previous by thread: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • Next by thread: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • Index(es):
    • Date
    • Thread