Release build crash, Swift, Armchair framework, Xcode 6.2 - ios

I am using Armchair framework (https://github.com/UrbanApps/Armchair) as the app review manager for my app. The app is written in Swift (complies with Swift 1.1) and I am running Xcode 6.2 with base SDK 8.2 and deployment target of 8.0.
I am facing a curious issue while doing a release/ad-hoc build of the app- the app crashes right after getting started. I symbolicated the crash logs and here's what I see-
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-05-08 13:01:54.192 -0700
Launch Time: 2015-05-08 13:01:52.013 -0700
OS Version: iOS 8.3 (12F70)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001007643d8
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
__TFC8Armchair7ManagerP33_0F5394B43958D8E2A7FE7B1C7DE959CE18defaultReviewTitlefS0_FT_SS Armchair.swift:1566
__TFC8Armchair7ManagerP33_0F5394B43958D8E2A7FE7B1C7DE959CE18defaultReviewTitlefS0_FT_SS Armchair.swift:695
__TFC8Armchair7ManagerP33_0F5394B43958D8E2A7FE7B1C7DE959CE15showRatingAlertfS0_FT_T_ Armchair.swift:699
__dispatch_call_block_and_release + 20
__dispatch_client_callout + 12
__dispatch_main_queue_callback_4CF + 1604
___CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
___CFRunLoopRun + 1488
_CFRunLoopRunSpecific + 392
_GSEventRunModal + 164
_UIApplicationMain + 1484
11 <MyAppName> 0x0000000100292560 0x1000e8000 + 1746272
_tlv_get_addr + 176
When I run the app on simulator/run directly on the device from Xcode, everything runs perfectly.
Any pointers from anyone?

The first thing I would do is update to the latest Xcode (6.3.1). You will have to scurry around to fix your Swift because of changes in the language. But this version of Swift also fixes a number of memory management bugs that cause crashes in Release builds (and do not show up in Debug builds).
Of course, that might not help if all you've got is the compiled code for this third-party framework.

Related

NativeScript: app works on emulator, crashing on real device NS7 Angular10

After upgrade to NativeScript 7 and Angular 10 app is working fine on xCode emulators but crashing just after run on real device (iPhone 10, iOS14).
TestFlight crash report here:
Date/Time: 2020-09-20 12:39:11.5495 +0200
Launch Time: 2020-09-20 12:39:11.1141 +0200
OS Version: iPhone OS 14.0 (18A373)
Release Type: User
Baseband Version: 4.00.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x191535114 __exceptionPreprocess + 216 (NSException.m:199)
libobjc.A.dylib 0x1a4d5bcb4 objc_exception_throw + 56 (objc-exception.mm:565)
NativeScript 0x1055e9428 tns::NativeScriptException::OnUncaughtError(v8::Local<v8::Message>, v8::Local<v8::Value>) + 848
I think it is TestFlight problem. I had the same problem, after spending a whole afternoon doing 4 or 5 releases it started to work. I did not make any changes to the code, also that afternoon the versions took a long time to be available in the app so I think there was something wrong with TestFlight.

Symbolicated iOS crash report from Apple review still not readable

I got a crash report from Apple and symbolicated it following this document, but I still didn't understand the report.
First, I tried below "XCode approach" to symbolicate the report:
Connect an iOS device to your Mac
Choose "Devices" from the "Window" menu
Under the "DEVICES" section in the left column, choose a device
Click the "View Device Logs" button under the "Device Information" section on the right hand panel
Drag your crash report onto the left column of the presented panel
Xcode will automatically symbolicate the crash report and display the results
Before that, I downloaded dSYM files from App Store by 'Organizer' and copied them into a separated folder. But all the symbolicated names looked like this:
5 Recycling 0x10103b464 fb1UCM8vZCiE + 355
6 Recycling 0x1010431d4 fbkUVUzGnhkS + 1655
7 Recycling 0x101038a78 fbIiaWxkoUb6 + 307
And then, I tried the approach from this blog, but the problem remained:
{"app_name":"Recycling","timestamp":"2020-02-08 00:00:51.02 +0800","app_version":"1.7.3","slice_uuid":"20cdeb29-1f14-3298-9649-503635ded968","adam_id":1406292831,"build_version":"3","bundleID":"com.qdjzd.Recycling","share_with_app_devs":true,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 13.3.1 (17D50)","incident_id":"36AEED5C-F4AD-4711-926E-783D4783039E","name":"Recycling"}
Incident Identifier: 36AEED5C-F4AD-4711-926E-783D4783039E
CrashReporter Key: 665569f89a7cca0567f04077cd6e5757ddeffea5
Hardware Model: xxx1
Process: Recycling [6029]
Path: /private/var/containers/Bundle/Application/0A62AE5B-BE91-4A30-8CB5-A6137DE9DCC1/Recycling.app/Recycling
Identifier: com.qdjzd.Recycling
Version: 3 (1.7.3)
AppStoreTools: 11C29
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.qdjzd.Recycling [1787]
Date/Time: 2020-02-08 00:00:50.8368 +0800
Launch Time: 2020-02-08 00:00:22.0052 +0800
OS Version: iPhone OS 13.3.1 (17D50)
Release Type: User
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 11
Last Exception Backtrace:
0 CoreFoundation 0x1abab8a48 0x1ab98d000 + 1227336
1 libobjc.A.dylib 0x1ab7dffa4 0x1ab7da000 + 24484
2 CoreFoundation 0x1ab9c0e34 0x1ab98d000 + 212532
3 CoreServices 0x1ac1232d8 0x1ac056000 + 840408
4 Foundation 0x1abd736f8 0x1abd69000 + 42744
5 Recycling 0x10103b464 fb1UCM8vZCiE + 355
6 Recycling 0x1010431d4 fbkUVUzGnhkS + 1655
7 Recycling 0x101038a78 fbIiaWxkoUb6 + 307
8 libsystem_pthread.dylib 0x1ab7d3d8c 0x1ab7c9000 + 44428
9 libsystem_pthread.dylib 0x1ab7d776c 0x1ab7c9000 + 59244
Can anyone help me?
In Xcode 10 you can follow these steps:
Inside Organizer, locate the archive where the app is based on.
Click on the Download Debug Symbols button. Nothing will appear in your Downloads folder, but that's OK.
Connect the build machine to an iOS device.
Select the device in Devices and Simulators.
Click on the View Devices Logs button.
Drag-and-drop the crash file to the left panel. The file must end with a .crash extension, otherwise the drag fails.
Switch to the All Logs tab.
Select the added crash file.
The file should automatically symbolicate, otherwise use the right-click context menu item Re-Symbolicate Log.
Thanks for everyone! I finally resolved this problem by myself.
The reason is that I used a 3rd-party library named UMCCommon with version 1.5.3, and all of its symbols are obfuscated, so I can not understand.

Xcode iOS Instruments:

I have a build of my app that only crashes when running instruments. The repro case is 100%, but does not crash when running a release build without instruments nor when running a debug build. As Instruments runs a release build I can;t step through and figure out exactly what is crashing. When the build crashes, it does so silently, with no output that I can find. It only crashes with Allocations running in instruments.
I am having difficulty tracking down what is happening, Is there an instruments mode I am not aware of that will trap this error and report the specifics to me?
I have read similar questions on Stackoverflow but those questions have not helped me.
The crash acts like a zombie, but only happens when instruments are running, and 'zombie detection enabled' doesn't indicate a zombie.
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
CoreSimulator 209.19 - Device: iPad Air 2 - Runtime: iOS 9.3 (13E230) - DeviceType: iPad Air 2
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libswiftCore.dylib 0x0000000109f03dc0 swift_retainCount + 0
1 liboainject.dylib 0x000000010335d223 oa_swift_tryRetain + 297
2 libswiftCore.dylib 0x0000000109f14d69 -[SwiftObject retainWeakReference] + 9
3 libobjc.A.dylib 0x00000001098b8b6b weak_read_no_lock + 89
4 libobjc.A.dylib 0x00000001098b94c6 objc_loadWeakRetained + 104
5 libobjc.A.dylib 0x00000001098b94f2 objc_loadWeak + 15
6 com.apple.Foundation 0x0000000108da975c empty + 35
7 com.apple.Foundation 0x0000000108da96fa -[NSConcreteHashTable dealloc] + 46
8 libobjc.A.dylib 0x00000001098b9afe objc_object::sidetable_release(bool) + 232
9 liboainject.dylib 0x000000010335c6e9 ___swapMethods_block_invoke_4 + 272 ````
It happens the same things to me on Xcode 9 using the iOS 10 simulator, default is iOS 11 simulator but I wanted to test also on iOS 10.
So far so bad, any instrument manipulation is causing my application to crash with almost the same backtrace than the one shown here when using iOS 10 simulator.
I tried many things and at last I thought that there may be some incompatibility of Xcode 9 Instrument with older simulator SDK.
So I switched to the iOS11 simulator which is the default one on Xcode 9 and it solve my Instruments issue.
I'm now able to use instrument for memory investigation on my app.

Xcode Beta 4: Can't create a Bot - Crashes every time

Every time I try to create a bot with Xcode Beta 4, I get a crash.
Process: Xcode [4678]
Path: /Applications/Xcode-beta.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.0 (8178.7)
Build Info: IDEFrameworks-8178007000000000~3
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [4678]
User ID: 501
Date/Time: 2015-07-22 10:42:20.647 -0700
OS Version: Mac OS X 10.10.4 (14E46)
Report Version: 11
Anonymous UUID: ***
Time Awake Since Boot: 880 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 7A165t
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): View <NSPopUpButton: 0x7ffaf0480970> is not (and has to be) in stack view <NSStackView: 0x7ffaf0486080>.
UserInfo: (null)
Hints: None
This looks like the relevant bit and it seems like it's an Xcode bug.
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): View <NSPopUpButton: 0x7ffaf0480970> is not (and has to be) in stack view <NSStackView: 0x7ffaf0486080>.
Other people with the same issue: https://forums.developer.apple.com/thread/11780
Not necessarily a fix, but a good workaround:
Open project in Xcode 7 beta 3 or Xcode 6
Switch Server to run with Xcode 7 beta 3 or Xcode 6
Create Bot using older version of Xcode
Switch Server to run with Xcode 7 beta 4
Bots seem to run fine using Xcode 7 beta 4 (you just can't create them)
I had to do this because my project is using iOS 9 and another bug made Xcode 7 beta 3 unable to run tests with bots.
Submit a bug report... The more valid reports they receive the more quickly they can fix it. Be sure to submit any work around so's they can communicate them, should they decide to do so.

My app's deploy target is iOS 5.1 but my friend's iPad can't open my app, she's using iOS 5.1.1

My app is in App Store so that means my app has passed Apple's review but when my friend install and download the app she couldn't even see the splash screen and it crashed right after she tapped the app icon. What can be the reason for this problem?
EDIT:
Here is the meat of your crash log. Based on the error it appears that #ThomasW and #rahul-vyas are correct that the deployment target inside your Build Settings is likely set to iOS6.x. I would recommend checking both the Target and the Project settings to make sure they're set to iOS5.1.
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread: 0
Dyld Error Message:
Symbol not found: _objc_setProperty_nonatomic_copy
Referenced from: /var/mobile/Applications/B4F5424C-1593-4150-9AD0-6CF3FE3BD3E5/TubeNoStop.app/TubeNoStop
Expected in: /usr/lib/libobjc.A.dylib
Dyld Version: 199.6
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 dyld 0x2fe2a080 dyld_fatal_error + 0
1 dyld 0x2fe2cefc dyld::halt(char const*) + 72
2 dyld 0x2fe2cfda dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 214
3 libdyld.dylib 0x36aa83ec dyld_stub_binder + 12
Have your friend install this: iPhone Configuration Utility 3.6.2 for Windows
She can use that to email the crash report to you. Then import the crash report into the organiser in xcode, and "symbolicate" it to find where it crashed.
But before doing any of that, run it in the iOS 5.1 Simulator in Xcode. Chances are it will crash there too. If you don't have the 5.1 simulator you can install it from settings (it uses a couple GB of disk space)

Resources