Thread: SIGABRT Error

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    3

    SIGABRT Error

    I know this really isn't one of the main types of C programming but it is something I do so please bear with me. I also understand that this might not be the correct sub-forum and, since I'm new, don't really know how things work here.

    The reason I'm making this thread is because every time I make an application in Objective-C I get an error called a SIGABRT error (which in my opinion is very unspecific and doesn't lead to a place where you can fix the problem in the slightest). If I'm doing something wrong please tell me what I do every time that makes this happen. My code is as follows...

    Time_Zone_ConverterAppDelegate.h
    Code:
    #import <Cocoa/Cocoa.h>
    
    
    @interface Time_Zone_ConverterAppDelegate : NSObject <NSApplicationDelegate> {
    @private
        NSWindow *window;
        IBOutlet NSTextField *time_Input1;
        
    }
    
    
    @property (assign) IBOutlet NSWindow *window;
    
    
    @end


    Time_Zone_ConverterAppDelegate.m
    Code:
    #import "Time_Zone_ConverterAppDelegate.h"
    
    
    @implementation Time_Zone_ConverterAppDelegate
    
    
    @synthesize window;
    
    
    - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
    {
       
    }
    
    
    - (IBAction)zoneConvert:(id)sender {
        [time_Input1 setStringValue:@"hello"];
    }
    
    
    
    
    @end


    It is highly possible I've done something wrong here however this happens every time which makes me thing there is something wrong with XCode. Below is a screenshot of the error as it appears to me. If anyone here knows anything about this please, please tell me...

    SIGABRT Error-screen-shot-2012-03-20-9-06-20-pm-jpg
    Attached Images Attached Images SIGABRT Error-screen-shot-2012-03-20-9-06-20-pm-jpg 
    Last edited by Domenic; 03-20-2012 at 08:28 PM.

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Look at the screen, man! It says "terminate called after thorwing an instance of NSException". There was an uncaught exception. Perhaps if you bother to catch the exception you can examine it and see what's wrong?
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Registered User
    Join Date
    Mar 2012
    Posts
    3
    I think it has something to do with when I use an NSTabView. I took that out and redid the interface and it worked flawlessly. Unfortunately in Objective-C you can't catch errors like you can in some other languages. It's kind of stupid but it's the only way I know how to make a user interface so I guess it works. I'm not sure what exactly it means to "throw an instance of NSException" but thanks!

  4. #4
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    You never declare a method named zoneConvert in your interface, could that be it? You can catch exceptions with the @catch directive btw.

  5. #5
    Registered User
    Join Date
    Mar 2012
    Posts
    3
    Quote Originally Posted by Subsonics View Post
    You never declare a method named zoneConvert in your interface, could that be it? You can catch exceptions with the @catch directive btw.
    I don't think it's that I never declared a method. I connected them and it works now that I took out the NSTabView in the interface. I never knew about @catch, do you know how it works?

  6. #6
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    Quote Originally Posted by Domenic View Post
    I don't think it's that I never declared a method. I connected them and it works now that I took out the NSTabView in the interface. I never knew about @catch, do you know how it works?
    Well, I was shooting in the dark mostly to be honest. But it's related to some mistake you did, not NSTabView.

    https://developer.apple.com/library/...xceptions.html

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 07-24-2011, 09:38 PM
  2. malloc causing sigabrt with memwatch inclusion
    By drshmoo in forum C Programming
    Replies: 2
    Last Post: 03-12-2011, 10:05 AM
  3. SIGABRT on simple malloc
    By KVH in forum C Programming
    Replies: 4
    Last Post: 11-26-2010, 04:54 PM
  4. SIGABRT when constructing a string
    By jason_m in forum C++ Programming
    Replies: 8
    Last Post: 06-30-2010, 08:08 PM
  5. SIGABRT upon free()
    By registering in forum C Programming
    Replies: 2
    Last Post: 07-19-2003, 07:52 AM

Tags for this Thread