• 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: crashes on intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crashes on intel


  • Subject: Re: crashes on intel
  • From: Shawn Erickson <email@hidden>
  • Date: Sat, 03 Jun 2006 10:14:01 -0700


On Jun 3, 2006, at 8:03 AM, Buddy Kurz wrote:

FWIW: I experienced a similar problem when an application randomly crashed at the same spot on Intel but worked OK on PPC.
I was tracking a changing string value using something like if (! ([oldValue isEqualTo:newValue]) {...}
The crash occurred on Intel when the oldValue had not been set.
The problem was either -NSString isEqualTo:(NSString)arg crashing on a nil object value (on intel) or a non-nil un-initialized object pointer in the method. I was unable to duplicate the problem in a simpler test application.


My solution was to initialize the oldValue to @"" (I was assuming a nil value was the culprit)
In retrospect, I'm wondering if there was just some random value in the un-initialized variable.

That sounds like you had a bug in your code exposed when running on Intel.


If you attempt to send a message to an unintialized variable (stack based) you have the chance of attempting to send a message using an invalid pointer. The way the stack is managed on PowerPC and Intel is different so when running on Intel you likely had a better chance of hitting the issue.

Sending a message to nil will not cause a crash on either platform (unless you some how hit a bug in the objective-c runtime but I kinda doubt that).

-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >crashes on intel (From: Karim Morsy <email@hidden>)
 >Re: crashes on intel (From: Buddy Kurz <email@hidden>)

  • Prev by Date: Re: why doesn't my scrollview scroll ... solved
  • Next by Date: Re: why doesn't my scrollview scroll ... solved
  • Previous by thread: Re: crashes on intel
  • Next by thread: Link error when building with Release
  • Index(es):
    • Date
    • Thread