I would like to simulate Resource Limit [EXC_RESOURCE] Mach Exception on iOS.
Exception Type: EXC_RESOURCE
Exception Subtype: CPU_FATAL / WAKEUPS / MEMORY
Can someone help me write some bad code for testing that can help simulate some of these exceptions for my app on an iOS Device.
More details about this exception
Related
We are developing a flutter application and are trying to test it via TestFlight. It uses amplify. If we submit a release build, it works well and can be tested. If we submit a debug build it crashes on start. By debug build I mean that in Product -> Scheme -> Edit Scheme -> Archive -> Build Configuration is Debug.
When debugging on simulator or a device via VSCode if Start Debugging is selected and under Breakpoints All Exceptions is selected, the app crashes with PlatformException:
PlatformException (PlatformException(SignedOutException, Translating
platform exception failed. Please take a look at
https://github.com/aws-amplify/amplify-flutter/issues to see if there
are any existing issues that match your scenario, and file an issue
with the details of the bug if there isn't., {recoverySuggestion:
Please sign in and reattempt the operation., message: You are
currently signed out.}, null))
If the option All Exceptions is not selected, this doesn't get triggered and the app runs successfully. This may not be connected at all, but is the only place, where the app seems like it's crashing when running it.
This is from the crash report on the iPhone:
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype:
KERN_INVALID_ADDRESS at 0x0000000000000000 VM Region Info: 0 is not in
any region. Bytes before following region: 4329111552
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
__TEXT 102090000-102094000 [ 16K] r-x/r-x SM=COW ...er.app/Runner Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process:
exc handler [559] Triggered by Thread: 0
I have test and submit my app to Apple Store but Apple reject and response my app crash on launch. I have test my app on many model iPhone and iPad it's working normal, Have anyone can tell me why?
Crash log Apple send to me:
"bug_type":"109","os_version":"iPhone OS 11.2.5 (15D60)","incident_id":"F2C32C7F-63B2-4D96-8D90-1AF644DC5179","name":""}
Incident Identifier: F2C32C7F-63B2-4D96-8D90-1AF644DC5179
CrashReporter Key: 31ed20e652158d2a96b6662d50b1000ce2837b82
Hardware Model: iPad5,1
Device Model: J96AP
Process: gamebaionline [5995]
Path: /private/var/containers/Bundle/Application/872913FE-A768-4837-81EB-F76C427CFBED/gamebaionline.app/gamebaionline
Version: 0 (2.0.5)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd.development [1]
Date/Time: 2018-03-03 07:05:30.9221 -0800
Launch Time: 2018-03-03 07:05:23.9926 -0800
OS Version: iPhone OS 11.2.5 (15D60)
Baseband Version: n/a
UDID: 3ab61350a5372c6a81b3d6b6ac3e5a8c7d1cd04c
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 11
Application Specific Information:
* Terminating app due to uncaught exception 'NSGenericException', reason: '* Collection was mutated while being enumerated.'
terminating with uncaught exception of type NSException
abort() called.
Now i can't test with iOS 11.2.5 because Apple not allow signing in iOS version 11.2.5 or downgrade version to 11.2.5. Please help me.
Collection was mutated while being enumerated.
This mean that you have some data structure (like dictionary or array) and you iterate over elements and in same moment modify this structure, for example remove some elements. I suppose you to check all iteration that you do on very start. Or use symbolic breakpoint to find it. Note, that such crash can be a little bit tricky, because i guess some operation like remove or so may be not performed. Because of this you may or may not have crash on start
I solved mine by doing the following,
1. Symbolicate the error logs received from Apple.
2. Delete the app completely from you actual device and run a build from Xcode on it, this time it will crash and show you the lines where the bugs are!!!
I am developing a Swift App using Bluetooth LE, that crashes from time to time - not really reproducable.
I get always the same error message but can't find anything to lighten things up.
*** Assertion failure in -[CBUUID initWithData:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreBluetooth/CoreBluetooth-327.1/CBUUID.m:170
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Data <> does not
represent a valid UUID'
Does anybody has a idea what the error might be?
Thanks in advance
Reto
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000ce72bec8
when error like this happens when using ipa, but not run on simulator or directory on device,
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000ce72bec8
when error like this happens when using ipa, but not run on simulator or directory on device, the reason mostly likely is the different optimization level between debug and release
This is a follow up to a previous question I'd asked about troubleshooting a crash log:
" NSAutoReleasePool releasing view controller? "
That question was answered adequately, but I now have a slightly different question. If you look at the full crash log:
https://gist.github.com/joelmartinez/dc2e94f0b3c554a0a384
It actually states that the crash occurred at Thread 0:
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
So my question then is, considering the only user code is in Thread 7, is it fair to assume that that's the true cause of the crash? or has that just sent me on a wild goose chase? I've still been unable to reproduce this crash so any other tips anyone could offer from looking at that crash log would be greatly appreciated :)