Mac update OS 10.10 crashes program

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
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.
 

Attachments

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
What OS and Xcode versions did you update from? What kind of application/project is it?
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.
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
Have you tried to move the breakpoint until you hit the crash? Also, the crash report may give you some clues.
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Have you tried to move the breakpoint until you hit the crash? Also, the crash report may give you some clues.
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.

Code:
#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];
}

@end
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
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?
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
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?
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!
 

Attachments

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
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/.
 

briloronmacrumo

macrumors 6502
Jan 25, 2008
486
297
USA
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.
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
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/.
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.
 

Attachments

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
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???
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.
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
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.
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.