Here is the crash log
Date/Time: 2011-02-10 21:12:00.478 +0900
OS Version: iPhone OS 4.2.1 (8C148)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 Crashed:
0 libSystem.B.dylib 0x30d7c2d4 __kill + 8
1 libSystem.B.dylib 0x30d7c2c4 kill + 4
2 libSystem.B.dylib 0x30d7c2b6 raise + 10
3 libSystem.B.dylib 0x30d90d72 abort + 50
4 libstdc++.6.dylib 0x34981a20 __gnu_cxx::__verbose_terminate_handler() + 376
5 libobjc.A.dylib 0x34a83594 _objc_terminate + 104
6 libstdc++.6.dylib 0x3497fdf2 __cxxabiv1::__terminate(void (*)()) + 46
7 libstdc++.6.dylib 0x3497fe46 std::terminate() + 10
8 libstdc++.6.dylib 0x3497ff16 __cxa_throw + 78
9 libobjc.A.dylib 0x34a824c4 objc_exception_throw + 64
10 CoreFoundation 0x3587c1a8 +[NSObject(NSObject) doesNotRecognizeSelector:] + 96
11 CoreFoundation 0x35823aa2 ___forwarding___ + 502
12 CoreFoundation 0x35823858 _CF_forwarding_prep_0 + 40
13 PictureDictionary 0x00005fe4 sgLoadFileImage(char const*, long*) (PictureDictionary.mm:41)
14 PictureDictionary 0x000061b0 CPictureDictionary::LoadPageData() (PictureDictionary.mm:814)
15 PictureDictionary 0x00006d02 CPictureDictionary::Update() (PictureDictionary.mm:505)
16 PictureDictionary 0x00003216 -[ES1Renderer render] (ES1Renderer.mm:63)
The line in my code where it starts to crash (with in stack trash #13 above) is
NSString* pStr = [[NSString alloc]
initWithUTF8String: pFileName];
For some reason it crashes here.
What is odd is that it runs fine in debug mode. But when I make a adhoc build and put it in the iPad through iTunes the above crash occurs.
I have cleaned and rebuilt many times, made sure my profiles and identifiers are correct.
I have no idea why this may be happening. Any insight or suggestions will help.
Thanks.
Sorry I'm no guru but maybe this will help a little.
This type of crash occurs when Cocoa cannot find the method you are invoking at runtime.
Normally you would receive a warning during compilation.
That said, it seems to be complaining that it cannot find an objective-C selector (method). However, sgLoadFileImage looks to me to be a C function.
For sure, something is different between your debug and release builds. Either the code is different, or the parameters supplied to the methods and functions.
Related
I have device logs crash report from iPhone .How to find the exact reason from my crash report. IOS version 8.3 This is not a reproducible crash.It occurs rarely and no specific senario. Pelase help me to find out.I have build this IOS app in appcelerator platform.
Incident Identifier: 3DCFCFFB-4F05-4F88-B227-21C6BEF1066A
CrashReporter Key: a01734574dac253357853c43788d42f540be2749
Hardware Model: iPhone7,2
Process: CAST [320]
Path: /private/var/mobile/Containers/Bundle/Application/A78C6B56-1ED0-4D07-8857-B3D154779EBF/CAST.app/CAST
Identifier: com.ca.tridentapp
Version: 1.2.1.0 (1.2.1)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-05-31 12:26:54.357 +0530
Launch Time: 2016-05-31 11:59:41.463 +0530
OS Version: iOS 8.3 (12F70)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x18224c2d8 0x182124000 + 1213144
1 libobjc.A.dylib 0x193a700e4 0x193a68000 + 32996
2 CoreFoundation 0x18224bc8c 0x182124000 + 1211532
3 CAST 0x1000e6988 -[TiApp flushCompletionHandlerQueue] (TiApp.m:569)
4 CAST 0x1000e7d4c -[TiApp applicationWillEnterForeground:] (TiApp.m:911)
5 UIKit 0x186ef9f48 0x186c7c000 + 2613064
6 UIKit 0x186f256fc 0x186c7c000 + 2791164
7 UIKit 0x186f24dfc 0x186c7c000 + 2788860
8 UIKit 0x186f24d54 0x186c7c000 + 2788692
9 UIKit 0x186f17fe0 0x186c7c000 + 2736096
10 FrontBoardServices 0x18aa553c8 0x18aa3c000 + 103368
11 CoreFoundation 0x18220427c 0x182124000 + 918140
12 CoreFoundation 0x182203384 0x182124000 + 914308
13 CoreFoundation 0x1822019a8 0x182124000 + 907688
14 CoreFoundation 0x18212d2d4 0x182124000 + 37588
15 GraphicsServices 0x18b9436fc 0x18b938000 + 46844
16 UIKit 0x186cf2fac 0x186c7c000 + 487340
17 CAST 0x100022aec main (main.m:37)
18 libdyld.dylib 0x1940eea08 0x1940ec000 + 10760
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000194207270 0x1941ec000 + 111216
1 libsystem_pthread.dylib 0x00000001942a516c 0x1942a0000 + 20844
2 libsystem_c.dylib 0x000000019417eb14 0x19411c000 + 404244
3 libc++abi.dylib 0x000000019323d414 0x19323c000 + 5140
4 libc++abi.dylib 0x000000019325cb88 0x19323c000 + 134024
5 libobjc.A.dylib 0x0000000193a703bc 0x193a68000 + 33724
6 CAST 0x00000001005bf7f4 CPPExceptionTerminate() (KSCrashSentry_CPPException.mm:193)
7 libc++abi.dylib 0x0000000193259bb0 0x19323c000 + 121776
8 libc++abi.dylib 0x0000000193259738 0x19323c000 + 120632
9 libobjc.A.dylib 0x0000000193a70290 0x193a68000 + 33424
10 CoreFoundation 0x000000018212d380 0x182124000 + 37760
11 GraphicsServices 0x000000018b9436f8 0x18b938000 + 46840
12 UIKit 0x0000000186cf2fa8 0x186c7c000 + 487336
13 CAST 0x0000000100022ae8 main (main.m:37)
14 libdyld.dylib 0x00000001940eea04 0x1940ec000 + 10756
Thanks in Advance
I suggest you can do two things:
You could integrate a 3rd party crash reporting library such as Instabug which will help you get more details about the type of device, software version, CPU load, memory usage, and connectivity. All of which are important factors when it comes to debugging and reproducing the crash.
The crash report is not symbolicated. You first have to locate your project’s dSYM file. Type the line below in terminal so you can locate the file.
mdfind "com_apple_xcode_dsym_uuids == your-UUID-here"
You can find your UUID written on top of the Instabug dashboard.
You can then upload your dSYM file through the dashboard to get symbolicated crashes that are more comprehensible.
For full disclosure, I work at Instabug. Let me know if I can help.
I'm posting here in hope for advice from more experienced programmers (in general & with Cocos2D specifically).
I have an old-ish project that is using Cocos2D v2.1 in a couple of places, otherwise it's standard UIKit. I updated it to be compliant with arm64, or so I thought, and managed to remove any compiler warnings, and run the app successfully on the simulator. However, I just got a bug report form an iPad Air user that the Cocos2d portion of the app is crashing.
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010
Triggered by Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001995101d0 0x1994f8000 + 98768
1 0x000000010014e820 -[CCTimer update:] + 152
2 0x0000000100152140 -[CCScheduler update:] + 420
3 0x000000010016ab30 -[CCDirectorIOS drawScene] + 172
Like I say, there are no compiler warnings and it all works on the simulator, so I'm kinda stuck as to how to fix it. I know that the usual two options would be to
1. remove arm64
2. upgrade to Cocos2D v3.0
However, I use Cocos2D only for a tiny portion of the app, so I was hoping that perhaps I am missing a simple fix. I'm pretty inexperienced with Cocos2D and debugging in general, so I'm hoping for some advice if this is a lost cause and I should better spend my time on one of the other 2 options, or perhaps there is something simple that I can tweak that I am missing right now. I did browse through the CCTimer update: methods, and the only thing that stood out were a few floats in the code, that I know can be problematic between 32/64 bit, but without a compiler warning I am at a loss.
UPDATE
So it gets mysteriouser and mysteriouser. I bought a brand new iPad Air to test this locally instead of on the simulator, and... it works. No crashes. Does the user perhaps simply have a defective device? I noticed that the Exception is thrown at KERN_INVALID_ADDRESS at 0x0000000000000010 which looks somewhat odd. Most of similar crash reports I've seen online have entirely different addresses that look much more random.
UPDATE 2
More mysteries. While the local version works on the device (run via XCode), the actually downloaded app from the AppStore does crash! I was able to capture some more info about it from the Device Logs:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010
Triggered by Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000196c041d0 objc_msgSend + 16
1 0x00000001001da820 -[CCTimer update:] + 152
2 0x00000001001de140 -[CCScheduler update:] + 420
3 0x00000001001f6b30 -[CCDirectorIOS drawScene] + 172
4 QuartzCore 0x000000018cf40cb8 CA::Display::DisplayLinkItem::dispatch() + 32
5 QuartzCore 0x000000018cf40ac4 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 296
6 IOKit 0x000000018b23be70 IODispatchCalloutFromCFMessage + 360
7 CoreFoundation 0x000000018a2ec8dc __CFMachPortPerform + 188
8 CoreFoundation 0x000000018a2fae8c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
9 CoreFoundation 0x000000018a2fadec __CFRunLoopDoSource1 + 440
10 CoreFoundation 0x000000018a2f9010 __CFRunLoopRun + 1616
11 CoreFoundation 0x000000018a239c1c CFRunLoopRunSpecific + 448
12 GraphicsServices 0x000000018fec9c08 GSEventRunModal + 164
13 UIKit 0x000000018d36afd8 UIApplicationMain + 1152
14 0x00000001000f4994 main (main.m:16)
15 libdyld.dylib 0x00000001971e7a9c start + 0
Thread 1:
0 libsystem_kernel.dylib 0x00000001972c9aa8 kevent64 + 8
1 libdispatch.dylib 0x00000001971cd998 _dispatch_mgr_thread + 48
Thread 2:
0 libsystem_kernel.dylib 0x00000001972c9ca0 mach_msg_trap + 8
1 CoreFoundation 0x000000018a2fab70 __CFRunLoopServiceMachPort + 180
2 CoreFoundation 0x000000018a2f8d00 __CFRunLoopRun + 832
3 CoreFoundation 0x000000018a239c1c CFRunLoopRunSpecific + 448
4 AudioToolbox 0x0000000189aedabc GenericRunLoopThread::Entry(void*) + 156
5 AudioToolbox 0x0000000189ade278 CAPThread::Entry(CAPThread*) + 136
6 libsystem_pthread.dylib 0x0000000197363e18 _pthread_body + 164
7 libsystem_pthread.dylib 0x0000000197363d70 _pthread_start + 136
8 libsystem_pthread.dylib 0x0000000197361550 thread_start + 0
Thread 3:
0 libsystem_kernel.dylib 0x00000001972e2e74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000197361548 start_wqthread + 0
Thread 4:
0 libsystem_kernel.dylib 0x00000001972e2e74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000197361548 start_wqthread + 0
Baffled.
Definitely remove arm64 from your project build settings (architecture, valid architectures) because cocos2d-iphone prior to v3 is not compatible with 64-bit builds even if you do not get compiler warnings/errors. There are some nasty potential issues hidden away.
If you do not receive compiler warnings I think it's likely that the 32/64 bit compatibility issues warnings are simply not enabled in your project/target (specifically the cocos2d-iphone target if it's in a separate target). In stock v2.1 of cocos2d there should actually be plenty of such warnings, though it may depend on your iOS Deployment target (for a test try setting it to iOS 7.1 which will give you the most warnings, including many "deprecation" warnings).
You can also perform an Analyze build to point out potential issues (and some false alerts, too).
I'm receiving many iOS crash reports that look like copied below... Does anyone have any clue where to look for a resolution? It seems the crash occurs during launch, but it is not clear at all which method is responsible for it. I can also not reproduce it..
Thanks!
Hardware Model: iPhone4,1
Process: XXXXXX [499]
Path: /Users/USER/XXXX.app/XXXX
Identifier: XXXXXXX
Version: 16.1
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2013-10-26T00:14:55Z
OS Version: iPhone OS 7.0.2 (11A501)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x3a3d41fc
Crashed Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3a3d41fc ___pthread_kill + 8
1 libsystem_c.dylib 0x3a384ffd _abort + 77
2 libc++abi.dylib 0x396b3cd7 abort_message + 75
3 libc++abi.dylib 0x396cc6e5 default_terminate_handler() + 253
4 libobjc.A.dylib 0x39e15921 _objc_terminate() + 193
5 libc++abi.dylib 0x396ca1c7 std::__terminate(void (*)()) + 79
6 libc++abi.dylib 0x396c9d2d ___cxa_increment_exception_refcount + 1
7 libobjc.A.dylib 0x39e157f7 _objc_exception_rethrow + 43
8 CoreFoundation 0x2f970d5d _CFRunLoopRunSpecific + 641
9 CoreFoundation 0x2f970acb _CFRunLoopRunInMode + 107
10 GraphicsServices 0x34691283 _GSEventRunModal + 139
11 UIKit 0x32212a41 _UIApplicationMain + 1137
12 XXXXXXX 0x000829d7 main (main.m:55)
The reason is that a Objective-C exception was thrown, caught, and then re-thrown. The original stacktrace is then lost unless you saved/logged it where you caught it.
Look for any place in your code where you catch Objective-C exceptions, and also look in any third party frameworks you might use.
Of course, first try to reproduce the problem in a debugger, where you set a breakpoint on all exceptions (click the little '+' icon down to the left in the Breakpoint tab in Xcode).
In very rare occasions, but very persistently some of our users will get a crash in our app. It starts ok but short after it crashes when they pick something from a menu. Those that see it always get it, everybody else works fine. Can someone see something that can help me track it down?
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x31495848 __kill + 8
1 MYApp 0x0007a8b6 TFHandleExceptions + 986
2 CoreFoundation 0x372df950 __handleUncaughtException + 68
3 libobjc.A.dylib 0x34fe433e _objc_terminate + 122
4 libc++abi.dylib 0x36a173be safe_handler_caller(void (*)()) + 70
5 libc++abi.dylib 0x36a1744a std::terminate() + 14
6 libc++abi.dylib 0x36a1881e __cxa_rethrow + 82
7 libobjc.A.dylib 0x34fe42a2 objc_exception_rethrow + 6
8 CoreFoundation 0x37235506 CFRunLoopRunSpecific + 398
9 CoreFoundation 0x37235366 CFRunLoopRunInMode + 98
10 GraphicsServices 0x339f4432 GSEventRunModal + 130
11 UIKit 0x30fe1cce UIApplicationMain + 1074
12 MYApp 0x0005bc9c main (main.m:17)
13 MYApp 0x0005bc30 start + 32
Your app crashes because of an exception. TF doesn't seem to cover these and doesn't show the origin of the crash. The exceptions gets rethrown into the main thread in the next runloop, so the stack trace of the main thread does not show the origin of it. You need to use another crash reporting library which is able to show that information or try to get the original crash report that iOS writes. (Most PLCrashReporter based crash reporting libraries or services can do that)
The reason could be any kind of exception, like NSArray indexOutOfBounds or anything else.
I am totally at a loss on this crash report. I have several fairly complicated apps already in the store and recently submitted an update to one of them. I promptly received the response it had been rejected for crashing on startup. They are using exactly the same SDK version as me, 3.1.2. After symbolicating the stack trace, this is what was crashing:
Process: MyAppName [60]
Path: /var/mobile/Applications/0EC19245-D3A4-47D0-94D9-XXXXXXXXXX/MyAppName.app/MyAppName
Identifier: MyAppName
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2010-01-19 15:43:46.804 -0800
OS Version: iPhone OS 3.1.2 (7D11)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
and this is the pertinent stack trace.
Thread 0 Crashed:
0 libSystem.B.dylib 0x0007e9ac __kill + 8
1 libSystem.B.dylib 0x0007e99c kill + 4
2 libSystem.B.dylib 0x0007e98e raise + 10
3 libSystem.B.dylib 0x0009363a abort + 34
4 libstdc++.6.dylib 0x000453b0 __gnu_cxx::__verbose_terminate_handler() + 376
5 libobjc.A.dylib 0x00005858 _objc_terminate + 104
6 libstdc++.6.dylib 0x00043776 __cxxabiv1::__terminate(void (*)()) + 46
7 libstdc++.6.dylib 0x000437ca std::terminate() + 10
8 libstdc++.6.dylib 0x00043896 __cxa_throw + 74
9 libobjc.A.dylib 0x00004714 objc_exception_throw + 64
10 Foundation 0x000013c2 __NSThreadPerformPerform + 570
11 CoreFoundation 0x00056a96 CFRunLoopRunSpecific + 1834
12 CoreFoundation 0x00056356 CFRunLoopRunInMode + 42
13 GraphicsServices 0x00003cb8 GSEventRunModal + 108
14 GraphicsServices 0x00003d64 GSEventRun + 56
15 UIKit 0x00002768 -[UIApplication _run] + 384
16 UIKit 0x0000146c UIApplicationMain + 688
17 MyAppName 0x0000ed6a main (main.m:13)
18 MyAppName 0x000028e4 start + 44
To me that stacktrace is near useless, it just says a component crashed when we started your app yet I can not reproduce it on a similar system (the only difference being they are running Snow Leopard and I am just running Leopard).
Any suggestions as to what I could next? Thanks.
If you are running Snow Leopard, turn on the Static Analyzer in your project.
Turn on NSZombieEnabled
http://www.frogameleon.com/blog/last-night-an-iphone-zombie-nszombieenabled-saved-my-life
Review the other Debugging docs and use the tools Apple provides.
http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/130-Debugging_Applications/debugging_applications.html
Actually it doesn't say a component crashed when you started the app. The crash may have happened at any point.
What it does say though, is that it crashed in NSThreadPerform, which seems like you were trying to call performSelector on either an object that no longer existed, or possibly against an object that did not have the method you were trying to invoke.
So I'd look for anywhere you use performSelector on the main thread, and try and think from there how the target could be invalid.