Re: Random crashes in release but not in debug
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=Ejr/ckwYV3KkR7I/yxH9CY+dxijAjOlgiryLfPrhYks=; b=DQ0Y1qBP+VWCkdZ1b2Nzm/f9nzmRJk2H8xgNsVKNiQBZSPbeoMS7fUipv4S8KaVPwQ on/MpF9kxmMePrHthn/57IhoIlz5xV1sdrFWiwPZr/fqqocwGM8lvZBpR+zS9e7VDSc4 TOb19qMPGQL9PXFyDbJI2bK2JGm/lHfBiWbtg= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=nIZBhOp8I7/LlW6dmEAzywRVMdMWxhW8lZxi/YWek/C+AMNCIyYiMFgEmwcwDCEXE4 toVE9k0CXJWSAorEh4/8fHxfd8WX4leyHWtd9r+XGCcbmkNWaXSzWhFyfT1+5ntTLBkj UWPdz7GjUXc96gd2e27gtCgbm7PK8bmP1TlpM= On Mar 31, 2010, at 11:51, Ken Thomases wrote:
On Mar 31, 2010, at 1:35 PM, Laurent Daudelin wrote:
In any case, what would cause an application built with the debug configuration to not exhibit this bug at all while the same application built with the release configuration will crash randomly?
Changes in the layout of code or the stack. In particular, if you have bugs involving uninitialized variables or stack smashers, the behavior may change if such layout changes.
If you haven't already, run the static analyzer (Build and Analyze) on your code. Also, turn on as many compiler warnings as are useful and fix them. Note that some warnings require that optimizations be turned on to be effective, because they rely on data-flow analysis and the like that's only performed during optimization.
Good luck, Ken
Ken, Just an update. I ran the analyzer and it found out a variable that was not initialized but that I was using later to check for nil value. I did recompile with change and my app has been running for well over 2 hours now without a single crash. Thanks! -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daudelin@gmail.com Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries_________________... Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com
participants (1)
-
Laurent Daudelin