Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gokilltime

macrumors newbie
Original poster
Feb 13, 2009
2
0
Hey guys,
I'm completely stuck.
I'm finishing a quite large iphone project and only a few dialogs left, everything else works fine. And this is a problem!
Ok, so I've got "settings" button in the main menu in my app, and when you tap it, a new dialog (class inherited from UIView) should appear. The thing is when you tap it, the app crashes _sometimes_. Sometimes it works well, the dialog appears as I want to and works pretty fine.
It crashes in a random place, with random stack, and the only thing the debugger says is Program received signal: “EXC_BAD_ACCESS”.
I've rewritten the dialog completely from scratch, it had no effect.
Yes, I have tried GuardMalloc - nothing, NSZombies - nothing.
Maybe you have any ideas?
 

xsmasher

macrumors regular
Jul 18, 2008
140
0
Hey guys,
I'm completely stuck.
I'm finishing a quite large iphone project and only a few dialogs left, everything else works fine. And this is a problem!
Ok, so I've got "settings" button in the main menu in my app, and when you tap it, a new dialog (class inherited from UIView) should appear. The thing is when you tap it, the app crashes _sometimes_. Sometimes it works well, the dialog appears as I want to and works pretty fine.
It crashes in a random place, with random stack, and the only thing the debugger says is Program received signal: “EXC_BAD_ACCESS”.
I've rewritten the dialog completely from scratch, it had no effect.
Yes, I have tried GuardMalloc - nothing, NSZombies - nothing.
Maybe you have any ideas?

When it crashes go to Run > Debugger. The top-left column should be the "stack trace" of what was running at the time of the crash. Look down the list until you see one of your methods, and click on it. With luck, the debugger will highlight the last line of that method that was run before the crash.

A bug that's hard to reproduce is hard to fix - but at least you'll know where to start.
 

gokilltime

macrumors newbie
Original poster
Feb 13, 2009
2
0
When it crashes go to Run > Debugger. The top-left column should be the "stack trace" of what was running at the time of the crash. Look down the list until you see one of your methods, and click on it. With luck, the debugger will highlight the last line of that method that was run before the crash.

A bug that's hard to reproduce is hard to fix - but at least you'll know where to start.

yes, i've done that. the problem is that it crashes in a random place: sometimes [UILabel alloc] causes EXC_BAD_ACCESS, sometimes it is [UIImageView initWithFrame:], sometimes it is free(...), the debugger is almost no help(
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.