Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-18-2011, 11:40 AM   #1 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 60
nathanl1192 is on a distinguished road
Default App will not relaunch after force quit.

I am currently developing an app, which works fine, and I have managed to wipe it of bugs, apart from just one.

When I quit the app through the multitasking bar, and then relaunch it. It freezes and the following line of code is highlighted in green in main.m in xcode 4:

int retVal = UIApplicationMain(argc, argv, nil, nil);

It is followed by the error: Thread 1: Program received signal "SIGKILL".

I have to stop the build, and run it again to get the app to work again.

Does anyone know what the problem is, and how to fix it. This happens when testing on iOS 4.2 and 4.3, running Xcode 4 on Mac OS 10.6.6.

Nathan
nathanl1192 is offline   Reply With Quote
Old 03-18-2011, 01:06 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2010
Location: Boston, MA
Posts: 135
carbonbasednerd is on a distinguished road
Default

So, you are running the app on a device and that app is started in xcode. While it's running you force quit the app via the device and then tap the icon on the iphone to open it again?

If you are then i don't think anything is wrong. What's going on is that you are killing the session on the iphone but the session hasn't terminated in xcode and you are trying to open another session on the iphone. Not the most technical explanation - but if that's what you are doing then i don't think there is anything wrong.
carbonbasednerd is offline   Reply With Quote
Old 03-20-2011, 01:40 PM   #3 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 60
nathanl1192 is on a distinguished road
Default

Quote:
Originally Posted by carbonbasednerd View Post
So, you are running the app on a device and that app is started in xcode. While it's running you force quit the app via the device and then tap the icon on the iphone to open it again?

If you are then i don't think anything is wrong. What's going on is that you are killing the session on the iphone but the session hasn't terminated in xcode and you are trying to open another session on the iphone. Not the most technical explanation - but if that's what you are doing then i don't think there is anything wrong.
Thanks for that!
nathanl1192 is offline   Reply With Quote
Old 07-06-2011, 05:17 PM   #4 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 2
Skógvur is on a distinguished road
Default

I have this problem too, and Xcode is not the problem. Even if I just transfer the compiled application to my device by dragging the files from Finder into the organiser window of Xcode, the same thing happens.

1. Start program. It runs fine.
2. Leave for the home screen by one press on the home button.
3. Double press the home button to access the activity bar, and force quit the app.
4. Try to relaunch the app; the loading image is displayed, but then the program crashes, by SIGKILL, as soon as it hits UIApplicationMain.

EDIT:
Now even this has stopped working; using the run button in Xcode is the only way to get the app up and running on the device again. A new rerun, that is. The same thing will still happen after that, each time. Transferring directly from Finder hasn't been working before either, so maybe I just managed to fool myself in this regard. Anyway, the above thing happens even if I run the program, stop it from Xcode, and then try to run it regardless of Xcode. This does not happen on the iPhone 4 (which does have 4.3.1, though, while the iPad has 4.3.3), but it does happen in both the iPhone 4 simulator and the iPad 2 simulator (4.2 and 4.3, respectively; they're not specified any more than that by Xcode).

EDIT 2:
Hm. It actually does work when dragging from Finder. Random times. Now and then. But it's still the same thing; force quit once, and the program will never boot again until it's reinstalled. SIGKILL.

Last edited by Skógvur; 07-06-2011 at 05:43 PM.
Skógvur is offline   Reply With Quote
Old 07-06-2011, 07:00 PM   #5 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 2
Skógvur is on a distinguished road
Default

SOLVED:
For some reason, this was solved by changing the deployment target (NameOfProjectInList > Summary > Deployment Target) from 4.3 to 4.3. Extremely weird, but it does most definitely seem to have done the trick. How I close the program isn't very important, either. It just works.

Last edited by Skógvur; 07-06-2011 at 07:02 PM. Reason: Accidentally quoted myself instead of editing my last message. Removing messages seems to be impossible on this board.
Skógvur is offline   Reply With Quote
Old 12-05-2011, 06:56 PM   #6 (permalink)
Registered Member
 
Join Date: Dec 2011
Posts: 3
Billy The Kit is on a distinguished road
Default SIGKILL While Using A Custom URL Scheme

Quote:
Originally Posted by carbonbasednerd View Post
So, you are running the app on a device and that app is started in xcode. While it's running you force quit the app via the device and then tap the icon on the iphone to open it again?

If you are then i don't think anything is wrong. What's going on is that you are killing the session on the iphone but the session hasn't terminated in xcode and you are trying to open another session on the iphone. Not the most technical explanation - but if that's what you are doing then i don't think there is anything wrong.
Exactly. But in my case, I was trying to start my app using Safari to trigger the app's Custom URL Scheme. For those readers who might stumble across the same situation as mine, here's the sequence:

- I start the app via Xcode in the simulator.
- I tap the simulator's home button to put my app in background.
- I start Safari and send "myappname://" just to see if it, in fact, brings my app to the foreground. It does.
- Now I want to make sure it kicks off the app while it is terminated, so I double-tap home and kill the app. Important note: Xcode is still running the simulation.
- I return to Safari and send the URL again. The app displays as expected in the simulator but immediately crashes with a SIGKILL error.

I twisted my brain for awhile trying to figure out what was wrong with the code. Turns out, nothing is wrong with the code. To "fix", simply stop the simulation in Xcode as carbonbasednerd explained:

- Stop the Xcode simulation (click "Stop").
- Double-tap the simulator Home button and kill the app again (because it was restarted by Safari even though the app crashed.)
- Return to Safari and send the URL.
- Ta da! The app does a cold start and calls my app delegate's openURL: method, as advertised by Apple.
Billy The Kit is offline   Reply With Quote
Reply

Bookmarks

Tags
app, bug, crash, ipad, xcode 4

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 351
12 members and 339 guests
7twenty7, chiataytuday, condor304, Creativ, Domele, dreamdash3, laureix68, LEARN2MAKE, michelle, mistergreen2011, Sami Gh, tinamm64
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,661
Threads: 94,119
Posts: 402,896
Top Poster: BrianSlick (7,990)
Welcome to our newest member, tinamm64
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:30 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0