GSRegisterPurpleNamedPerPIDPort crash - ios

Thread 0 Crashed: 0 libsystem_kernel.dylib 0x1be21acc __pthread_kill + 8
1libsystem_pthread.dylib 0x1beda086 pthread_kill + 62
2 libsystem_c.dylib 0x1bdb695a abort + 108
3 GraphicsServices 0x1dd0b83a GSRegisterPurpleNamedPerPIDPort + 0
4 GraphicsServices 0x1dd0aad8 _GSEventInitializeApp + 106
5 UIKit 0x21af68e8 _UIApplicationMainPreparations + 832
6 UIKit 0x218e2de2 UIApplicationMain + 102
7 LanSynergism 0x000d160e main (main.m:14)
8 libdyld.dylib 0x1bd4e4ea start
crash why when the app kill and begin

I had this happen to me. The cause for me was the Xcode debugger was still attached to the app on an exception breakpoint. So when I tried to relaunch the app it would close instantly with a stacktrace:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001adc810cc __pthread_kill + 8
1 libsystem_c.dylib 0x00000001adbda14c abort + 144
2 GraphicsServices 0x00000001b02b99e8 GSRegisterPurpleNamedPerPIDPort + 0
3 GraphicsServices 0x00000001b02b8b24 _GSEventInitializeApp + 132
4 UIKitCore 0x00000001db515b70 _UIApplicationMainPreparations + 960
5 UIKitCore 0x00000001db515724 UIApplicationMain + 164
6 MyWorldClock 0x000000010043c188 main + 688520 (AppDelegate.swift:20)
7 libdyld.dylib 0x00000001adb34fd8 start + 4
This looks to be the same as posted above.
The steps I was taking was I had Xcode debugger attached with exception breakpoints on, I changed the iOS device language which sent kill signal to all the apps, since the debugger was attached it fired the breakpoint. When trying to relaunch the app with debugger paused on the SIGABRT exception the app would open and close instantly on iOS device.
Hope this helps someone!

Related

iPad Air Overheating for developer

Some of my application users are running iPad Air. I have had reports lately of the application crashing, but all the crash reports are just giving me the standard crashed in main method. After further investigation, I think the problem might be with the iPad overheating when they are taking photos.
Is there anything as a developer I can do to maybe save data before the application crashes from overheating?
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x180591b90 objc_msgSend + 16
1 Foundation 0x1818e2658 __NSFireDelayedPerform + 428
2 CoreFoundation 0x180ed1794 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
3 CoreFoundation 0x180ed1438 __CFRunLoopDoTimer + 884
4 CoreFoundation 0x180eceb4c __CFRunLoopRun + 1520
5 CoreFoundation 0x180df8c50 CFRunLoopRunSpecific + 384
6 GraphicsServices 0x1826e0088 GSEventRunModal + 180
7 UIKit 0x1860da088 UIApplicationMain + 204
8 intelliSPEC21 0x10009b56c main (AdvancedMain.m:10)
9 libdyld.dylib 0x1809968b8 start + 4

Xcode crash report KERN_INVALID_ADDRESS at 0x0000000100001da0

I'm having a tough time figuring this crash report sent to me by Apple. For some reason they keep telling me that my app crashes on start but I cannot recreate the crash after testing it on different devices. As I'm not sure what's causing it to crash and not being able to recreate the crash, I was wondering if anyone can help shed some light on what the problem could be?
And some extra info, I'm using AsyncImageView 1.5.1 and the Reachability class. I'm not sure if that could be the source of the crash?
Any help would be greatly appreciated. Thanks a lot!
OS Version: iOS 8.0.2 (12A405)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100001da0
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000194c880b4 objc_retain + 20
1 MyApp 0x0000000100113274 0x1000f4000 + 127604
2 MyApp 0x0000000100111a84 0x1000f4000 + 121476
3 CoreFoundation 0x0000000184324430 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 16
4 CoreFoundation 0x00000001842637dc _CFXNotificationPost + 2056
5 Foundation 0x000000018515b6bc -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
6 MyApp 0x000000010011099c 0x1000f4000 + 117148
7 Foundation 0x000000018524a7ec __NSThreadPerformPerform + 368
8 CoreFoundation 0x0000000184336320 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 20
9 CoreFoundation 0x00000001843355c4 __CFRunLoopDoSources0 + 260
10 CoreFoundation 0x0000000184333674 __CFRunLoopRun + 708
11 CoreFoundation 0x0000000184261660 CFRunLoopRunSpecific + 392
12 GraphicsServices 0x000000018d35f5a0 GSEventRunModal + 164
13 UIKit 0x0000000188b664f4 UIApplicationMain + 1484
14 MyApp 0x00000001000fab44 0x1000f4000 + 27460
15 libdyld.dylib 0x00000001952dea04 start + 0

