Unity - Distribution build crash - EXC_BAD_ACCESS - KERN_INVALID_ADDRESS - ios

I have developed a game on Unity (2019.2.16f1) and I have a big problem :
The build submitted to the App Store crash after 1 second (on startup)
Some more informations :
I coded some c# script, but most of the game is running with Bolt (Ludiq / Visual scripting)
I use the Unity Cloud Building service (For development and distribution build)
The development build dont crash. Only the distribution build. (The one submitted to the app store connect)
I distribute the ipa file with the mac "Transporter" application
I use UnityAds in this game
Here is the main log :
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000000000000003a
VM Region Info: 0x3a is not in any region. Bytes before following region: 4367777734
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 0000000104570000-0000000104574000 [ 16K] r-x/r-x SM=COW ....app/z4league
(Full Log : https://docs.google.com/document/d/1wjLG5oKqP_isgPce8ND5Nrz7wYtoiC2OIXc1cN9sPy0/edit?usp=sharing)
Did someone had this (quite obscur) problem ?
I did some research on google, but nothing seems to be appropriate to my case.

I did not find the exact solution of this problem.
What I did is remove "Bolt" from the project and re-code everything in c#.
(By the way, incredible exercise for learning to code c# in Unity)
My game is now validated by Apple and ready to go live

The problem is with the location of your project files. It is trying to access that location. It could also be a problem which is caused by app store. "The development build doesn't crash. Only the distribution build." <- This is caused by you. You did something wrong when building the app or releasing it for distribution. Try to give access to the location where you have your project files. And also try watching a tutorial for releasing your app for distribution from YouTubers like Brackeys etc.

Related

How to use a launch storyboard or XIB?

iOS App Store did not reject but downloaded app can not complete app launch
Published version in App Store stays on startup then closes.
My NativeScript-Vue app was updated from NS v6
I have re-generated splash images
runs fine through ns run ios --device or ns run ios --emulator
I can run app on iphone 6S using Xcode too
I can even publish to Apple Store and it's excepted.
But released app can not start and stays in the launch screen for a while then closes.
It looks like It's the same error I was getting in my previous attempt to build.
My app runs only if Main Interface area is empty
If I select LaunchScreen or LaunchScreen.storyboard app stays on launchScreen for ever.
Details:
I am getting errors after build analysis such as;
/Users/user/Documents/myapp-mobil/platforms/ios/Pods/MaterialComponents/components/Tabs/src
/MDCTabBarViewController.m:213:5: nil passed to a callee that requires a non-null 1st parameter
and
/Users/cemkaan/Documents/myapp-mobil/platforms/ios/sebappmobil/Resources/Assets.xcassets:1:1: Launch images are deprecated in iOS 13.0. Use a launch storyboard or XIB instead.
iOS Development Target: 12.4
It was rejected from the app store with a Binary Rejected notice
iOS crash log which I have shared as a gist. says:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
UNUSED SPACE AT START
__TEXT 1003e8000-1003ec000 [ 16K] r-x/r-x SM=COW ...p/myappmobil
Am I doing something wrong in Main Interface area?
Is there any way to determine; why the published version can not complete the app launch?

iOS/Xcode all projects loading a custom embedded framework started crashing today

I'm working on an iOS project with a moderately complex build system that creates a framework/universal binary.
While making some changes to that framework & it's test app, running it suddenly started crashing in dyld before hitting main(). It appears to be an issue with Xcode, as reverting the build and even downloading a known good version now produce the same result! Dyld is failing to load the custom framework:
Process: TestApp [530]
OS Version: iOS 9.2.1 (13D15)
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Triggered by Thread: 0
Dyld Error Message:
Dyld Message: Library not loaded: #rpath/Test.framework/Spin
Referenced from: /var/mobile/Containers/Bundle/Application/8A7C50D3-F3A1-4DB6-8929-52607F8605A2/TestApp.app/TestApp
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/8A7C50D3-F3A1-4DB6-8929-52607F8605A2/TestApp.app/Frameworks/Test.framework/Test
mmap() errno=1 validating first page of
'/private/var/mobile/Containers/Bundle/Application/8A7C50D3-F3A1-4DB6-8929-52607F8605A2/TestApp.app/Frameworks/Test.framework/Test'
Error Formulating Crash Report:
Failed while requesting activity/breadcrumb diagnostics
This problem appears to have numerous possible root causes. I've tried the various solutions posted for question 32730312 (here: Reason: no suitable image found.) including:
deleting the projects Build and DerivedData folder
deleting various Xcode cache folders
restarting xcode, the computer & even the devices
regenerating the provisioning profile
discarding the project and building from a fresh pull or even previous releases of the SDK
None of those remedied the problem.
The project runs fine on the simulator, but not on a device. I'm unsure what else to try short of reinstalling Xcode and/or creating a separate user account as there's apparently something else blown apart in Xcode that I've missed!
Update: problem solved, root cause unknown.
I tried creating a new user account, checked out code from there, and got the same error. So, it wasn't a "hidden cache" of Xcode badness either...
Left with literally nothing else to try, I uninstalled & reinstalled Xcode, and everything started working again.
I post my results here hoping the last six hours of pain can help at least a single troubled soul... Ack!

Xcode sometimes crashes when I try to debug in iPhone Simulator after I upgrade Xcode6

I am developing an iPhone app and using iPhone Simulator most of the time.
When I try to debug one of my project in iPhone Simulator(does not matter what type and OS version) for debugging, Xcode sometimes suddenly crashes.
After this error happens, changing code just one line and recompiling solves crash, but Xcode6 always crashes when I try to debug the project in iPhone Simulator if I don't recompile the project. Then, after continuing programming for a while, same crash happens.
I might found the reason of crash, which is difference of the signing date and last modification date, from an another topic, but I'm not sure how to approach solving it. (The person said because of Xcode5, but It had never happened when I was using Xcode5 on Mavericks though.)
Compiling and linking C extension for Python in Xcode for Mac
The workspace of the project has nested several static libraries projects, so I suspected that it's because of editing nested library code, but it was also happened when I editing only main program code.
This crash is not always happen, so hard to solve what is wrong for me.
The workspace of the project is kind of huge, so I would like to avoid creating new workspace if it is possible.
I really appreciate someone helps.
This is the crash report.
Crashed Thread: 25 Dispatch queue: DBGLLDBLauncher Serial Queue
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x00000001359eb000
kernel messages:
-2 sec CODE SIGNING: cs_invalid_page(0x1359eb000): p=21345[Xcode] final status 0x1000200, denying page sending SIGKILL
-2 sec CODE SIGNING: process 21345[Xcode]: rejecting invalid page at address 0x1359eb000 from offset 0x1f3e000 in file "**PATH_OF_EXECUTABLE_FILE**" (cs_mtime:1412141335.0 == mtime:1412141335.0) (signed:1 validated:1 tainted:1 wpmapped:0 slid:0)
VM Regions Near 0x1359eb000:
MALLOC_LARGE 0000000131224000-0000000133aad000 [ 40.5M] rw-/rwx SM=PRV
--> mapped file 0000000133aad000-0000000136336000 [ 40.5M] r--/rwx SM=COW
MALLOC_LARGE 0000000136336000-0000000137690000 [ 19.4M] rw-/rwx SM=PRV
I started running into this problem recently. Tried without success a range of things to fix it including reinstalling Xcode (as Apple's Crash Reporter dialog suggests), reset the Simulator, clean build, clean DerivedData folder, etc. Getting desperate, I actually studied the crash report.
The clue to fixing it for me lay there:
Thread 24 Crashed:: <DBGLLDBSessionThread (pid=7926)>
...
14 com.apple.dt.dbg.DebuggerLLDB ... -[DBGLLDBSession _createBreakpointFromFileBreakpoint:] + 254
...
LLDB is trying to create a breakpoint at the time it crashes. So, I deleted all my breakpoints in Xcode before re-running the project in the Simulator and now it works.
(You didn't post enough of your crash report to see what happened in your case, so your mileage may vary.)
I do these steps after every update of Xcode:
Product --> (hold down Alt key) Clean Build Folder
Product --> Clean
Window --> Organizer --> Delete derived data
Then rebuild the project
Code signature issues are usually due to a corrupted or incomplete install. It might be that Xcode.app is loading a plugin at the time of the crash, and it is failing code signature verification. The snippet of your log is not enough for me to dive into it more. Please file a radar at http://bugreport.apple.com (and reference the number here if you don't mind).
Also, you might try deleting Xcode.app from your system and reinstalling if you're feeling up to it.
I got this same error, and resolved it by configuring Code Signing Entity and Provisioning Profile appropriately.

Mono for Android App crashes on start after clears data in app settings

I have found that my Mono for Android app crashes on each start after the user goes to Settings->Apps->MyApp and selects "Clear Data". I created a new project with the Mono for Android "Hello World" application, and this app exhibits exactly the same behaviour, which leeds me to the assumption this happens somewhere in the mono stack away from my control. If I check with adb logcat, this are the relevant lines that I can find:
I/ActivityManager( 185): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=Test_App.Test_App/test_app.Activity1} from pid 386
D/dalvikvm(18358): Late-enabling CheckJNI
I/dalvikvm(18358): Turning on JNI app bug workarounds for target SDK version 8...
I/ActivityManager( 185): Start proc Test_App.Test_App for activity Test_App.Test_App/test_app.Activity1: pid=18358 uid=10074 gids={3003}
D/dalvikvm( 119): GC_EXPLICIT freed 37K, 3% free 12553K/12867K, paused 1ms+2ms
I/ActivityThread(18358): Pub Test_App.Test_App.mono.MonoRuntimeProvider.__mono_init__: mono.MonoRuntimeProvider
D/dalvikvm(18358): Trying to load lib /data/data/Test_App.Test_App/lib/libmonodroid.so 0x4168ba48
D/dalvikvm(18358): Added shared lib /data/data/Test_App.Test_App/lib/libmonodroid.so 0x4168ba48
D/dalvikvm( 119): GC_EXPLICIT freed <1K, 3% free 12553K/12867K, paused 2ms+2ms
E/mono (18358): WARNING: The runtime version supported by this application is unavailable.
E/mono (18358): Using default runtime: v2.0.50727
D/OpenGLRenderer( 386): Flushing caches (mode 1)
D/dalvikvm( 119): GC_EXPLICIT freed <1K, 3% free 12553K/12867K, paused 1ms+1ms
I/mono (18358): Stacktrace:
I/mono (18358):
D/OpenGLRenderer( 386): Flushing caches (mode 0)
D/Zygote ( 119): Process 18358 terminated by signal (11)
I/ActivityManager( 185): Process Test_App.Test_App (pid 18358) has died.
W/ActivityManager( 185): Force removing ActivityRecord{41a85018 Test_App.Test_App/test_app.Activity1}: app died, no saved state
Does anyone have the same behaviour in his mono apps? Is there a fix?
Managed to solve my own question. Under project settings I had to go to "Mono for Android Build" tab, select the Release configuration and make the linker "Link all assemblies" instead of "Link SDK assemblies only". Fixed this by trial and error, but what can you do..
Another solution I've found is to disable the use of the "Shared Runtime" when building the app.
In Visual Studio this is on your Android project settings, Android Options > Packaging tab > Packaging properties > Use Shared Runtime (untick)
It makes the resulting APK a bit bigger, but means users can do "Clear Data" on your app, restart it and it will run without crashing!
Using Visual Studio 2015 with a Xamarin Forms app on an LG G3 Vigor as a test device. Everything worked fine for many months. I was doing testing for performance documentation so I decided to do Clear Cache on my app in Setting -> General -> Apps on the Vigor. After that was done the Vigor would cause a runtime error when I would deploy my app to the device. The app would work fine on other devices, emulators and iOS simulators.
I tried other suggestions listed on this post. I ended up doing a factory reset on the device. After unlocking developer mode and reconnecting to my computer, it now compiled and ran the app again.
I think a person could try to revoke usb debugging authorizations and re-authorize if they didn't want to do a factory reset, to see if that gets things working again. This may create a different connection path between VS2015 and the device that resets whatever issue was caused by the cache reset. If all else fails, a factory reset did it for me. Hope it helps in case this happens to someone.

Why is SenTestingKit causing my app to crash?

I've created a map-based app for the iPhone, and recently submitted it to the store. I had no trouble running the app on the device or simulator. However, the store rejected it because it crashed on launch. The crash logs complain that the SenTestingKit framework wasn't found:
Date/Time: 2012-02-21 19:02:26.048 -0800
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread: 0
Dyld Error Message:
Library not loaded: /Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit
Referenced from: /var/mobile/Applications/*Long Application Reference Number*/MyApp.app/U of T Map
Reason: image not found
Dyld Version: 199.5
I've looked into others having this problem, and I'm sure as I continue to fiddle with it, I'll find the framework search path I need to include the SenTestingKit framework successfully.
What I'm confused about and need help understanding is:
Why did the device and simulator run fine without the framework, but the archived version didn't?
Why does it think I need this framework? I didn't use any unit testing during development. I used the SBJSON and ASIHTTPRequest libraries, but I didn't see an #import statement for SenTestingKit in any of the library code.
Is it easier for me to remove the need for SenTestingKit or somehow include it properly in the archive? I'd like to fix this problem, but I need this re-submitted to the app store ASAP.
I would really like to understand this problem on a conceptual level, rather than hack away until things work.
Just because you are not importing the SenTestingKit-Headers, does not mean that you are not linking its library.
Check your Build-Configuration/s => Target => Build Phases => Link Binary With Libraries for the entry SenTestingKit.framework. If that is present in anything but a Test-Target, remove it.
A Test-Target is symbolized by a little box , as opposed to an App-Target which is symbolized by a little house .

Resources