App paused on Splashscreen. Getting EXC_BAD_ACCESS error - ios

I'm trying to run my game on a Iphone 6. Build process is completed but after load the game, I received the following error on DisplayManager.mm file, line: return self[targetScreen] !=nil;
Thread 1: EXC_BAD_ACCESS error (code=1,address=0xc).
DisplayManager.mm file is here.
I don't see any error on the debugger log. Objective-C Automatic Reference Counting is set to YES
I can see the Icon on my iphone, but the game crash after loading. I exported this game from Unity 5.7 and I'm running on XCode 7.3
Any recommendations are welcome, Thanks

Deactivate all plugins, rebuild the project from scratch and try adding the plugins one by one. If that still doesnt work deacrivate any byte code stripping, enable exceptions and use the MONO scripting backend instead of LLVM. (for testing)

Related

Xcode 9 crashing when running split view app on iPhone

After working just fine on both iPhone and iPad for a month, my Xcode 9 app has consistently started crashing causing me the following fatal problem: When I build & run it on an iPhone (simulator or device) Xcode completes loading the app and then crashes too fast for me to copy/paste the error from the debugger. When I run on iPad it works fine leading me to believe this is a result of something related to the split master/detail view.
If I use either an exception breakpoint or an "all C++ exceptions" it will stop at the AppDelegate class and crash if I hit play. If I use only an "all Objective-C exceptions" it will crash as before.
In the debug view hierarchy I get the following errors as well:
Error: Unable to capture view hierarchy.
Details: Log Title: Data source expression execution failure.
Log Details: error evaluating expression “(id)
[[(Class)objc_getClass("DBGTargetHub") sharedHub]
performRequestWithRequestInBase64:#"...
Log Method: -[DBGDataSourceConnectionLibViewDebugger
_executeLLDBExpression:forRequest:onPotentialThread:iteration:]
_block_invoke_2
Method: -[DBGViewDebugger updateDebugHierarchy]_block_invoke_2
I have tested other apps and this issue is unique to the app I am working on. Any ideas or debugging tips for how to proceed? I might just have to redo this whole project again if I can't even find the root cause of this! Appreciate any help.
Quick solution: Reset Simulator Device
I managed to resolve the above issue thanks to some serious digging. First, to resolve the instantaneous crash problem, I set a breakpoint at every line in the app delegate. That allowed me to narrow the error to a memory handling problem. From there I started running the code on one of each device available, and realized the crash only occurred on devices I had used earlier in development. Resetting those devices solved the problem.
The core issue here is that when you clean/rebuild your xcode program, it updates the app code on the device, but not necessarily the data model information. So when I changed my data model by including new data and renaming old data it was not properly updated.

Xcode+watchkit simulation: does not support a debuggable architecture:

I am trying to run in Xcode both the main App (which is active in background) and the WatchkitApp (which sends requests to main App through the watchkit extension). Everything works fine in standalone, but no way to make it work simultaneously.
My main concern is to understand this message when trying to attach a process: what does this mean ?
Xcode couldn't attach to "myApp"
"myApp" does not support a debuggable architecture
Thank you.
Edit:
I just read that main app in ObjectiveC and watch app in swift is a problem: https://mkswap.net/m/blog/How+to+debug+an+iOS+app+while+the+WatchKit+app+is+currently+running+in+the+simulator
It happened to me when an extension process was hanging around refusing to terminate. Find and kill it in the Activity Monitor.
Actually, I had that same error message, and I fixed it by resolving a bug that crashed my phone app on launch.
I didn't think to run just the phone in debug so I got confused too.
I'm running ObjC on the phone and Swift on the Watch App.

App crashes before debugger can connect

I've got an app that crashes even before the debugger can connect.
I placed a break point on the first line of main(). (I added an NSLog statement as very first statement in main() and set the break point there.
The app seems to start. The main screen with some ui elements becomes visible on the screen. Then it disappears.
There is no crash log found on the devices.
Xcode message:
Could not launch "appname"
process launch failed: failed to get the task for process xyz
Debugging is enabled of course.
The same for the profiler Instruments.
Code signing works fine so that the app can be deployed to the devices.
(Same for enterprise distribution. And the app validates for store submission.)
It does work on the simulator though.
The app used to work fine. I was just about to build it for the store. For final tests on iOS 8.1 I upgraded to Xcode 6.1 with SDK 8.1. But the problem did not occur directly after the upgrade. It worked just fine.
Then it crashed when building for release for enterprise distribution.
The AppStore build crashed in the same manner (according to Apple, the app was rejected of course.)
But it ran nicely in debug modes.
Now I was trying whether compiler options for optimization may make all the difference and I was trying to build in release mode with debugging enabled etc and end up with a debug build crashing as well. (No optimization in debug).
So it may well be that the migration to Xcode 6.1 did cause it but the problem may have come effective only after Xcode cleaned and rebuild the project in response to changes to compiler settings for code optimization.
Sorry for the long text. I tried to put everything in that may be of importance.
Reason is most likely some incompatibility of Crackify and iOS 8.1.
Therefore it may be of interest for others, altough my problem along with these symptoms may be very special.
Very early within AppDelegate didFinishLaunchingWithOptions we have had the following statement.
if ([Crackify isCracked] || [self isCertificateUnvalid])
exit(173);
That, as such, is not really well designed. The app is just terminated rather than any error message displayed to the user. Thus, it appears as if the app has crashed. But it has not crashed and therefore no crashlog is provided.
For reasons which I don't yet understand and which may not be related to this error, my debugger did not manage to hook up into the executed app. Once that was overcome (suddenly the debugger worked without any changes made to any of the debugging related settings) the error was found rather quickly.
This is Crackify: https://github.com/itruf/crackify
Within Crackify it was this code sniplet that caused the problem:
static NSString *str2 = #"ResourceRules.plist";
BOOL fileExists3 = [manager fileExistsAtPath:([NSString stringWithFormat:#"%#/%#", bundlePath, str2])];
if (!fileExists3) {
return YES;
}
For reasons that I did not further investigate, the file, that is tested here, apparently does not exist in iOS 8.1 any more.

The program 'Mono' has exited with code 0 (0x0) when debugging iOS from VS

I have a problem that when I try to debug my iOS app with VS2013 (with Xamarin) I get the following error:
The program 'Mono' has exited with code 0 (0x0).
I am aware of the following answer. Cleaning the solution does solve the problem but then the next time I debug I need to do it again...
Would really appreciate if someone has a long term solution.
Is it crashing during launch? You've only got 10 seconds to launch and complete the FinishLaunching method in the AppDelegate, otherwise iOS terminates the app. This restriction doesn't apply in the simulator. If you've got a breakpoint in code that is running in this 10 second window, there's a very high likelihood that the app will be terminated unless you're very quick to continue.
I've also found that having breakpoints set anywhere in the app can add a few seconds to the launch time while the debugger hooks everything up. If your app is big or uses a framework like MvvmCross (which can take several seconds to initialise), you can be in a position where every millisecond helps.
If you can, let the app launch, then set any breakpoints. But if you're trying to debug your startup code, that's far from easy.
If you are using the Visual Studio Android Emulator: have you tried check "Migrate to a physical computer with a different processor version" in Hyper-V?
I got this trick from here Fix for Could Not Connect To Debugger

Thread 1: EXC_BREAKPOINT(code = EXC_I386_BPT, subcode=0x0

I am working on to-do list app for iOS. when i build the run the app on my system which i used to development, there are no problems. However when i xcode project on another system.
I get the following error and the app crashes on launch.
Any inputs on what is going wrong?
Thread 1: EXC_BREAKPOINT(code = EXC_I386_BPT, subcode=0x0
I've experienced this while using a breakpoint which would log something and then continue automatically. Disabled that, and things returned to normal. As the message suggests, it's a breakpoint issue

Resources