xCode crashing on all projects?

Discussion in 'iOS Programming' started by Tander, Jun 6, 2013.

  1. Tander macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #1
    Hi Guys,

    So I am new to iOS development. :)

    My Machine specs:

    MacBook Pro 17" (Late 2011)
    8GB DDR3 Ram
    Core i7 (2.4 GHz)

    Software: OS X 10.8.4 (Montain Lion)
    xCode Version 4.6.2 (4H1003)
    I updated from 10.8.3 to 10.8.4 this morning I believe.

    The problem:

    I've built a few projects that are very small test apps and I know they work perfectly fine (On device and Simulator)

    On my latest project my app kepted crashing in the simulator - it would not crash every time. It crashes every time I start up the app for the second time.

    Eg: Build / Run the first time - no compiler errors or warning - App launches in simulator and works
    Build and launch second time - again, no compiler errors simulaor tries to launch (I get a black screen with status bar at the top) - xCode pauses execution and I get a green indicator at the following line in my code:

    Code:
    int main(int argc, char *argv[])
    
    {
    
        @autoreleasepool {
    
            return UIApplicationMain(argc, argv, nil, NSStringFromClass([RotationAppDelegate class]));
    
        }
    
    }
    
    So I turned on all breakpoint exceptions and I went through every line of code in every class and could not find the issue. Few hours later I gave up.
    I then decided to load a version of the app I know for a fact at zero issues and launched every time (You know in case I missed some syntax error)

    Again xCode would crash everytime I ran the app in the simulator for the second time - WTF??

    So I thought okay - let's open up an app that I have deployed to my device and I know it runs fine every time - no crashes...
    Yup.. same problem at the same line of code (Obviously the class in the code is different - but same line)

    Can anyone help me figuring this out as I just wasted a few hours debugging a program that doesn't actually have any errors! :mad: (I will probably laugh about this later...)
     
  2. Duncan C macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #2

    The simulator is unstable as hell on my desktop mac in Xcode 4.6.2. I get processes crashing when I launch a project in the simulator more than half the time. Sometimes its a process called "lsd" and other times it's another process. I have a radar bug into Apple on the problem.
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    Don't sell yourself short. You've been on these forums for over a year now. :)

    Anyways, have you tried running the apps on your device through Xcode and seeing if it still crashes? And, technically, it's not Xcode that's crashing; it's your app(s) running (in the Simulator) that seems to be the issue.
     
  4. Tander thread starter macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #4
    Thanks - next time I will know how to handle this problem. Still new to this. :eek:

    I found the problem over at Apple Dev forums:

    The issue is related to a compatibility issue between LLDB and OSX 10.4.8. Switching to GDB will solve the issue.
    Another possible workaround is waiting a few seconds after you have stopped your app in the simulator and using CMD + R to run again a few seconds later.
    (This doesn't work all the time for me)

    That is a "possible workaround" by posted over at Apple's Developer forums - for those of you who have access:

    https://devforums.apple.com/message/817538#817538

    Next time a S/W update is available for OS X - I am waiting a few weeks to see if there are any issues lol!
     
  5. TheWatchfulOne macrumors 6502

    Joined:
    Jun 19, 2009
    #5
    That's probably a typo. If not, then I would certainly expect a few compatibility issues if you're trying to develop iOS apps using Tiger. ;)
     
  6. Tander thread starter macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #6
    Sorry, yes - typo! 10.8.4 I meant!

    @dejo - thanks. :cool:
     
  7. technowar macrumors 6502

    Joined:
    Apr 1, 2011
    Location:
    Cebu, Philippines
    #7
    Change the debugger from LLDB to GDB if you are running from an Xcode 10.8.4. It should do the trick.
     
  8. Duncan C macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #8
    Ugh. I would not want to go back to GDB any more.
     
  9. technowar macrumors 6502

    Joined:
    Apr 1, 2011
    Location:
    Cebu, Philippines
    #9
    Well, that's the only way to prevent your app from crashing until Apple sends out patches.
     
  10. Tander thread starter macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #10
    If you wait ten seconds between app launches - the problem is less frequent. Around 95% less.
     

Share This Page