Multithreading
Multithreading
- Subject: Multithreading
- From: Jason Reece <email@hidden>
- Date: Thu, 31 Oct 2002 21:19:27 +0000
Hi there,
Can someone help me please,
I want to add a thread to my application, and from the documentation, it
would appear simple. However, when I run it , the debugger crashes
straight after starting the thread.
Here's the code in the main routine (myFilename is a global which is
already defined)
- (IBAction)Analyse:(id)sender {
SpiceEngine *SpE3f4 = [[SpiceEngine alloc] init];
[NSThread detachNewThreadSelector: @selector(Spice:) toTarget:SpE3f4
withObject:(NSString *)myFilename];
}
Then in 'SpiceEngine', we have
- (void)Spice:(NSString *)myFilename
{
NSAutoreleasePool *pool;
pool = [[NSAutoreleasePool alloc] init];
[pool release];
return;
}
The debugger just gives me this:
[Switching to process 8932 thread 0x2303]
[Switching to process 8932 thread 0x2303]
Address of symbol "self" is unknown.
Address of symbol "self" is unknown.
/SourceCache/gdb/gdb-213/src/gdb/ui-out.c:148: gdb-internal-error:
pop_level: Assertion `current_level (uiout)->type == type' failed.
The Debugger has exited due to signal 6 (SIGABRT).(gdb)
Any ideas?
J. Reece
Technical & Marketing Director
The Ideas Studio
email@hidden
www.ideasstudio.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.