Mysterious iOS crash with tiny stack trace

I have one user, and only one user, that regularly gets the following crash:
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x0000000192e7a984 objc_object::release() + 8
1 libobjc.A.dylib 0x0000000192e79474 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 524
2 CoreFoundation 0x0000000186855b38 _CFAutoreleasePoolPop + 28
3 CoreFoundation 0x0000000186915124 __CFRunLoopRun + 1460
4 CoreFoundation 0x0000000186855dd0 CFRunLoopRunSpecific + 452
5 GraphicsServices 0x000000018c53dc0c GSEventRunModal + 168
6 UIKit 0x0000000189986fc4 UIApplicationMain + 1156
7 MyApp 0x00000001001a92d0 main (main.m:17)
8 libdyld.dylib 0x0000000193453aa0 start + 4
This is the entire crash, and I have no clue what causes it.
The user has a pretty standard phone, but it only started happening when they got a replacement iPhone 5 earlier this year. Given that timeline and the fact they are the only one with the crash, might the phone itself be at fault?
Is there anywhere I could look for more information to default this information?

Cocos2D v2.1 and arm64 crash on iPad Air despite no compiler warnings

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).

App crash in the device, exception: 0x8badf00d

I have a problem in my app. My app is using internet connection. When I run it in the device from the Xcode its running without crashing. But when I install it fisttime it runs, but if I close the app and then try to again run after loading the splash screen it crashes. Why is that? But this is working when I'm run the app through the xcode in the device.
But when I use 3G instead of wifi it goes beyond the splash screen
Updated
Incident Identifier: 5AAF8220-55D5-4011-B14A-F9A86C624F7C
CrashReporter Key: f0828a82293c0951598f3501da6c4cc391e66276
Hardware Model: iPad1,1
Process: mMusic [303]
Path: /var/mobile/Applications/6D985396-5C2A-430D-B605-617EFA46A470/mMusic.app/mMusic
Identifier: mMusic
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-09-25 10:11:07.842 +0530
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0
Application Specific Information:
com.microimage.mMusic failed to launch in time
Elapsed total CPU time (seconds): 1.050 (user 1.050, system 0.000), 5% CPU
Elapsed application CPU time (seconds): 0.237, 1% CPU
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x357fb004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x357fb1fa mach_msg + 50
2 CoreFoundation 0x357693ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x35768124 __CFRunLoopRun + 876
4 CoreFoundation 0x356eb49e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x356eb366 CFRunLoopRunInMode + 98
6 CFNetwork 0x314ade14 CFURLConnectionSendSynchronousRequest + 340
7 Foundation 0x34b304a6 +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 242
8 Foundation 0x34b54356 -[NSData(NSData) initWithContentsOfURL:] + 178
9 Foundation 0x34b85174 +[NSData(NSData) dataWithContentsOfURL:] + 36
10 mMusic 0x0013b2a4 0xa5000 + 615076
11 mMusic 0x0012fc34 0xa5000 + 568372
12 mMusic 0x000a6b96 0xa5000 + 7062
13 UIKit 0x32ecdca4 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1176
14 UIKit 0x32ec77d6 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 402
15 UIKit 0x32e95abc -[UIApplication handleEvent:withNewEvent:] + 1004
16 UIKit 0x32e95560 -[UIApplication sendEvent:] + 48
17 UIKit 0x32e94f34 _UIApplicationHandleEvent + 5820
18 GraphicsServices 0x33487224 PurpleEventCallback + 876
19 CoreFoundation 0x3576951c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
20 CoreFoundation 0x357694be __CFRunLoopDoSource1 + 134
21 CoreFoundation 0x3576830c __CFRunLoopRun + 1364
22 CoreFoundation 0x356eb49e CFRunLoopRunSpecific + 294
23 CoreFoundation 0x356eb366 CFRunLoopRunInMode + 98
24 UIKit 0x32ec6864 -[UIApplication _run] + 544
25 UIKit 0x32ec3cce UIApplicationMain + 1074
26 mMusic 0x000a638c 0xa5000 + 5004
27 mMusic 0x000a62e8 0xa5000 + 4840
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x357fb3a8 kevent + 24
1 libdispatch.dylib 0x33b2eea4 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x33b2ebc2 _dispatch_mgr_thread + 30
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x357fb004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x357fb1fa mach_msg + 50
2 CoreFoundation 0x357693ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x35768124 __CFRunLoopRun + 876
4 CoreFoundation 0x356eb49e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x356eb366 CFRunLoopRunInMode + 98
6 WebCore 0x37431c9c _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x349b472e _pthread_start + 314
8 libsystem_c.dylib 0x349b45e8 thread_start + 0
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x357fb004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x357fb1fa mach_msg + 50
2 CoreFoundation 0x357693ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x35768124 __CFRunLoopRun + 876
4 CoreFoundation 0x356eb49e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x356eb366 CFRunLoopRunInMode + 98
6 Foundation 0x34b30bb2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x34b30a7a -[NSThread main] + 66
8 Foundation 0x34bc458a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x349b472e _pthread_start + 314
10 libsystem_c.dylib 0x349b45e8 thread_start + 0
Thread 4 name: com.apple.CFSocket.private
Thread 4:
0 libsystem_kernel.dylib 0x3580b570 __select + 20
1 CoreFoundation 0x3576d63a __CFSocketManager + 726
2 libsystem_c.dylib 0x349b472e _pthread_start + 314
3 libsystem_c.dylib 0x349b45e8 thread_start + 0
Unknown thread crashed with unknown flavor: 5, state_count: 1
Looks like your application was killed by the Springboard because it failed to launch before the watchdog timer expired.
Exception Codes: 0x8badf00d
Application Specific Information:
com.microimage.mMusic failed to launch in time
It looks like you are making a synchronous call to download data at application launch. This is blocking the main thread causing application to not launch in time. You should allow the application to launch completely first and then initiate the network call on background thread (not the main thread).
Read more from these links: Link1, Link2
The exception code 0x8badf00d indicates that an application has been terminated by iOS because a watchdog timeout occurred. The application took too long to launch, terminate, or respond to system events. One common cause of this is doing synchronous networking on the main thread. Whatever operation is on Thread 0: needs to be moved to a background thread, or processed differently, so that it does not block the main thread.
Hope that helps!
If you get Exception Type: 00000020 and Exception Codes: 0x8badf00d in your crash log then it is due to running synchronous task on main thread. Solution is to use asynchronous task on main thread.
It is referred to as watchdog timeout crash reports. You can check this Apple document for details.
Seeing a similar crash for our watchos 3 app.
Part of the problem was it was difficult to get a complete crash report. Only when I was able to reliably reproduce the crash and repeated it 20-30 times did I get a single coherent crash report with a stack trace. Saw many partial reports with some json including kernel, crashReporterKey, memoryPages etc. but only one complete report with a stack trace.
Another problem, xcode never connected to the device while debugging. Of course, the app was killed for taking to long to start, so the debugger is of no use. Same symptoms with simulator.
Solution: we were activating our wcsession in our extension delegate's applicationDidFinishLaunching. Activation is asynchronous, so I assumed this was ok. Moving session activation to applicationDidBecomeActive have fixed the issue.

Resources