Skip navigation.
 
mlMultithreading
FROM : Jason Reece
DATE : Thu Oct 31 22:19:27 2002

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_removed>
www.ideasstudio.com
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
No related mails found.