[MacRuby-devel] [MacRuby] #194: NSOperation / NSOperationQueue#addOperation causes crash?
MacRuby
ruby-noreply at macosforge.org
Thu Jan 1 19:32:17 PST 2009
#194: NSOperation / NSOperationQueue#addOperation causes crash?
------------------------------------+---------------------------------------
Reporter: rebotfc@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords: NSOperation NSOperationQueue
------------------------------------+---------------------------------------
The below fails wtih a segmentation fault, not sure if it is because I am
calling in the wrong way
{{{
## Macruby test of NSOperation and NSOperationQueue
class PageLoadOp < NSOperation
def initialize
return self
end
def main
puts 'test'
end
end
## in awakeFromNib or whever
queue = NSOperationQueue.alloc.init
foobar = PageLoadOp.new
queue.addOperation(foobar)
sleep(10)
}}}
not sure if the below helps::
{{{
(gdb) thread apply all bt
Thread 11 (process 1052 thread 0x5203):
#0 0x0000000000000000 in ?? ()
Cannot access memory at address 0x0
Thread 10 (process 1052 thread 0x5103):
#0 0x0000000000000000 in ?? ()
Cannot access memory at address 0x0
Thread 9 (process 1052 thread 0x5003):
#0 0x0000000000000000 in ?? ()
Cannot access memory at address 0x0
Thread 8 (process 1052 thread 0x4f03):
#0 0x0000000000000000 in ?? ()
Cannot access memory at address 0x0
Thread 7 (process 1052 thread 0x4e03):
#0 0x0000000000000000 in ?? ()
Cannot access memory at address 0x0
Thread 6 (process 1052 thread 0x4d03):
#0 0x0000000000000000 in ?? ()
Cannot access memory at address 0x0
Thread 5 (process 1052 thread 0x4c03):
#0 0x0000000000000000 in ?? ()
Cannot access memory at address 0x0
Thread 4 (process 1052 thread 0x4b03):
#0 0x000000010010ac74 in vm_eval_body (th=0x8002a55c0) at vm.c:1214
#1 0x000000010010c41a in vm_call0 (th=0x0, klass=4385145776,
recv=34362508896, id=9320, oid=<value temporarily unavailable, due to
optimizations>, argc=0, argv=0x0, body=0x800282140, nosuper=0) at
vm_eval.c:61
#2 0x0000000100124fc4 in rb_ruby_to_objc_closure_handler_main (ctx=<value
temporarily unavailable, due to optimizations>) at objc.m:1717
#3 0x000000010012518c in rb_ruby_to_objc_closure_handler (cif=<value
temporarily unavailable, due to optimizations>, resp=<value temporarily
unavailable, due to optimizations>, args=<value temporarily unavailable,
due to optimizations>, userdata=<value temporarily unavailable, due to
optimizations>) at objc.m:1756
#4 0x00007fff80028225 in ffi_closure_unix64_inner ()
#5 0x00007fff8002760e in ffi_closure_unix64 ()
#6 0x00007fff8442156d in _pthread_wqthread ()
#7 0x00007fff84421431 in start_wqthread ()
Thread 3 (process 1052 thread 0x2c03):
#0 0x00007fff843c4d02 in __semwait_signal ()
#1 0x00007fff843ecbe9 in _pthread_cond_wait ()
#2 0x00007fff839d0081 in batchFinalizeOnTwoThreads ()
#3 0x00007fff846b1a0c in auto_collect_internal ()
#4 0x00007fff846b23b0 in auto_collection_thread ()
#5 0x00007fff843ebdcb in _pthread_start ()
#6 0x00007fff843ebc8d in thread_start ()
Thread 2 (process 1052 thread 0x2a03):
#0 0x00007fff843c4d02 in __semwait_signal ()
#1 0x00007fff8442cf27 in nanosleep ()
#2 0x0000000100115ffb in thread_timer (dummy=<value temporarily
unavailable, due to optimizations>) at thread_pthread.c:571
#3 0x00007fff843ebdcb in _pthread_start ()
#4 0x00007fff843ebc8d in thread_start ()
Thread 1 (process 1052 thread 0x10b):
#0 0x00007fff843c4d02 in __semwait_signal ()
#1 0x00007fff843ecbe9 in _pthread_cond_wait ()
#2 0x0000000100117ce3 in native_sleep (th=0x7fff7076e720,
tv=0x7fff5fbfc660) at thread_pthread.c:455
#3 0x0000000100117e99 in sleep_timeval (th=<value temporarily
unavailable, due to optimizations>, tv={tv_sec = 10, tv_usec = 0}) at
thread.c:728
#4 0x0000000100091acf in rb_f_sleep (argc=1886840608, argv=0x80000ea40)
at process.c:2940
#5 0x00000001001105b7 in vm_call_method (th=0x80000e9c0, cfp=0xc0821fdc0,
num=1, blockptr=0x0, flag=2145, id=<value temporarily unavailable, due to
optimizations>, recv=34362400768, klass=4385147136, mcache=0x800280d80) at
vm_insnhelper.c:379
#6 0x0000000100105f2f in vm_eval (th=0x80000e9c0, initial=<value
temporarily unavailable, due to optimizations>) at insns.def:1067
#7 0x000000010010aef2 in vm_eval_body (th=0x80000e9c0) at vm.c:1033
#8 0x000000010010c41a in vm_call0 (th=0x80000ea98, klass=4385147136,
recv=34362400768, id=125936, oid=<value temporarily unavailable, due to
optimizations>, argc=1606403680, argv=0x0, body=0x800282740, nosuper=0) at
vm_eval.c:61
#9 0x0000000100124fc4 in rb_ruby_to_objc_closure_handler_main (ctx=<value
temporarily unavailable, due to optimizations>) at objc.m:1717
#10 0x00000001001251b9 in rb_ruby_to_objc_closure_handler (cif=<value
temporarily unavailable, due to optimizations>, resp=<value temporarily
unavailable, due to optimizations>, args=<value temporarily unavailable,
due to optimizations>, userdata=<value temporarily unavailable, due to
optimizations>) at objc.m:1744
#11 0x00007fff80028225 in ffi_closure_unix64_inner ()
#12 0x00007fff8002760e in ffi_closure_unix64 ()
#13 0x00007fff80b521da in -[NSIBObjectData
nibInstantiateWithOwner:topLevelObjects:] ()
#14 0x00007fff80b484f9 in loadNib ()
#15 0x00007fff80b47ed9 in +[NSBundle(NSNibLoading)
_loadNibFile:nameTable:withZone:ownerBundle:] ()
#16 0x00007fff80b47ab4 in +[NSBundle(NSNibLoading) loadNibNamed:owner:] ()
#17 0x00007fff80b477e5 in NSApplicationMain ()
#18 0x00007fff8002748c in ffi_call_unix64 ()
#19 0x00007fff5fbfe220 in ?? ()
#20 0x00007fff5fbfe210 in ?? ()
#21 0x00007fff80027f13 in ffi_call ()
Cannot access memory at address 0x12
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/194>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list