• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Tracking down SIGABRTs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracking down SIGABRTs


  • Subject: Re: Tracking down SIGABRTs
  • From: Don Quixote de la Mancha <email@hidden>
  • Date: Sun, 29 Apr 2012 20:00:24 -0700

On Sun, Apr 29, 2012 at 7:50 PM, Alex Zavatone <email@hidden> wrote:
> I've had the joy of trying to reassemble my app which a co worker improved last week by moving it to storyboarding.  What's popping up every now and then as I try to wire views together are instant SIGABRTs with no indication why this is happening.

Place some assertions as the very first executable lines in each of
your subroutines.  The chances are quite good that the cause of the
SIGABRTs are executable quite a long time before the crashes actually
happen.

When you fix your (or his!) bugs, leave the assertions in.  You'll
find out about many new bugs right away.

#include <assert.h>

void foo( int *ptr )
{
   assert( NULL != ptr );
...
   return;
}

assertions are a lot better than comments for documenting routine
parameters because they cannot be ignored, and must be updated when
the acceptable ranges of parameters are revised.

You can also assert the ranges of return results, but my experience is
that I get more mileage out of asserting input parameters.


--
Don Quixote de la Mancha
Dulcinea Technologies Corporation
Software of Elegance and Beauty
http://www.dulcineatech.com
email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Tracking down SIGABRTs
      • From: Don Quixote de la Mancha <email@hidden>
References: 
 >Tracking down SIGABRTs (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: NSTableView doesn't show data until I click on a header
  • Next by Date: Re: Tracking down SIGABRTs
  • Previous by thread: Tracking down SIGABRTs
  • Next by thread: Re: Tracking down SIGABRTs
  • Index(es):
    • Date
    • Thread