GSRegisterPurpleNamedPort SIGABRT crash, reboot the device can fix this issue, however I want to find the root cause - iphone

The same issue as the following thread, reboot the device can fix this issue, however I want to find the root cause, user upgrades our app, we can't expect them to reoot the device to use it normally.
It will always occur by the following steps.
User launch app with version 1.1.
User put app into background (still running).
User upgrade app to new version 1.2.
User click app icon, app crash during startup.
Any idea or discussion will be apprecicated, thanks in advance.
GSRegisterPurpleNamedPort SIGABRT in UIApplicationMain Before App Delegate Gets to Run Any Code

App is crashed before new version app installed, some system clean action hasn't been done.

Related

Application crashes after installing iOS 4.2

I recently installed iOS 4.2 for my iPod after then my application started to crash.
The scenario is: I launch my application wait until it's up and running then hit the iPod home button then launch my application again, my application starts again for seconds then crashes.
my application is a job search engine, so in all of its navigation pages it's communicating with internet server.
I think the problem has to do with applicationDidEnterBackground, applicationWillEnterForeground, or applicationDidBecomeActive methods. I do not have an code in these methods and I do not know if I need to, to prevent the crash.
I do not understand what happens after I hit the home button and my application goes to the background:
will it still be running in the background (because of the multithreading thing in iOS4.2).
Sometimes when I relaunch my application it goes to last page I left in before hitting the home button and sometime it starts from the home page.
I do not understand what's going on, I just want it every time it starts to start in the home page.
I was just about to submit my application to the Apple Store just before I updated to iOS4.2 and the crash starts to happen. I'd really appreciate if someone can help me with this issue that I'm not even able/or know how to debug.
Thanks a lot in advance.
Regards,
You can set the Info.plist key ApplicationDoesNotRunOnBackground to make sure the app is completely terminated.
Xcode / Organizer will show your device crash logs.
Xcode -> COMMAND+CONTROL+O -> Device Logs or you (making sure the device is connected) can select the iPod from the list of devices, then choose Device Logs.
You don't need to have any code in the applicationDidEnterBackground, applicationWillEnterForeground, or applicationDidBecomeActive delegates, so that's not making your app crash.
I would definitely check out some of those logs in Organizer. Maybe post some of them here, or pastie.org

GSRegisterPurpleNamedPort SIGABRT in UIApplicationMain Before App Delegate Gets to Run Any Code

We recently put an update out for one of our apps and many users told us that they could no longer run the app because it crashed on startup.
We have been able to recreate the crash by building and running the previous release build onto a device and then building and running the new build overtop of it on the same device, but the stack trace for this crash is very strange:
Thread 0 Crashed:
0 libSystem.B.dylib 0x000791d0 __kill + 8
1 libSystem.B.dylib 0x000791c0 kill + 4
2 libSystem.B.dylib 0x000791b2 raise + 10
3 libSystem.B.dylib 0x0008d6fa abort + 50
4 GraphicsServices 0x00003aa8 GSRegisterPurpleNamedPort + 172
5 GraphicsServices 0x00003d5a GSEventInitialize + 150
6 UIKit 0x00004cd6 UIApplicationMain + 350
7 MyApp 0x0000df5c main (main.m:14)
8 MyApp 0x00002c84 start + 32
It appears to be crashing in the UIApplicationMain method that main calls. But it crashes before it reaches any of the methods in our app delegate. I have put breakpoints in all of the app delegate methods and none of them are reached.
In addition, this appears to be only occurring for users that are updating the app. Users that are downloading it from the app store without it already being on their iPhones are not seeing the problem.
Has anyone ever encountered a crash like this? Why would this problem only occur for updates?
Is this under iOS 4.0? This type of error had been reported to occur when a process or thread from the previous install of this app has crashed and somehow hasn't been cleaned up by the OS yet or has hung up in the debugger.
Does a reboot of the iPhone after installation of the new version of the app cause this error to go away? That would be one good indication that something is stuck/corrupted in the OS from the previous install, rather than in the app bundle itself.
I've been having the same issue (thankfully I caught it before submitting to the AppStore). Unlike this answer states, the issue still occurs on iOS 5.x and 6.x.
So I went into the Console and found a few messages were logged before my app crashed. First was this message:
com.apple.launchd.peruser.503[148]: (UIKitApplication:BUNDLE-ID[0x4fb5][20462]) The following job tried to hijack the service "BUNDLE-ID-1" from this job: UIKitApplication:BUNDLE-ID-1[0xac31]
The next message in the console displays immediately afterwards:
GSRegisterPurpleNamedPort Couldn't register BUNDLE ID with the bootstrap server. Error: unknown error code (1100).
This generally means that another instance of this process was already running or is hung in the debugger.
The crash is caused by another almost identical process already running on the system. It sounds like an issue with iOS not the app itself. This should help clear things up. Best thing to do would probably be to tell users to quit the app, try restarting and open again.
I've also submitted a bug report to Apple detailing the issue.
EDIT: It looks as though this might have been an issue with Xcode itself. Apple has just released an update which should fix the issue (at least in the Simulator):
I got this problem in a project every time i debugged it a second time. Only rebooting the device would allow me to debug once again.
This particular cause of the above stacktrace was finally solved by reinstalling iTunes.
It might be purely co incidence but when ever i debug the application release mode and than without deleting it again tries to debug it in debug mode this problem seems to happen. restarting it however does the trick .
It seems that old app has been launched without quit completely, some handlers is still alive or registered by OS, so when you launch the new version, app crash.
I have also experienced such tough issue, how do you fix it finally? Thanks.
No core data here. Just updated a text file in the main bundle, and all of a sudden this
"purple point" fail. IOS 5.1.1, iPad, opengl app with a lot of gestural interfacing.
I was real glad to find some clues here. The reset fixed it.
It seems that happend also to me when update to 10.8.4, I guess it is an Xcode bug, I will issue a bug report. If the app is opened and I run it from Xcode, the app crashes, soetimes it restarts by itself and sometimes I need to relaunch it again.
If you use Core Data in your app and changed the schema, then you will often see this issue arise. What happens is the old version of the app will have an old version of the database (sqlite presumably) and when the new version of the app starts up, it expects the new version of the database as well. This causes a crash right at startup like this.
The immediate fix for this is to delete the app and re-install it. We do this while in development. But when you are ready to push the new version, you'll need to setup a Mapping Model in order to migrate your database. There is a lot of info on data migration in the developer docs:
http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/CoreDataVersioning/Introduction/Introduction.html

