Usually my iOS app works fine. But sometimes it crashes.
I attached screenshot. I called functions to show admob interstitial.
It crashed.
I am not sure how to debug it and why it crashed that time.
That code works fine most of time but rarely crashes.
My app uses ARC.
It is iphone Open GL ES 2.0 game with Admob and iAd
How do I debug it?
What steps should be done?
I am not sure when I will see such crash next time.
Crashes happen but not often. So If I will remove some components like iAd and will test then I do not know when it will crash and how many tests to run to ensure that removed part was coursing a problem or not.
I do not wish to submit app that sometime crashes. It may course bad reviews.
UPDATE for crashes
#try/#catch is not helping.
delegate update is not helping either.
I got such crash again and have no idea what I can do or what is coursing it.
Wrap that call with try/catch.
Related
I've created a game with KivyMD and currently I am testing it on iOS. I have tested the game on Android and it works flawlessly. The game builds successfully in XCode and once built, the game works fine on an iPhone. However, few days later, something seems to be going wrong and app starts to crash in iPhone. As soon as I launch the game, I see a black screen which appears to be a pre-splash. However, I haven't set a pre-splash for the game. If I rebuild the game in XCode again, it builds successfully with no errors and the app starts to work fine again for few more days and then it starts to crash. Can someone help me with the following?
Is there a way to look at the error message in some log file on iPhone when the app crashes?
Is there a debugging tool that I can use to troubleshoot when the app crashes?
Is there an iOS simulator app that I can use on my iMac to test the app?
XCode shows the build log as successful always. So, the app crashing appears to be a run-time error. Unfortunately, I am new to this and needs some help.
Thanks in advance.
UPDATE: You'll probably want to find a solution that is specific to Kivy. This answer may help. In fact, your question may be considered a duplicate:
https://stackoverflow.com/a/27175629/2476389
Generally, I recommend Firebase Crashlytics for crash logs. If a crash occurs in your app, the stack trace and other helpful info will be uploaded to your Firebase console the next time the app is started. You can see all your crashes in the console. You will need to follow the instructions to integrate crashlytics into your app and then release a new build, but it's well worth it. This will allow you to get crash logs from all devices (testers, users, etc).
https://firebase.google.com/docs/crashlytics
For crashes you can reproduce on your dev device, you can also retrieve the log directly:
https://developer.apple.com/news/?id=nra79npr
I'm trying to log a time before the app gets terminated and it seems to behave differently on an app crash so the time never gets logged. NSSetUncaughtExceptionHandler is a potential solution but I'm finding that it's not recommended if we're already using other 3rd party frameworks like crashlytics / fabric. Can anyone suggest the proper approach to solving this problem?
This is my first time that I'm running app on my device. I was wondering what to do when app crashes. When it crashes, I can not open the app again, the app data is corrupted I think. Do I need to write some code for this scenario? When app crashes I want to be able to open my app again. I was using simulator till now and this is my first time on my device. I was searching but could not found how to recover my app
You can recover from almost anything if you handle exceptions AND signals
BUT you should't:
crashes shouldn't happen and if you get a unix signal you shouldn't try to recover because after a near-crash the app may be in a quite undefined state
localize & fix & prevent the crash
Localize the source of the crash, add checks to prevent the crash. You can also set a global exception handler to help you debugging the issue.
I had same problem; and found a library that handles hardware exceptions that xcode can not. the library name called SignalRecovery;
you will find an error using the library in sizeof function that should take a struct.
I am writing an iOS app and have installed it on my iPhone 4, and there is a very weird problem.
When I run it on my device under debugging, it seems to work well when breakpoints are set. However, when I directly use the app without debugging on my device, when I push into a view and pop to its parent view (in a navigationController stack) without doing anything else, the app crashes. Sometimes it crashes after I do the push-pop action twice, other times only after once.
I've checked the memory management and analyzed it, but have not found any potential memeory leaks yet. Does anyone know what the problem could be?
Since this problem won't apprear under debugging, I'm not sure how to begin to fix it.
Hoping someone is able to provide me with some experience and clues.
I found the answer myselfy,
actually there no doubt that it was because unperfect memory manangement, my app goes well after I take care of all potential leaks.
That is it.
I know it's a bit weird but I have no code at all to put here, unless I copy all of it.
My project is crashing with no apparent reason. I've read this solution: iPhone application is crashing and not leaving behind a .crash log file
and I'm using Instrument for searching for leaks and other possibilities for those crashes.
Another strange thing is: even when I run my app with debug on XCode, it just stop to work on my IPad but it looks it is still running.
And the last and more strange thing: there's no crash log at all on my device. Before somebody ask, it is enable to record crash logs.
Does anybody have any idea for helping me?
Regards
I've had this happen to me before on various platforms. If its crashing on you, whether its an iPhone app, openGL / DirectX program, try these steps:
Have you tried to undo your last change and get to the point where it last worked?
Have you tried placing a print outputs to the terminal to see how far your program is executing? Start at the beginning and work your way into your program. This is especially useful when there is no crash log.
Also in particular to iPhone apps: Have you checked your xib's? Did you recently re-factor and change the name of a class maybe? You might need to re-link your nib to your classes. This on more than one occasion has caused apps of mine to crash with no error. Hope this helps.
I doubt you are still wondering about this, but my answer is that you were experiencing your app getting killed by the OS due to using too much memory. This will silently fail in the log in my experience when running on the device.
You will have to go into the Organizer to the device console and crash reports that get stored on the device to see the clues.
The reason your crash stopped when you got an iPad 2 is because the iPad 2 has twice the memory of the iPad 1 (which is dramatically under-stocked with RAM)