discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem allocating an NSOperationQueue


From: Lobron, David
Subject: Problem allocating an NSOperationQueue
Date: Mon, 6 Jan 2014 15:57:30 -0500
User-agent: Microsoft-MacOutlook/14.3.8.130913

Hello All,

I wrote some Objective-C code on my Mac that I am now trying to port to
Linux.  The code runs correctly on the Mac, and it compiles without a
problem on Linux.  I am using gnustep-base-1.24.0 (I know this might be
obsolete, but it's what my group is using).

I'm finding that when I try to allocate a new NSOperationQueue object, my
program hangs.  The code is simply:

NSOperationQueue *firstOpQueue = [[NSOperationQueue new] autorelease];

I tried separating the alloc and init steps, i.e.,

NSOperationQueue *firstOpQueue = [NSOperationQueue alloc];
[firstOpQueue init];

This did not make a difference: the code hung on the call to
[NSOperationQueue alloc].  I attached with gdb and printed a stack trace,
and it looks like this:

#0  0xf77b3430 in __kernel_vsyscall ()
#1  0xf6a13589 in __lll_lock_wait () from
/lib/tls/i686/cmov/libpthread.so.0
#2  0xf6a0eba6 in _L_lock_95 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0xf6a0e58a in pthread_mutex_lock () from
/lib/tls/i686/cmov/libpthread.so.0
#4  0xf69ff1a4 in __objc_mutex_lock () from /usr/lib/libobjc.so.1
#5  0xf69fe9ab in objc_mutex_lock () from /usr/lib/libobjc.so.1
#6  0xf69fe51b in objc_msg_lookup () from /usr/lib/libobjc.so.1
#7  0xf6bf72fe in -[NSRunLoop(OPENSTEP)
performSelector:target:argument:order:modes:] (self=0xa5c3b24,
_cmd=0xf6dfb0f8, aSelector=0xf6dfb0e8, target=0x1a9f2ba4,
    argument=0x0, order=0, modes=0x1a9f1704) at NSRunLoop.m:1430
#8  0xf6c29204 in -[GSRunLoopThreadInfo fire] (self=0xa5c3b84,
_cmd=0xf6e2b670) at NSThread.m:1091
#9  0xf6cb8ead in -[GSRunLoopCtxt pollUntil:within:] (self=0xa3ea764,
_cmd=0xf6def0d0, milliseconds=999, contexts=0xa5c3ae4) at
GSRunLoopCtxt.m:605
#10 0xf6bf68e2 in -[NSRunLoop acceptInputForMode:beforeDate:]
(self=0xa5c3b24, _cmd=0xf6def0f0, mode=0xf6def138, limit_date=0xa7814d4)
at NSRunLoop.m:1195
#11 0xf6bf5dd3 in -[NSRunLoop runMode:beforeDate:] (self=0xa5c3b24,
_cmd=0xf6def100, mode=0xf6def138, date=0xa7814d4) at NSRunLoop.m:1266
#12 0xf6bf5a44 in -[NSRunLoop runUntilDate:] (self=0xa5c3b24,
_cmd=0xf75ef830, date=0xa7814d4) at NSRunLoop.m:1297


Does anyone know what I might be doing wrong?  Is this is a bug in the
library?

Thank you very much in advance for any help you can provide.

Sincerely,

David Lobron




reply via email to

[Prev in Thread] Current Thread [Next in Thread]