Problem with app on device

When I run my app with simulator every thing is ok.also when i run it on device (ipod touch 3G) for the first time,i have no problem but if i close my app and run it again,it hangs(no button working & just i can uninstall it) and if i try to minimize it ios seems out of action(every thing is being black)
how can i solve this problem ?
Run your application in the simulator with the profiling tools, making sure you check for allocations / releases and if there are any network resources left open.
You haven't said anything about what your app does to give any more help than that, but the development tools will tell you what is going on.
Also when you connect to the iPod, check the crash reports to see what happened
have u release any object in appWillTerminate. may be u trying to release object that is already released before the application quit. or u can see the application quit status in nslog if status is not 0 means application is not quitting properly.

App crashed on app store, not in local version

I ran into a horrifying bug when my app went live. It crashes in a spot where it had been fine.
download from app store using complimentary review code
start app
press start button
CRASH
NOTE: crash reoccurs at every app startup until phone is rebooted - then it disappears
When I try to replicate without the app store
start app
press start button
everything is good.
....
I immediately pulled the app from sale. Right now, I can't replicate at all because I can't download the app.
How to debug?
Download the app from the store onto your device.
Gather the crash reports off of the device manually (
Run them through symbolicatecrash (you did keep the dsym's right?)
Find error, rinse and repeat.

iPhone app was working, suddenly starts crashing on startup, reinstall fixes, but why?

Here's the situation:
-Had a development build of the app we just submitted on my phone, working fine for days (and previous builds worked fine for weeks).
-Yesterday, I touched the app icon, the app launches then crashes out (I wasn't connected to my computer at the time, but if I had to guess, it was around or before when applicationDidFinishLaunching runs). Basically, I briefly see my Default.png, then the app closes. This happens every time I try to run it.
-I restart my phone. No difference, the app is still failing to launch. All other iphone apps I have appear to be working fine.
-This morning I reinstall the app from my development computer and all is well, it's working fine again. No problems. This is the SAME EXACT CODE with the same build parameters.
This has me really worried, does anyone have any idea at all what might have happened? It's like the app permanently broke itself, before it even hits any of my code no less :(. I had a theory it might have had to do with an expired provisioning profile, but I didn't get any message then or when I reinstalled.
I'd appreciate any advice/pointers/ideas people have!
Connect your iPhone to the computer, launch XCode, go to the Window menu, and select Organizer. Click on your device in the left hand bar, and check your crash logs.
That should tell you when it is crashing, and why.
Actually, the crash logs should still be there from when your app WAS crashing, so even if you have reinstalled, you may be able to figure out what WAS going wrong.
Are you using core data?
Did you change your schema? That would cause a crash on startup and a reinstall would then fix it.
If it was the exact same code it seems to point to a data issue.