• 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: NSThread question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSThread question


  • Subject: Re: NSThread question
  • From: Alex Golovinsky <email@hidden>
  • Date: Tue, 10 Jul 2001 15:22:23 -0400

Hi, I had a similar situation. My function called a thread that drew to OpenGL. In my case I got the signal 10 (SIGBUS) because I allocated my graphics context in the main function and did not retain it, so that by the time my thread was called to draw, the context was already freed since the original function returned. Perhaps you have a similar problem.

hope that helped,
Alex



>>>>>>>>
I still have an error (signal 10 (SIGBUS)). I'll explain exactly what I
do:

I have a -(void)doImage; method in a custom NSView object. This is the
method I'm calling in the new Thread, and it goes like this:

-(void)doImage
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc ] init];
[ self display ];
}

the method in which I call it goes like this:

-(void) setData:(NSData *) data
{
myData = [[NSData alloc] initWithData:data];
cachedImage = nil;
[NSThread detachNewThreadSelector:@selector(doImage) toTarget:self
withObject:nil];
}


  • Prev by Date: Bug in Security Framework?
  • Next by Date: Re: getLineStart:end:contentsEnd:forRange:
  • Previous by thread: Re: NSThread question
  • Next by thread: Copy via Pasteboard
  • Index(es):
    • Date
    • Thread