• 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
sigbus error 10 (newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sigbus error 10 (newbie)


  • Subject: sigbus error 10 (newbie)
  • From: Daniel Child <email@hidden>
  • Date: Fri, 18 Mar 2005 15:58:35 -1000

Hi All,

Just when I thought I was getting the hang of this.... I keep getting a signal 10 or signal 11 error with the following code:

// This method takes a string representing a stroke description (e.g. "SS-EE-SE")
// and checks the knownStrokes array to find out what types of strokes this
// description may correspond to. Usually, a description may correspond to only
// one kind of stroke, but occasionally the returned set of matching types may
// have more than one members in the set.
- (NSMutableSet *)strokeTypesHavingDescription:(NSString *)d
{
int i = 0;
NSMutableSet *matchingTypes = [[NSMutableSet alloc] init];
NSString *thisDesc = [[NSString alloc] init];
NSNumber *thisType = [[NSString alloc] init];

for (i = 0; i < numInList; i++)
// Note: numInList is a member variable that counts knownStrokes
{
thisDesc = [[knownStrokes objectAtIndex: i] desc];
thisType = [[knownStrokes objectAtIndex: i] strokeType];
// printf("thisType %i thisDesc %s\n", [thisType intValue], [thisDesc cString]);
if ([thisDesc isEqualToString: d])
{
[matchingTypes addObject: thisType];
printf("types retaincount is %i\n\n", [matchingTypes retainCount]);
}
// [thisDesc release];
// [thisType release];
}
printf("matchingTypes set's retain count is %i\n", [matchingTypes retainCount]);
return matchingTypes;
}

I've been fiddling with this for ages and can't see what is wrong. I have tried it with and without the release lines, as well as with or without the alloc/init following the variable declarations.

By the way, are the signal/sigbus error numbers useful hints at what is wrong?

Thanks in advance.

Daniel
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: IB is listing non-outlets as outlets
  • Next by Date: Re: slow NSWorkspaceDidWakeNotification
  • Previous by thread: Re: IB is listing non-outlets as outlets
  • Next by thread: Re: sigbus error 10 (newbie)
  • Index(es):
    • Date
    • Thread