Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Runs on PPC, crashes on Intel: Steve was right



Although the crashing code was indeed called in main(), replacing all static
non-POD variables with delayed initialization (static vbls inside of
accessor functions) fixed the problem, so that was it. Thanks!

Robert

on 2/24/06 5:44 PM, Robert J. Lang at email@hidden wrote:

> No, this code is called within main(), so it's after static initializers.
> 
> on 2/24/06 3:26 PM, Steve Checkoway at email@hidden wrote:
> 
>> 
>> On Feb 24, 2006, at 2:36 PM, Robert J. Lang wrote:
>> 
>>>   extern stringstream dbgPreCleanupStr;
>>>   dbgPreCleanupStr.str("");
>>> 
>>> which looks like a perfectly innocuous, legal call (and indeed, if
>>> I build a
>>> small test app that includes this call, it compiles and runs on
>>> Intel).
>>> 
>>> (stringstream dbgPreCleanupStr is a static variable that was
>>> initialized
>>> with the default ctor elsewhere.)
>>> 
>>> And, as I said, the app runs fine on PPC.
>> 
>> This looks like a case where you are running into problems with
>> initializer order. Is this code being called in another ctor of a
>> static object?
>> 
>> - Steve
> 
> 
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/xcode-users/email@hidden
> 
> This email sent to email@hidden
> 


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >Re: Runs on PPC, crashes on Intel (From: "Robert J. Lang" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.