I'm using a PDF reporting library, named PDFReporter, and I've got this weird crash when trying to generate a PDF. It happens only when I'm launching the app from an .ipa archive. It runs fine when I launch the app from Xcode.
Here's some of the trace I have from Xcode's Device logs :
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010
Triggered by Thread: 0
Filtered syslog: None found
Thread 0 name: main Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000181501b90 objc_msgSend + 16
1 ExpoTouch 0x0000000100649e64 OrgOssPdfreporterEngineXmlJRXmlDigesterFactory_setComponentsInternalEntityResourcesWithOrgOssPdfreporterEngineXmlJRXmlDigester_
+ 72
2 ExpoTouch 0x000000010064a054 OrgOssPdfreporterEngineXmlJRXmlDigesterFactory_createDigester + 136
3 ExpoTouch 0x00000001006849d4 OrgOssPdfreporterEngineXmlJRXmlLoader_load__WithJavaIoInputStream_ + 140
4 ExpoTouch 0x000000010071062c +[ReportExporter loadReport:] + 72
So the question is : what's the difference between installing from Xcode and installing from an .ipa ? Am I missing a library in the .ipa ? If so, how could I know which one ?
Related
My Objective-C application is using a 3rd party VoIP SDK. I found the application crashes if left running overnight. The crash only happens if I enable the SDK, so I strongly suspect it causes the crash.
The library is a static library (.a extension). I tried catching the exception using try-catch block, and NSSetUncaughtExceptionHandler, but it didn't work. I suspect those methods only work with Objective-C exceptions, and the SDK is written in native C?
Is it possible to catch a 3rd party native C exception? I'm fine with any kind of hacks, since this will not be going into production code. Just trying to get to the bottom of the issue.
EDIT:
Here's the crash log:
Hardware Model: iPad5,1
Version: 0.14 (6.0)
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2016-11-22 08:24:59.7336 -0500
Launch Time: 2016-11-21 13:45:09.9956 -0500
OS Version: iPhone OS 10.1.1 (14B100)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
(0x18953e1c0 0x187f7855c 0x18953e108 0x18f89359c 0x18f6f4444 0x18f4c653c
0x18f391d48 0x18f391c78 0x18f44bb10 0x18f44aec0 0x18f44a90c 0x18f44a4c0
0x18f44a424 0x18f38f220 0x18c84f188 0x18c843e64 0x18c843d24 0x18c7c07ec
0x18c7e7c58 0x18c7e8678 0x1894eb7dc 0x1894e940c 0x1894e989c 0x189418048
0x18ae9e198 0x18f3fd2fc 0x18f3f8034 0x10002304c 0x1883fc5b8)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000018850e014 0x1884ef000 + 126996
1 libsystem_pthread.dylib 0x00000001885d6450 0x1885d1000 + 21584
2 libsystem_c.dylib 0x00000001884823e0 0x18841f000 + 406496
3 libc++abi.dylib 0x0000000187f4d2d4 0x187f4c000 + 4820
4 libc++abi.dylib 0x0000000187f6acc0 0x187f4c000 + 126144
5 libobjc.A.dylib 0x0000000187f78844 0x187f70000 + 34884
6 libc++abi.dylib 0x0000000187f6766c 0x187f4c000 + 112236
7 libc++abi.dylib 0x0000000187f67234 0x187f4c000 + 111156
8 libobjc.A.dylib 0x0000000187f7871c 0x187f70000 + 34588
9 CoreFoundation 0x00000001894180bc 0x18940f000 + 37052
10 GraphicsServices 0x000000018ae9e198 0x18ae92000 + 49560
11 UIKit 0x000000018f3fd2fc 0x18f382000 + 504572
12 UIKit 0x000000018f3f8034 0x18f382000 + 483380
13 Remote 0x000000010002304c 0x100008000 + 110668
14 libdyld.dylib 0x00000001883fc5b8 0x1883f8000 + 17848
That isn't a catchable exception, that is a hard crash. And, specifically, it is a purposeful crash; something on the main thread decided things had gone badly enough that it called abort().
So, no, nothing you can do to catch it and it isn't even clear that the crash is triggered by the 3rd party library, given that crash log.
I need to localize my plist files and string files for my project. However, when I try to select other languages in file inspector for .plist files, the Xcode will crash.
Parent Process: ??? [1]
Responsible: Xcode [1981]
User ID: 501
Date/Time: 2015-09-24 11:47:52.069 +1000
OS Version: Mac OS X 10.10.4 (14E46)
Report Version: 11
Anonymous UUID: XXXXXXXXXXX
Time Awake Since Boot: 7500 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 7A220
UNCAUGHT EXCEPTION (NSInvalidArgumentException): *** -[NSPathStore2 stringByAppendingPathExtension:]: nil argument
UserInfo: (null)
Hints: None
Backtrace:
0 0x00007fff89f71024 __exceptionPreprocess (in CoreFoundation)
1 0x0000000102627744 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 0x00007fff87bc376e objc_exception_throw (in libobjc.A.dylib)
3 0x00007fff89f70eed +[NSException raise:format:] (in CoreFoundation)
4 0x00007fff90f257e3 -[NSPathStore2 stringByAppendingPathExtension:] (in Foundation)
5 0x000000010c5ae87c -[Xcode3VariantGroup proposedFilePathForLocalization:fileType:] (in DevToolsCore)
6 0x000000011281dc8c -[Xcode3LocalizationCommands
Anyone has same issue with Xcode7??
PS: localizing .string file works fine with same approach.
Having the same issue. Xcode 7.1 beta 2 seems to have it fixed.
We testing my app with iPhone 6s/iPhone 6/iPhone 5, no bugs and crash report, but when we submit to iTunesConnect, the App Review team has rejected my app, they said this app crashed on launch.
We can not reproduce this crash, I have no idea what the crash log below means. I would be really happy if anybody could explain me what this crash log could relate to and how I could solve it. Many many thanks to all those who are willing to help others.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Filtered syslog:
2015-02-05 06:00:28.268 chuanBang[993]: <Error> assertion failed: 12B411: libxpc.dylib + 51955 [04694BEB-256F-3132-A00F-0C82B79BC689]: 0x7d
2015-02-05 06:00:29.105 chuanBang[993]: <Error> SecTrustEvaluate [leaf AnchorTrusted]
2015-02-05 06:00:29.517 chuanBang[993]: <Error> CoreLocation: Could not get ideal gyro update interval, assuming 0.005000 s
2015-02-05 06:00:30.615 chuanBang[993]: <Warning> Attempting to badge the application icon but haven't received permission from the user to badge the application
2015-02-05 06:00:30.619 chuanBang[993]: <Warning> 请求失败了
2015-02-05 06:00:30.623 chuanBang[993]: <Warning> 请求失败了
Last Exception Backtrace:
(0x26988d62 0x342bfc72 0x26988ca8 0x2c3084 0x3499b096 0x349a0d0e 0x348c0934 0x33acdbb8 0x33ae4e30 0x33ae48b4 0x342bfdba 0x2689aa18 0x2689a78e 0x2dd4c04c 0x29e8c97c 0x1b2a1a 0x3485baaa)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x34920dfc 0x3490c000 + 85500
1 libsystem_pthread.dylib 0x349a0d0e 0x3499d000 + 15630
2 libsystem_c.dylib 0x348c0934 0x34877000 + 301364
3 libc++abi.dylib 0x33acdbb8 0x33acd000 + 3000
4 libc++abi.dylib 0x33ae4e30 0x33acd000 + 97840
5 libc++abi.dylib 0x33ae4ee6 0x33acd000 + 98022
6 libc++abi.dylib 0x33ae4b9c 0x33acd000 + 97180
7 libc++abi.dylib 0x33ae4e44 0x33acd000 + 97860
8 libc++abi.dylib 0x33ae48b4 0x33acd000 + 96436
9 libobjc.A.dylib 0x342bfdba 0x342b9000 + 28090
10 CoreFoundation 0x2689aa18 0x26881000 + 104984
11 CoreFoundation 0x2689a78e 0x26881000 + 104334
12 GraphicsServices 0x2dd4c04c 0x2dd43000 + 36940
13 UIKit 0x29e8c97c 0x29e1e000 + 452988
14 chuanBang 0x001b2a1a 0xad000 + 1071642
15 libdyld.dylib 0x3485baac 0x3485a000 + 6828
The crash log itself is not useful. I suggest integrating a crash reporting SDK into your app and when a crash does happen, it will give you a lot more info than you're currently getting.
Some crash reporters to look over:
Crashlytics
HockeyApp
Once you have one of these integrated into your app, submit the app again to Apple (If you cannot reproduce the error) and if it crashes their side, you'll have a much better idea where the issue is.
I think whenever you are testing your app at that time you always allow for Notification permission Popup & Location service permission popup.
Please try by click "Don't allow" when these popup are show.
I have already done some research on identifying crash logs but couldn't find solution:
Here are my references:
http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs
http://developer.apple.com/library/ios/#qa/qa1747/_index.html
How to view crash report on xcode 4.2
I do come to know that it is because of Memory Issue but how to find that particular? In my project there are 200 files also there are 4-5 third party libraries are being used.
Here is crash log:
Incident Identifier: BD0F0F41-C60A-4D9C-8386-1B10796CF835
CrashReporter Key: 43c75986a25cae4226726a78b4bf5b543ab87caa
Hardware Model: iPad3,3
Process: BLSOffline [10824]
Path: /var/mobile/Applications/54AAF195-FD1D-4426-BC20-939662ECC56B/BLSOffline.app/BLSOffline
Identifier: BLSOffline
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-07-12 15:24:05.680 +0530
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000013
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3aadd526 0x3aad8000 + 21798
1 BLSOffline 0x000dbb6a 0xc8000 + 80746
2 CoreFoundation 0x32c3f9c0 0x32b7a000 + 809408
3 CoreFoundation 0x32b96fe6 0x32b7a000 + 118758
4 Foundation 0x335530f0 0x334a2000 + 725232
5 CoreFoundation 0x32c11680 0x32b7a000 + 620160
6 CoreFoundation 0x32c10f7a 0x32b7a000 + 618362
7 CoreFoundation 0x32c0fcb2 0x32b7a000 + 613554
8 CoreFoundation 0x32b82eb8 0x32b7a000 + 36536
9 CoreFoundation 0x32b82d44 0x32b7a000 + 36164
10 GraphicsServices 0x367372e6 0x36732000 + 21222
11 UIKit 0x34a982fc 0x34a41000 + 357116
12 BLSOffline 0x000db5fe 0xc8000 + 79358
13 libdyld.dylib 0x3af17b1c 0x3af16000 + 6940
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x3afce648 0x3afcd000 + 5704
1 libdispatch.dylib 0x3aefe974 0x3aef6000 + 35188
2 libdispatch.dylib 0x3aefe654 0x3aef6000 + 34388
Thread 2 name: WebThread
Thread 3 name: JavaScriptCore::BlockFree
Thread 4 name: JavaScriptCore::Marking
Thread 5 name: com.apple.NSURLConnectionLoader
Thread 6 name: WebCore: CFNetwork Loader
Thread 7 name: WebCore: LocalStorage
Thread 8 name: com.apple.CFSocket.private
Thread 9 name: com.apple.coremedia.player.async
Thread 10 name: com.apple.coremedia.player.remote
Please let me know how to find cause out of this.
If my application is crashing at random point of times, still can it be possible to upload on AppStore? Will Apple allow such application?
Edit: The major problem is application is not crashing over simulator, it does only on devices. Also on device, when we debug the app, it crashes on curl library code, which is working fine since first day. Then how come sudden crash occurs in application?
If your application is crashing randomly then you need to analyze your code. That you can do in XCode only.Open your Project in XCode and in Product menu you will find the Analyze option (cmd+shift+B) .make sure you have selected "iOS Device" before analyzing it.
other than this you can use the this link:
http://www.raywenderlich.com/23037/how-to-use-instruments-in-xcode
apple will not accept your app if it is crashing.
No, Apple will probably get the crash too and reject your app (it's a risk).
About the crash, it's hard to say, you'll have to run the app from XCode and check there where the crash was.
If it's a memory issue, profile the app from XCode and you'll see there which component is crashing.
I have the following symbolized crash log. Or maybe something I missed?
Help please to understand what does it mean:
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3591f628 0x3590e000 + 71208
1 libsystem_c.dylib 0x34accb1a nanosleep + 138
2 libsystem_c.dylib 0x34ad7608 sleep + 40
3 ReportCrash 0x001046f2 0xfc000 + 34546
4 ReportCrash 0x000fd474 0xfc000 + 5236
it is state of your app at the crash moment, can show you where crash was. In your case app crashed with Exception Type: EXC_CRASH (SIGKILL) in thread 0 and you can see stacks of functions of all active threads. If you want convert it to human readable view, you should use special programs like symbolicate , atos or dwarfdump.
More:
http://kevincupp.com/2011/05/12/symbolicating-ios-crash-logs.html
http://aplus.rs/ios-dev/guide-to-symbolicating-iphone-app-crash-logs-with-xcode-4-2/
(about atos i have link just in Russian)
It is very simple if you have the archive file in Xcode -> Widow ->Organizer and a corresponding crash log file.
Connect your device to mac
goto Xcode->Window-> devices
Click on your device on the left panel
Click on view device logs
Select the log you want to symbolicate. (OR) If you have a crash log file on your system then click on All logs option on the left panel and drag the log file into left panel section.
Right click on the selected log and click re-symbolicate
Done!!! ,