★ TouchArcade needs your help. Click here to support us on Patreon.

Crash Issues and Solution Help?....

10-22-2009, 09:02 PM
#1
Joined: Sep 2009
Location: Alabama
Posts: 76
Send a message via Skype™ to bossman696
Crash Issues and Solution Help?....

This may not be the place for this, but I'm having an issue. I know I am in over my head as I am still learning to CODE. But my offshore developer has been very busy. To busy to work my bug issues into their schedule and my app is getting slammed with reviews all mentioning the same bug issue.

Now, to elaborate, the bug does not crash the program, so there are no crash reports generated to send to my developer. It hangs up certain animations in the game and other animations keep playing in the background, but never causes the program to quit and exit.

I am unable to reproduce this bug at all, but I will keep playing the game to see if it pops up at all after this posting. The developer says he has been unable to reproduce the crash as well.

My question is, are there any little tricks I can tell me developer about to try and narrow down this issue to speed up the debugging process? What about tools from APPLE I could try and run the code through to search for trouble spots.

I did notice while building the app, it would produce a lot of warning errors..

Can anyone tell me if these might be a issue? The developer would have gotten the same warnings I would think as the built the program for testing etc... The screen shot below lists 57 errors which is down from 256 in the original builds of the APP.


Things tend to go better when you help them along…..
Developer of Flight Deck
10-22-2009, 09:09 PM
#2
Joined: May 2009
Location: Palmerston North, New Zealand
Posts: 464
Some of those errors are a little hard to read but it appears that most of them come from not tidying up the code but they are unlikely to be issues. For example "control reaches end of non-void function" means the function doesn't return anything even though the function header says it will return something. Of course if you then try and use the object that isn't being returned in another part of your code you would likely get run-time errors which could be part of your problem.

But even if you fix all of those warnings you aren't going to know if you've fixed it since you are unable to replicate the bugs...

Check out Sheepish, 100+ levels of puzzle fun! With sheep!
And more about us: www.pixelthismobile.com
plus+ id: Newtz

10-22-2009, 10:59 PM
#3
Joined: Oct 2008
Location: Toronto Canada
Posts: 863
First, I agree with Mike - fix those warnings. If you're on Snow Leopard you might also want to build against the 3.x SDK and run the static analyzer - it can catch logic bugs that the compiler can't.

If animations are hanging it's either a bug in the animating logic, or your timing code. For example, you should check for and skip frames with negative deltas (or really big deltas). This can happen if you're using CFAbsoluteTimeGetCurrent.

SHREDD · GO FAST! FREE!
Nozoku Rush · Kick Math's Ass!
Critter Panic · Break yer brain! FREE!
Silverfish & Silverfish MAX · Hardcore arcade insanity!
Nozoku · A casual game of math & logic.
More: cbox.me · Twitter · YouTube

Last edited by ChaoticBox; 10-22-2009 at 11:02 PM. Reason: More info...
10-23-2009, 12:09 AM
#4
Joined: Sep 2009
Location: Vancouver, Canada
Posts: 977
Send a message via MSN to MindJuice Send a message via Skype™ to MindJuice
I wouldn't much trust code from a developer that allows over 50 warnings to remain in a shipping product, let alone allowing over 250 in a development build. When I develop I NEVER allow even a single warning to stay like that.

I always, always, always fix it immediately and rebuild until there are zero warnings and zero errors.

In your case you've got a couple of ones that could be issues:
  • "Xxx may not respond to -yyy" can cause an exception
  • "Control reaches end of non-void function" can cause a totally invalid return value. Basically the value is whatever garbage happened to be on the stack at the time. The result on the code will depend on the type of the return value. If it is a BOOL or int return value you might notice actions being taken when they shouldn't or vice versa. If it is a pointer to an object, then it will most likely crash immediately when that pointer is next used.
Focus on dealing with those first. This is the low hanging fruit of the debugging process.
10-23-2009, 04:57 AM
#5
Joined: Aug 2009
Location: Dublin, Ireland
Posts: 46
Best practice is to treat compiler warnings as errors and minimize them as much as possible. I agree with the previous comments, and I wouldn't want to see any warnings in a release build, let alone 50-200 of them. Fixing them might not fix the particular issue you're having, but it will rule it out as a possibility at least.

-- DaVoid Digital --
Check out AstroSerf - Update now available!
>> For more information, mosey on over to AstroSerf.com
>> Follow AstroSerfGame on Twitter for the latest news!
10-23-2009, 07:45 AM
#6
Joined: Sep 2009
Location: Alabama
Posts: 76
Send a message via Skype™ to bossman696
Thanks so much for the ADVICE....

I will post a zoomed pic of some of the warning so that you guys can get a better look. If you haven't already picked up Flight Deck... would you be interested a few promo code for your help?

Thanks again!

Things tend to go better when you help them along…..
Developer of Flight Deck
10-23-2009, 07:52 AM
#7
Joined: Sep 2009
Location: Alabama
Posts: 76
Send a message via Skype™ to bossman696
Better Warnings Pic....

Hopefully this will give you a better view....


Things tend to go better when you help them along…..
Developer of Flight Deck
10-23-2009, 08:27 AM
#8
Joined: Nov 2008
Location: Munich, Germany
Posts: 754
Send a message via Skype™ to mobile1up
a few warnings you should definitely address:

- warning: taking address of temporary
- warning: reference to local variable 'xxxx' returned

are definite bad programming style and since local variables are on the stack you could be trying to read values from memory that isn't no longer available (= crash). the following warnings would be nice to fix, because they can throw exceptions:

- XXXXX may not respond to -xxxxx

these can probably be fixed with better class definitions - declaring the function specification so that the compiler knows it exists.

the other warnings:

- control reaches end of non-void function
- unused variable 'xxx'
- deletiing 'void *' is undefined

will not crash your application; but should be cleaned up. the first will not return any value; so, whatever is in the register that controls the return value will be used - this could give "weird" results, and can cause a crash if used to determine an array index or something of that type. the others are just simple warnings.

you sould aim to never have any warnings - unless you are 100% sure they will be ok. i know sometimes there are hidden API's in the apple controls that you get a warning from but they work anyhow.. be sure to test that this code works as expected is a good rule as well.

// Aaron Ardiri
Mobile 1UP is a proud indie developer - support us!
developer of Caveman / Caveman HD and GW Series
10-23-2009, 06:16 PM
#9
Joined: Sep 2009
Location: Vancouver, Canada
Posts: 977
Send a message via MSN to MindJuice Send a message via Skype™ to MindJuice
Quote:
Originally Posted by mobile1up View Post
- XXXXX may not respond to -xxxxx

these can probably be fixed with better class definitions - declaring the function specification so that the compiler knows it exists.
Also, sometimes these are just because the programmer forgot to include the header file for the object in question. If the object actually does handle that message, then nothing bad will happen.

Other times you have type the method name wrong or given bad parameters. In those cases you'll get an exception.

As another poster said, fix all of these warnings first so you can rule them out as causes of your problem.
10-23-2009, 06:25 PM
#10
Joined: Sep 2009
Location: Alabama
Posts: 76
Send a message via Skype™ to bossman696
Thanks again for all the help! I really do appreciate it. Hopefully we can get ahead of this problem quickly!

Things tend to go better when you help them along…..
Developer of Flight Deck