14
votes

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.

7
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. hmmmmmmRichard Williams
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.FrediWeber

7 Answers

17
votes

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

14
votes

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.

2
votes

Have you already reset the Simulator?

0
votes

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

0
votes

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.

0
votes

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

0
votes

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.