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: Windows app crashing--what to do?



Hi,

I'm writing a relatively simple cross-platform app for Mac and Windows. I'm using CW 8.3. On the Windows side, it crashes occasionally. The problem is, if it crashes in CW, I get no indication that it has happened, other than the fact that the log says, "Access Violation at address 0xCCCCCCCC".


I'm not sure about CW, but Microsoft Visual C++ compiler initializes stack variables in debug build with 0xCCCCCCCC. Other useful numbers: 0xCDCDCDCD - uninitialized memory allocated by debug C runtime, 0xEEFEEEFE - deallocated memory. It's only in debug build. In release build, nothing gets initialized for performance reasons. That, by the way, is the most common reason why release and debug builds may behave differently.

So, in Microsoft Visual C++ world, "Access Violation at
address 0xCCCCCCCC" usually means "use of initialized stack
variable as a pointer". It may mean the same in CW.

Occasional crashes are most often caused by race conditions
or lack of synchronization. A simple single-threaded program
given the same input, always crashes in the same place.

Good luck,
-Slava

On the Mac, it shows where the bad operation occurred. In the PC version, I get nothing like that.

Once it happens, I can't pause the app to see where it happened, obviously. And stepping through the code seems to be getting around the problem (I think it's a timing issue).

On the Mac, the crash log provides a lot of useful info, specifically it tells me where things went south, in my app. CodeWarrior's debugger is equally helpful.

So my question is, how do I figure out where my app crashed, in WindowsXP? Could I have CW set up wrong?

Thanks,
-Chilton

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

This email sent to email@hidden
References: 
 >Windows app crashing--what to do? (From: Chilton Webb <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.