update OS 10.10 crashes program

Discussion in 'Mac Programming' started by larswik, Jun 7, 2015.

  1. larswik macrumors 68000

    Sep 8, 2006
    I updated to 10.10 and downloaded the latest Xcode. Today I tried to run a program I have been working on for the last year and it crashes before it even launches the app in Xcode? I set the breakpoint and it seems that the problem is in the NSApplicationMain. I have not seen an error like this and it is confusing. I did a web search but couldn't find any good answers I could follow. I took a screen shot.

    If anyone could take a look at it and point me in the right direction I would be thankful.

    Attached Files:

  2. Red Menace macrumors 6502

    Red Menace

    May 29, 2011
    Littleton, Colorado, USA
    What OS and Xcode versions did you update from? What kind of application/project is it?
  3. larswik thread starter macrumors 68000

    Sep 8, 2006
    I updated from 10.9 to 10.10.3 Xcode is 6.3.2. The application is simple and an aid to create a graphic. from selected images. It loads images and displays them in a scrollView. I pick for images and then fill in string data and press an NSButton to create context for the images and then it creates a .tif file.
  4. subsonix macrumors 68040

    Feb 2, 2008
    Have you tried to move the breakpoint until you hit the crash? Also, the crash report may give you some clues.
  5. larswik thread starter macrumors 68000

    Sep 8, 2006
    I think the very first line break that I can set is in the AppDelegate.m. I set a breakpoint where I instantiated a sharedArray. The program crashes before it even hits this first line of code. I set up a custom breakpoint to stop where it throws an exception. I did a screen capture in my first post that shows where it stopped. If the breakpoint was something simple like an array out of bounds I could easily fix it.

    #import "AppDelegate.h"
    @implementation AppDelegate
    @synthesize sharedArray;
    - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
        // Insert code here to initialize your application
        sharedArray = [[NSMutableArray alloc] init]; // This is my first line of code that should be called.
        [self.window setOpaque:NO];
        NSColor *backgroundColor = [self.window backgroundColor];
        backgroundColor = [backgroundColor colorWithAlphaComponent:0.6];
        [self.window setBackgroundColor:backgroundColor];
        //[[self window] setAlphaValue:0.5];
  6. subsonix macrumors 68040

    Feb 2, 2008
    Yes, it stopped there since you set the breakpoint there. I was just asking if you tried to move the breakpoint to isolate the exact line. How about the crash report?
  7. larswik thread starter macrumors 68000

    Sep 8, 2006
    Thanks for the continuing help Subsonix, I set a breakpoint in main.m for the return line. I ran the program and it stopped at that breakpoint, I clicked on the continue program execution button and it worked just fine till the program fully launched? I can't explain it but it is working just fine now. I don't understand how it can fix itself?

    By the way I included an image that has the crash data in the display window below. I don;t know if there is a more detailed folder that contains other crash data files to review or if its the normal debug area that tells you why it crashed. In this case there was no data below as you can see from the image.

    Thanks again!

    Attached Files:

  8. subsonix macrumors 68040

    Feb 2, 2008
    I don't know what is going on, but from the first post I was thinking of applicationDidFinishLaunching that you showed in the second post as a refinement over: "it seems that the problem is in the NSApplicationMain". Anyway, the crash report should be in ~/Library/Logs/DiagnosticReports/.
  9. briloronmacrumo macrumors 6502


    Jan 25, 2008
    FWIW: Cleaning the build folder is sometimes helpful. Product menu==>Clean. Then hold down option key and select 'Clean Build Folder' on same Product menu.
  10. larswik thread starter macrumors 68000

    Sep 8, 2006
    Its odd. There is no crash report. Here is a screenshot I took of that folder, there is just a finder crash back in May. Strange???

    briloronmacrumo:Thanks for that info. I did try to clean it but I never tried to hold down the option key first.

    Attached Files:

  11. subsonix macrumors 68040

    Feb 2, 2008
    Have you rebooted the computer since last crash? This folder is regularly cleaned on reboot, at least for reports that are not sent to Apple. I use a script that opens the latest report in a pager when using Terminal (almost always), although this may have changed in 10.10.

    The implication of your position is that the issue is in Apple runtime or frameworks, not your code, on the other hand, not all code crashes on startup in 10.10.
  12. larswik thread starter macrumors 68000

    Sep 8, 2006
    Yes, it's been rebooted. I have 2 hard drives, one with 10.7 which I use for my work editing videos and graphics. Since Apple wants everything to run on the latest OS or IOS and ties Xcode to that I installed a second drive that I use use for programing and only have xcode and photoshop installed on that, So I swap between the 2 depending on what I need to do.

    Thanks again for helping me work though it.

Share This Page

11 June 7, 2015