iPhone app not starting on simulator, no errors
Asked Answered
M

7

14

I'm having a problem where my (simple) iOS app builds fine, says running but on the simulator I just get a blank screen. In xCode, it still says "Running XXXX on iPhone 5.0 Simulator" but also give a "Thread 1: signal SIGABRT";

There are no readable errors in the bottom window, just:

argc = (int) 1
argc = (char **) 0xbffff578

It has been absolutely fine until now. I had the problem after trying to swap out a few images and their @2x versions for ones that I'd slightly tweaked.

I've done a clean and I have cleaned the build folder. I have also emptied the DerivedData folder and tried rebooting. I've tried to add breakpoints in my AppDelegate in the didFinishLaunchingWithOptions method, but it seems to never reach them.

Pretty much run out of things I can think of to try.

Debug Navigator:

enter image description here

Edit:

When I comment out:

@property (strong, nonatomic) UIWindow *window;

from @interface AppDelegate

and comment out

@synthesize window = _window;

from @implementation AppDelegate, it loads fine albeit with a blank screen because I guess the window is not loading.

Mochun answered 3/3, 2012 at 15:22 Comment(2)
OK, some progress. I've gone to the storyboard and made a new View Controller and changed the entry point to it. It loads this one ok, so something wrong with my original View Controller. hmmmmmmMochun
Do you use a version controll system like git? Then you could easily make a diff and see what's the differences between the to versions.Flatboat
F
17

This might help you as it helped me

Xcode->Product->Edit Scheme

here you can see "Executables" set here "yourappname.app" and it will start working quite fine

Fragrant answered 8/10, 2012 at 6:55 Comment(0)
Z
15

Extending on Ashar's answer (as it worked for me).

First click into "Edit Scheme", pictured below.

click edit scheme

Then in the popup that appears, click Run [Your App Name] and set the Executable dropdown menu to [Your App Name].app, pictured below. click Run<App Name>, set executable

This fixed the issue for me. Hope it helps.

Zobe answered 7/3, 2013 at 21:10 Comment(0)
F
2

Have you already reset the Simulator?

Flatboat answered 3/3, 2012 at 15:30 Comment(2)
Can you create a new Project with the same name and copy all the files from the old project to the new one?Flatboat
Probably, doesn't help work out what's actually going on though. The new blank project runs fine.Mochun
D
0

Why don't you make an empty project, check if it runs, and then copy your classes in your new project? It will probably work

Drubbing answered 3/3, 2012 at 15:37 Comment(1)
Yes it probably would work. Wouldn't figure out what's wrong though so what happens if I run into this again? Plus although it's fairly simple I have got quite a lot setup and was working now, core data and everything.Mochun
B
0

Line 10 is throwing an exception. It would help a lot if you can figure out what is the specific exception, which you might be able to do by examining the state at line 9.

However, seeing how early in the app startup this is happening, my guess would be that you have messed up your app resources - either you have changed the name of a required resource, or the resource is in the wrong format and the runtime doesn't know how to deal with it.

Since you mentioned you've modified some image, I'd venture to guess that the app you used to tweak it produced a different format of the image. I would try replacing the images back with the original version you know used to work, and then start swapping them with the modified one by one, until you isolated one that breaks it. At that point you can examine the difference and figure out what's wrong with it.

Ballance answered 3/3, 2012 at 16:1 Comment(1)
I updated an @2x version of an image I was using for a button because I realised that the resolution was 1px wrong (i.e. 1px less than double the normal non-retina image).Mochun
D
0

Maybe I'll say something stupid(probably), but according to you it happened after you replaced the images. Did you also delete them and use other names for images? I think that the problem might be that you used some image that is now missing.

It was just a random guess

Deuteron answered 3/3, 2012 at 16:7 Comment(1)
No same images, thanks for the guess. 1px different resolution though!Mochun
F
0

I ran into this one after upgrading to XCode 7.2. In my case, the solution was to manually delete the build folder and restart my computer. I'm sure this is not a universal solution, so YYMV.

Flabellum answered 11/1, 2016 at 15:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.