From ruby-noreply at macosforge.org Fri Jul 1 23:17:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 02 Jul 2011 06:17:54 -0000 Subject: [MacRuby] #1262: Rack error calling [] in Faraday via the Octokit gem In-Reply-To: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> References: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> Message-ID: <056.db890ae778459b0151f062a4734d6778@macosforge.org> #1262: Rack error calling [] in Faraday via the Octokit gem ------------------------------+--------------------------------------------- Reporter: sferik@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: github, octokit, rack, hubca , 0.11-blockerp ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * keywords: github, octokit, rack, hubcap => github, octokit, rack, hubca , 0.11-blockerp * milestone: MacRuby 0.11 => Comment: Adding 0.11-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 1 23:18:49 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 02 Jul 2011 06:18:49 -0000 Subject: [MacRuby] #1262: Rack error calling [] in Faraday via the Octokit gem In-Reply-To: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> References: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> Message-ID: <056.546f76fa9c15ff6e02733a2104e7d38c@macosforge.org> #1262: Rack error calling [] in Faraday via the Octokit gem ------------------------------+--------------------------------------------- Reporter: sferik@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: github, octokit, rack, hubcap, 0.11-blocker ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * keywords: github, octokit, rack, hubca , 0.11-blockerp => github, octokit, rack, hubcap, 0.11-blocker -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 3 19:06:06 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 02:06:06 -0000 Subject: [MacRuby] #1346: Segfault occurs when invoked a Module#attr within some threads. Message-ID: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> #1346: Segfault occurs when invoked a Module#attr within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby m1 = Module.new m2 = Module.new Thread.new { 100.times do |i| m1.instance_eval{ attr("test#{i}") } end } 100.times do |i| m2.instance_eval{ attr("test#{i}") } end }}} BackTrace: {{{ (gdb) t a a bt Thread 3 (process 18224): #0 0x0000000100164980 in rb_sym2id (sym=0) at symbol.c:198 #1 0x00000001000adb85 in rb_to_id (name=0) at string.c:6494 #2 0x0000000100052bac in rb_mod_attr_reader (klass=8590087520, sel=0x0, argc=1, argv=0x10177dd78) at object.c:2044 #3 0x0000000100052c86 in rb_mod_attr (klass=8590087520, sel=0x100fbf3a0, argc=1, argv=0x10177dd78) at object.c:2057 #4 0x000000010012e2b3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #5 0x000000010012e2b3 in rb_vm_dispatch () at dispatcher.cpp:872 #6 0x0000000101500764 in ?? () #7 0x00000001015012d0 in ?? () #8 0x0000000100135ddb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #9 0x0000000100135ddb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #10 0x0000000100135ddb in rb_vm_yield_under () at dispatcher.cpp:1321 #11 0x00000001000db958 in specific_eval (argc=0, argv=0x0, klass=8590087456, self=8590087520) at vm_eval.c:339 #12 0x00000001000dbee3 in rb_obj_instance_eval_imp (self=8590087520, sel=0x100fde130, top=8590062336, argc=0, argv=0x0) at vm_eval.c:507 #13 0x000000010012e366 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:457 #14 0x000000010012e366 in rb_vm_dispatch () at dispatcher.cpp:872 #15 0x0000000101500764 in ?? () #16 0x0000000101500fe3 in ?? () #17 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #18 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #19 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #20 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x10177f928) at vm.h:697 #21 0x00000001000db2d0 in rb_yield (val=29) at vm_eval.c:183 #22 0x000000010004d1da in int_dotimes (num=401, sel=0x100fe7350) at numeric.c:3241 #23 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #24 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #25 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #26 0x0000000101500764 in ?? () #27 0x0000000101500ca1 in ?? () #28 0x0000000100132c67 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #29 0x0000000100132c67 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #30 0x0000000100132c67 in rb_vm_block_eval (b=0x200020560, argc=0, argv=0x0) at dispatcher.cpp:1228 #31 0x000000010014d093 in rb_vm_thread_run (thread=8590066656) at vm.cpp:4856 #32 0x00007fff83cf9fd6 in _pthread_start () #33 0x00007fff83cf9e89 in thread_start () Thread 2 (process 18224): #0 0x00007fff83cdaa2a in __workq_kernreturn () #1 0x00007fff83cdae3c in _pthread_wqthread () #2 0x00007fff83cdaaa5 in start_wqthread () Thread 1 (process 18224): #0 0x00007fff83cc5762 in szone_malloc_should_clear () #1 0x00007fff83cc498a in malloc_zone_malloc () #2 0x00007fff83cc2c88 in malloc () #3 0x00007fff84c61f05 in operator new () #4 0x000000010015d185 in __gnu_cxx::new_allocator > >::allocate (this=0x102068448, __n=1) at new_allocator.h:91 #5 0x000000010015d1aa in std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_get_node (this=0x102068448) at stl_tree.h:369 #6 0x000000010015d1c6 in std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_create_node (this=0x102068448, __x=@0x7fff5fbf9d30) at stl_tree.h:378 #7 0x0000000100160066 in std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert (this=0x102068448, __x=0x0, __p=0x103604290, __v=@0x7fff5fbf9d30) at stl_tree.h:840 #8 0x000000010016015a in std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_equal (this=0x102068448, __v=@0x7fff5fbf9d30) at stl_tree.h:899 #9 0x000000010016017f in std::multimap, std::allocator > >::insert (this=0x102068448, __x=@0x7fff5fbf9d30) at stl_multimap.h:340 #10 0x000000010013c327 in RoxorCore::prepare_method (this=0x102068200, klass=0x200020520, sel=0x1036042d0, func=0x1036042f0, arity=@0x7fff5fbf9f88, flags=8) at vm.cpp:2095 #11 0x000000010014c58e in prepare_method (klass=0x200020520, dynamic_class=false, sel=0x1036042d0, data=0x1036042f0, arity=@0x7fff5fbf9f88, flags=8, precompiled=false, objc_imp_types=0x0) at vm.cpp:2203 #12 0x000000010014cbb1 in rb_vm_prepare_method (klass=0x200020520, dynamic_class=0 '\0', sel=0x1036042d0, func=0x1036042f0, arity={min = 0, max = 0, left_req = 0, real = 0}, flags=8) at vm.cpp:2276 #13 0x000000010014cd07 in rb_vm_define_attr (klass=0x200020520, name=0x200015800 "test7", read=true, write=false) at vm.cpp:2636 #14 0x00000001000d988d in rb_attr (klass=8590066976, id=12544, read=2, write=0, ex=2) at vm_method.c:136 #15 0x0000000100052bc8 in rb_mod_attr_reader (klass=8590066976, sel=0x0, argc=1, argv=0x7fff5fbfb0c8) at object.c:2044 #16 0x0000000100052c86 in rb_mod_attr (klass=8590066976, sel=0x100fbf3a0, argc=1, argv=0x7fff5fbfb0c8) at object.c:2057 #17 0x000000010012e2b3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #18 0x000000010012e2b3 in rb_vm_dispatch () at dispatcher.cpp:872 #19 0x0000000101500764 in ?? () #20 0x00000001015011c0 in ?? () #21 0x0000000100135ddb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #22 0x0000000100135ddb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #23 0x0000000100135ddb in rb_vm_yield_under () at dispatcher.cpp:1321 #24 0x00000001000db958 in specific_eval (argc=0, argv=0x0, klass=8590066912, self=8590066976) at vm_eval.c:339 #25 0x00000001000dbee3 in rb_obj_instance_eval_imp (self=8590066976, sel=0x100fde130, top=8590062336, argc=0, argv=0x0) at vm_eval.c:507 #26 0x000000010012e366 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:457 #27 0x000000010012e366 in rb_vm_dispatch () at dispatcher.cpp:872 #28 0x0000000101500764 in ?? () #29 0x0000000101500de3 in ?? () #30 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #31 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #32 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #33 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x7fff5fbfcc78) at vm.h:697 #34 0x00000001000db2d0 in rb_yield (val=29) at vm_eval.c:183 #35 0x000000010004d1da in int_dotimes (num=401, sel=0x100fe7350) at numeric.c:3241 #36 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #37 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #38 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #39 0x0000000101500764 in ?? () #40 0x000000010150027b in ?? () #41 0x000000010014a072 in rb_vm_run (fname=0x2000a8cc0 "/Users/watson/tmp/t.rb", node=0x200024fe0, binding=0x0, inside_eval=false) at vm.cpp:4115 #42 0x000000010002898b in ruby_run_node (n=0x200024fe0) at eval.c:211 #43 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfde58) at main.cpp:40 (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 3 20:13:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 03:13:48 -0000 Subject: [MacRuby] #1347: Segfault occurs when invoked a Module#define_method within some threads. Message-ID: <051.e5a764ce316dad3f78892add56b4cfe4@macosforge.org> #1347: Segfault occurs when invoked a Module#define_method within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby m1 = Module.new m2 = Module.new Thread.new { 100.times do |i| m1.instance_eval{ define_method("m1#{i}", Proc.new{}) } end } 100.times do |i| m2.instance_eval{ define_method("m2#{i}", Proc.new{}) } end }}} BackTrace: {{{ (gdb) t a a bt Thread 4 (process 19426): #0 0x0000000000000000 in ?? () Thread 3 (process 19426): #0 0x00007fff83cc7116 in free () #1 0x00000001009084d2 in std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::erase () at StringRef.h:59 #2 0x0000000100903e1b in llvm::PMDataManager::freePass () at StringRef.h:59 #3 0x000000010090449c in llvm::PMDataManager::removeDeadPasses () at StringRef.h:59 #4 0x0000000100904e3d in llvm::FPPassManager::runOnFunction () at StringRef.h:59 #5 0x000000010090513c in llvm::FunctionPassManagerImpl::run () at StringRef.h:59 #6 0x0000000100905429 in llvm::FunctionPassManager::run () at StringRef.h:59 #7 0x0000000100142761 in RoxorCore::optimize (this=0x102068200, func=0x10360c2f0) at vm.cpp:554 #8 0x00000001001427da in RoxorCore::compile (this=0x102068200, func=0x10360c2f0, run_optimize=true) at vm.cpp:591 #9 0x0000000100146054 in rb_vm_define_method3 (klass=0x200020760, mid=13008, block=0x2000b9a60) at vm.cpp:2738 #10 0x0000000100033109 in rb_mod_define_method (mod=8590067552, sel=0x101150790, argc=2, argv=0x10177dd58) at proc.c:1025 #11 0x000000010012e2b3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #12 0x000000010012e2b3 in rb_vm_dispatch () at dispatcher.cpp:872 #13 0x0000000101500764 in ?? () #14 0x0000000101501469 in ?? () #15 0x0000000100135ddb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #16 0x0000000100135ddb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #17 0x0000000100135ddb in rb_vm_yield_under () at dispatcher.cpp:1321 #18 0x00000001000db958 in specific_eval (argc=0, argv=0x0, klass=8590067488, self=8590067552) at vm_eval.c:339 #19 0x00000001000dbee3 in rb_obj_instance_eval_imp (self=8590067552, sel=0x100fde130, top=8590062336, argc=0, argv=0x0) at vm_eval.c:507 #20 0x000000010012e366 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:457 #21 0x000000010012e366 in rb_vm_dispatch () at dispatcher.cpp:872 #22 0x0000000101500764 in ?? () #23 0x0000000101500fe3 in ?? () #24 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #25 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #26 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #27 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x10177f928) at vm.h:697 #28 0x00000001000db2d0 in rb_yield (val=141) at vm_eval.c:183 #29 0x000000010004d1da in int_dotimes (num=401, sel=0x100fe7350) at numeric.c:3241 #30 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #31 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #32 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #33 0x0000000101500764 in ?? () #34 0x0000000101500ca1 in ?? () #35 0x0000000100132c67 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #36 0x0000000100132c67 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #37 0x0000000100132c67 in rb_vm_block_eval (b=0x200020ba0, argc=0, argv=0x0) at dispatcher.cpp:1228 #38 0x000000010014d093 in rb_vm_thread_run (thread=8590068192) at vm.cpp:4856 #39 0x00007fff83cf9fd6 in _pthread_start () #40 0x00007fff83cf9e89 in thread_start () Thread 2 (process 19426): #0 0x00007fff833eeac0 in Auto::visitAllocatedBlocks () #1 0x00007fff833ed944 in Auto::MemoryScanner::scan_retained_and_old_blocks () #2 0x00007fff833e8a47 in Auto::Collector::check_roots () #3 0x00007fff833ed8b1 in Auto::MemoryScanner::scan () #4 0x00007fff833e277d in Auto::Zone::collect () #5 0x00007fff833cba7e in auto_collect_internal () #6 0x00007fff833cc0bd in auto_collection_work () #7 0x00007fff83cfcd64 in _dispatch_call_block_and_release () #8 0x00007fff83cdb8d2 in _dispatch_queue_drain () #9 0x00007fff83cdb734 in _dispatch_queue_invoke () #10 0x00007fff83cdb2de in _dispatch_worker_thread2 () #11 0x00007fff83cdac08 in _pthread_wqthread () #12 0x00007fff83cdaaa5 in start_wqthread () Thread 1 (process 19426): #0 0x00000001006e1299 in llvm::InstCombiner::DoOneIteration () at StringRef.h:59 #1 0x00000001006e29a3 in llvm::InstCombiner::runOnFunction () at StringRef.h:59 #2 0x0000000100904fa0 in llvm::FPPassManager::runOnFunction () at StringRef.h:59 #3 0x000000010090513c in llvm::FunctionPassManagerImpl::run () at StringRef.h:59 #4 0x0000000100905429 in llvm::FunctionPassManager::run () at StringRef.h:59 #5 0x0000000100142761 in RoxorCore::optimize (this=0x102068200, func=0x104835470) at vm.cpp:554 #6 0x00000001001427da in RoxorCore::compile (this=0x102068200, func=0x104835470, run_optimize=true) at vm.cpp:591 #7 0x0000000100146054 in rb_vm_define_method3 (klass=0x200020b20, mid=13000, block=0x2000b99e0) at vm.cpp:2738 #8 0x0000000100033109 in rb_mod_define_method (mod=8590068512, sel=0x101150790, argc=2, argv=0x7fff5fbfb0a8) at proc.c:1025 #9 0x000000010012e2b3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #10 0x000000010012e2b3 in rb_vm_dispatch () at dispatcher.cpp:872 #11 0x0000000101500764 in ?? () #12 0x0000000101501289 in ?? () #13 0x0000000100135ddb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #14 0x0000000100135ddb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #15 0x0000000100135ddb in rb_vm_yield_under () at dispatcher.cpp:1321 #16 0x00000001000db958 in specific_eval (argc=0, argv=0x0, klass=8590068448, self=8590068512) at vm_eval.c:339 #17 0x00000001000dbee3 in rb_obj_instance_eval_imp (self=8590068512, sel=0x100fde130, top=8590062336, argc=0, argv=0x0) at vm_eval.c:507 #18 0x000000010012e366 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:457 #19 0x000000010012e366 in rb_vm_dispatch () at dispatcher.cpp:872 #20 0x0000000101500764 in ?? () #21 0x0000000101500de3 in ?? () #22 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #23 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #24 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #25 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x7fff5fbfcc78) at vm.h:697 #26 0x00000001000db2d0 in rb_yield (val=141) at vm_eval.c:183 #27 0x000000010004d1da in int_dotimes (num=401, sel=0x100fe7350) at numeric.c:3241 #28 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #29 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #30 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #31 0x0000000101500764 in ?? () #32 0x000000010150027b in ?? () #33 0x000000010014a072 in rb_vm_run (fname=0x2000a8cc0 "/Users/watson/tmp/tt.rb", node=0x2000255e0, binding=0x0, inside_eval=false) at vm.cpp:4115 #34 0x000000010002898b in ruby_run_node (n=0x2000255e0) at eval.c:211 #35 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfde58) at main.cpp:40 (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 3 22:39:16 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 05:39:16 -0000 Subject: [MacRuby] #1348: Abort occurs when load a framework and invoke a Module#define_method in another thread. Message-ID: <051.4935860b2a4684603e40ecc9a260df31@macosforge.org> #1348: Abort occurs when load a framework and invoke a Module#define_method in another thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- {{{ #!ruby m1 = Module.new Thread.new { 1000.times do |i| m1.instance_eval{ define_method("m1#{i}", Proc.new{}) } end } framework 'Foundation' }}} {{{ $ DYLD_LIBRARY_PATH=. ./macruby ~/tmp/t.rb unknown: [BUG] destination 0x2000e5b98 isn't in the auto zone MacRuby 0.11 (ruby 1.9.2) [universal-darwin10.0, x86_64] zsh: abort DYLD_LIBRARY_PATH=. ./macruby ~/tmp/tttt.rb }}} BackTrace: {{{ (gdb) t a a bt Thread 7 (process 22918): #0 0x00007fff83cdaa2a in __workq_kernreturn () #1 0x00007fff83cdae3c in _pthread_wqthread () #2 0x00007fff83cdaaa5 in start_wqthread () Thread 6 (process 22918): #0 0x00007fff83cdaa2a in __workq_kernreturn () #1 0x00007fff83cdae3c in _pthread_wqthread () #2 0x00007fff83cdaaa5 in start_wqthread () Thread 5 (process 22918): #0 0x00007fff83cdaa2a in __workq_kernreturn () #1 0x00007fff83cdae3c in _pthread_wqthread () #2 0x00007fff83cdaaa5 in start_wqthread () Thread 4 (process 22918): #0 0x00007fff83cd9c0a in kevent () #1 0x00007fff83cdbadd in _dispatch_mgr_invoke () #2 0x00007fff83cdb7b4 in _dispatch_queue_invoke () #3 0x00007fff83cdb2de in _dispatch_worker_thread2 () #4 0x00007fff83cdac08 in _pthread_wqthread () #5 0x00007fff83cdaaa5 in start_wqthread () Thread 3 (process 22918): #0 0x00007fff83d9c9da in __pthread_kill () #1 0x00007fff83d9c2fe in pthread_kill () #2 0x0000000100973276 in abort () #3 0x0000000100024d8e in rb_bug (fmt=Could not find the frame base for "rb_bug". ) at error.c:226 #4 0x000000010013d99d in rb_vm_add_lvar_use (var_uses=0x7fff5fbfdc98, use=0x2000dd100, use_type=1 '\001') at vm.cpp:3083 #5 0x000000010013da5e in rb_vm_add_block_lvar_use (block=0x2000dd100) at vm.cpp:3097 #6 0x0000000100031cda in rb_vm_block_make_detachable_proc (b=0x2000dd100) at vm.h:464 #7 0x0000000100031c8c in rb_proc_alloc_with_block (klass=8590542848, proc=0x2000dd100) at proc.c:51 #8 0x000000010003245e in proc_new (klass=8590542848, is_lambda=false) at proc.c:309 #9 0x0000000100032485 in rb_proc_s_new (klass=8590542848, sel=0x7fff880b1e60, argc=0, argv=0x0) at proc.c:332 #10 0x000000010012e2b3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #11 0x000000010012e2b3 in rb_vm_dispatch () at dispatcher.cpp:872 #12 0x0000000101600664 in ?? () #13 0x0000000101600f3b in ?? () #14 0x0000000100135ddb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #15 0x0000000100135ddb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #16 0x0000000100135ddb in rb_vm_yield_under () at dispatcher.cpp:1321 #17 0x00000001000db958 in specific_eval (argc=0, argv=0x0, klass=8590086048, self=8590086112) at vm_eval.c:339 #18 0x00000001000dbee3 in rb_obj_instance_eval_imp (self=8590086112, sel=0x100fde130, top=8590062336, argc=0, argv=0x0) at vm_eval.c:507 #19 0x000000010012e366 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:457 #20 0x000000010012e366 in rb_vm_dispatch () at dispatcher.cpp:872 #21 0x0000000101600664 in ?? () #22 0x0000000101600ce3 in ?? () #23 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #24 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #25 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #26 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x10171f928) at vm.h:697 #27 0x00000001000db2d0 in rb_yield (val=565) at vm_eval.c:183 #28 0x000000010004d1da in int_dotimes (num=4001, sel=0x100fe7350) at numeric.c:3241 #29 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #30 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #31 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #32 0x0000000101600664 in ?? () #33 0x0000000101600ba1 in ?? () #34 0x0000000100132c67 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #35 0x0000000100132c67 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #36 0x0000000100132c67 in rb_vm_block_eval (b=0x2000250a0, argc=0, argv=0x0) at dispatcher.cpp:1228 #37 0x000000010014d0ab in rb_vm_thread_run (thread=8590085792) at vm.cpp:4858 #38 0x00007fff83cf9fd6 in _pthread_start () #39 0x00007fff83cf9e89 in thread_start () Thread 2 (process 22918): #0 0x00007fff83cdaa2a in __workq_kernreturn () #1 0x00007fff83cdae3c in _pthread_wqthread () #2 0x00007fff83cdaaa5 in start_wqthread () Thread 1 (process 22918): #0 0x00007fff842db6d7 in xmlTextReaderGetAttribute () #1 0x00007fff842dd745 in xmlTextReaderRead () #2 0x00000001000c9cd6 in bs_parser_parse (parser=0x10142cd50, path=0x7fff5fbfb350 "/System/Library/Frameworks/CoreFoundation.framework/Resources/BridgeSupport/CoreFoundation.bridgesupport", framework_path=0x101430910 "/System/Library/Frameworks/CoreFoundation.framework", options=BS_PARSE_OPTIONS_LOAD_DYLIBS, callback=0x1000e5c17 <__bs_parse_cb(_bs_parser*, char const*, bs_element_type_t, void*, void*) at bridgesupport.cpp:1084>, context=0x2000163a0, error=0x7fff5fbfc7b8) at bs.c:542 #3 0x00000001000ca1c7 in bs_parser_parse (parser=0x10142cd50, path=0x7fff5fbfc820 "/System/Library/Frameworks/Foundation.framework/Resources/BridgeSupport/Foundation.bridgesupport", framework_path=0x200021360 "/System/Library/Frameworks/Foundation.framework", options=BS_PARSE_OPTIONS_LOAD_DYLIBS, callback=0x1000e5c17 <__bs_parse_cb(_bs_parser*, char const*, bs_element_type_t, void*, void*) at bridgesupport.cpp:1084>, context=0x2000163a0, error=0x7fff5fbfc7b8) at bs.c:611 #4 0x00000001000e0d10 in RoxorCore::load_bridge_support (this=0x102068200, path=0x7fff5fbfc820 "/System/Library/Frameworks/Foundation.framework/Resources/BridgeSupport/Foundation.bridgesupport", framework_path=0x200021360 "/System/Library/Frameworks/Foundation.framework", options=1) at bridgesupport.cpp:1356 #5 0x00000001000e0d6c in rb_vm_load_bridge_support (path=0x7fff5fbfc820 "/System/Library/Frameworks/Foundation.framework/Resources/BridgeSupport/Foundation.bridgesupport", framework_path=0x200021360 "/System/Library/Frameworks/Foundation.framework", options=1) at bridgesupport.cpp:1337 #6 0x00000001000c5bdd in rb_objc_search_and_load_bridge_support (framework_path=0x200021360 "/System/Library/Frameworks/Foundation.framework") at objc.m:232 #7 0x00000001000c622a in rb_require_framework (recv=8590062336, sel=0x10114c540, argc=1, argv=0x7fff5fbfdca8) at objc.m:362 #8 0x000000010012e2b3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #9 0x000000010012e2b3 in rb_vm_dispatch () at dispatcher.cpp:872 #10 0x0000000101600664 in ?? () #11 0x00000001016001bd in ?? () #12 0x000000010014a08a in rb_vm_run (fname=0x2000a8cc0 "/Users/watson/tmp/tttt.rb", node=0x200024c60, binding=0x0, inside_eval=false) at vm.cpp:4117 #13 0x000000010002898b in ruby_run_node (n=0x200024c60) at eval.c:211 #14 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfde58) at main.cpp:40 (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 3 23:09:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 06:09:57 -0000 Subject: [MacRuby] #1348: Abort occurs when invoke a Module#define_method many times in non-MainThread. (was: Abort occurs when load a framework and invoke a Module#define_method in another thread.) In-Reply-To: <051.4935860b2a4684603e40ecc9a260df31@macosforge.org> References: <051.4935860b2a4684603e40ecc9a260df31@macosforge.org> Message-ID: <060.c79fd08c727af145446878d2c0b29774@macosforge.org> #1348: Abort occurs when invoke a Module#define_method many times in non- MainThread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): Sorry, it seems that load of framework is not related. Abort does not occur when invoke in MainThread. {{{ m1 = Module.new 1000.times do |i| m1.instance_eval{ define_method("m1#{i}", Proc.new{}) } end puts :ok }}} {{{ $ DYLD_LIBRARY_PATH=. ./macruby ~/tmp/t1.rb ok }}} but, in non-MainThread, {{{ m1 = Module.new Thread.new { 1000.times do |i| m1.instance_eval{ define_method("m1#{i}", Proc.new{}) } end }.join puts :ok }}} {{{ DYLD_LIBRARY_PATH=. ./macruby ~/tmp/t2.rb unknown: [BUG] destination 0x2000c6c78 isn't in the auto zone MacRuby 0.11 (ruby 1.9.2) [universal-darwin10.0, x86_64] zsh: abort DYLD_LIBRARY_PATH=. ./macruby ~/tmp/t2.rb }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 4 00:01:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 07:01:34 -0000 Subject: [MacRuby] #1349: Segfault occurs when invoked String#to_sym and Proc.new in some threads Message-ID: <051.ac75b2be208208990c5e7dd5dc46ec33@macosforge.org> #1349: Segfault occurs when invoked String#to_sym and Proc.new in some threads ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby Thread.new { 10000.times do |i| "test#{i}".to_sym end } 10000.times do |i| Proc.new{puts i} end }}} BackTrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00007fff83cc3c00 in strlen () (gdb) bt #0 0x00007fff83cc3c00 in strlen () #1 0x000000010012d622 in rb_vm_dispatch () at dispatcher.cpp:698 #2 0x00000001000d9dc9 in rb_vm_call0 (vm=0x100f231c0, top=0, self=8590528320, klass=0x200094800, sel=0x0, block=0x0, opt=2 '\002', argc=0, argv=0x0) at vm.h:654 #3 0x00000001000daeee in rb_vm_call2 (block=0x0, self=8590528320, klass=8590542848, sel=0x0, argc=0, argv=0x0) at vm.h:679 #4 0x00000001000dad8e in rb_call (recv=8590528320, mid=8160, argc=0, argv=0x0, scope=1, pass_current_block=false) at vm_eval.c:32 #5 0x00000001000db162 in rb_funcall2 (recv=8590528320, mid=8160, argc=0, argv=0x0) at vm_eval.c:112 #6 0x00000001000292c2 in rb_obj_call_init (obj=8590528320, argc=0, argv=0x0) at eval.c:589 #7 0x0000000100032499 in rb_proc_s_new (klass=8590542848, sel=0x7fff880b1e60, argc=0, argv=0x0) at proc.c:334 #8 0x000000010012e2b3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #9 0x000000010012e2b3 in rb_vm_dispatch () at dispatcher.cpp:872 #10 0x00000001016004f4 in ?? () #11 0x0000000101600b48 in ?? () #12 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #13 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #14 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #15 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x7fff5fbfccb8) at vm.h:697 #16 0x00000001000db2d0 in rb_yield (val=1385) at vm_eval.c:183 #17 0x000000010004d1da in int_dotimes (num=40001, sel=0x100fe7350) at numeric.c:3241 #18 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #19 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #20 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #21 0x00000001016004f4 in ?? () #22 0x000000010160012a in ?? () #23 0x000000010014a072 in rb_vm_run (fname=0x2000a7340 "/Users/watson/tmp/t.rb", node=0x2000249e0, binding=0x0, inside_eval=false) at vm.cpp:4115 #24 0x000000010002898b in ruby_run_node (n=0x2000249e0) at eval.c:211 #25 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfde58) at main.cpp:40 (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 4 01:06:52 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 08:06:52 -0000 Subject: [MacRuby] #1350: Segfault occurs when invoked an alias within some threads Message-ID: <051.9eb8b15b9a77edc259296891dcb78147@macosforge.org> #1350: Segfault occurs when invoked an alias within some threads ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby class Foo def bar(str) puts str end end f1 = Foo.new f2 = f1.clone th = Thread.new { 1000.times do |i| f1.instance_eval{ alias :"f1_#{i}" :bar } end } 1000.times do |i| f2.instance_eval{ alias :"f2_#{i}" :bar } end th.join f1.f1_99 "f1" f2.f2_10 "f2" }}} BackTrace 1: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00007fff83cc3c00 in strlen () (gdb) bt #0 0x00007fff83cc3c00 in strlen () #1 0x000000010014714b in vm_alias (outer=8590023776, name=13096, def=12368) at vm.cpp:1575 #2 0x000000010014760e in rb_vm_alias2 (outer=8590023776, name=8590664256, def=8590082816, dynamic_class=1 '\001') at vm.cpp:1614 #3 0x0000000101601689 in ?? () #4 0x0000000100135ddb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #5 0x0000000100135ddb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #6 0x0000000100135ddb in rb_vm_yield_under () at dispatcher.cpp:1321 #7 0x00000001000db958 in specific_eval (argc=0, argv=0x0, klass=8590023776, self=8590023136) at vm_eval.c:339 #8 0x00000001000dbee3 in rb_obj_instance_eval_imp (self=8590023136, sel=0x100fde130, top=8590062336, argc=0, argv=0x0) at vm_eval.c:507 #9 0x000000010012e366 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:457 #10 0x000000010012e366 in rb_vm_dispatch () at dispatcher.cpp:872 #11 0x0000000101600984 in ?? () #12 0x00000001016012b3 in ?? () #13 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #14 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #15 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #16 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x7fff5fbfcc48) at vm.h:697 #17 0x00000001000db2d0 in rb_yield (val=141) at vm_eval.c:183 #18 0x000000010004d1da in int_dotimes (num=4001, sel=0x100fe7350) at numeric.c:3241 #19 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #20 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #21 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #22 0x0000000101600984 in ?? () #23 0x000000010160039d in ?? () #24 0x000000010014a072 in rb_vm_run (fname=0x2000a7bc0 "/Users/watson/tmp/t.rb", node=0x2000154a0, binding=0x0, inside_eval=false) at vm.cpp:4115 #25 0x000000010002898b in ruby_run_node (n=0x2000154a0) at eval.c:211 #26 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfde58) at main.cpp:40 (gdb) }}} BackTrace 2: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 [Switching to process 24189 thread 0x1707] 0x0000000101600906 in ?? () (gdb) bt #0 0x0000000101600906 in ?? () #1 0x00000001016014b3 in ?? () #2 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #3 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #4 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #5 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x10171f928) at vm.h:697 #6 0x00000001000db2d0 in rb_yield (val=49) at vm_eval.c:183 #7 0x000000010004d1da in int_dotimes (num=4001, sel=0x100fe7350) at numeric.c:3241 #8 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #9 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #10 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #11 0x0000000101600984 in ?? () #12 0x0000000101601171 in ?? () #13 0x0000000100132c67 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #14 0x0000000100132c67 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #15 0x0000000100132c67 in rb_vm_block_eval (b=0x200015220, argc=0, argv=0x0) at dispatcher.cpp:1228 #16 0x000000010014d093 in rb_vm_thread_run (thread=8590021024) at vm.cpp:4856 #17 0x00007fff83cf9fd6 in _pthread_start () #18 0x00007fff83cf9e89 in thread_start () (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 4 05:04:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 12:04:27 -0000 Subject: [MacRuby] #1351: macrake problem Message-ID: <052.f7ccb5f82e51f0213e4005d05e063d39@macosforge.org> #1351: macrake problem -----------------------------------+---------------------------------------- Reporter: stephenng08@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- '''I hope this is the right forum for this. Just starting to find out a little about MacRuby, so I followed instructions in tutorial for Hotcocoa. The generated files do not compile and I got the following errors - macrake -v (in /Users/sng/Development/Ruby-stuff/realhotcocoa/Postie) ld: warning: ignoring file /Library/Frameworks//MacRuby.framework/MacRuby, file was built for unsupported file format which is not the architecture being linked (i386) Undefined symbols for architecture i386: "_macruby_main", referenced from: _main in ccQRStdg.o ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/Ya/Ya1rFKSnEcyo6hMm5aLpfE+++TM/-Tmp-//ccIHKiOU.out (No such file or directory) /bin/sh: ./Postie.app/Contents/MacOS/Postie: No such file or directory One thing I did find strange in the error message is the "//" in the filenames (see the ld: warning: and lipo: lines above). Something wrong with my environment variables? Any help with this will be appreciated. Thanks. Regards, Stephen ''' -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 4 06:34:17 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 13:34:17 -0000 Subject: [MacRuby] #1351: macrake problem In-Reply-To: <052.f7ccb5f82e51f0213e4005d05e063d39@macosforge.org> References: <052.f7ccb5f82e51f0213e4005d05e063d39@macosforge.org> Message-ID: <061.f2253b356eedd67c447baf560893c93b@macosforge.org> #1351: macrake problem -----------------------------------+---------------------------------------- Reporter: stephenng08@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: | -----------------------------------+---------------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => invalid Comment: This is a problem of hotcocoa, is not macrake. Please see https://github.com/richkilmer/hotcocoa/pull/18 or With https://github.com/ferrous26/hotcocoa , this problem would have been resolved :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 4 07:33:56 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 14:33:56 -0000 Subject: [MacRuby] #1352: Segfault occurs when invoked the Module#{class_variable_set, class_variable_get} within some threads. Message-ID: <051.6d320eb1d43f64d17a72637cc3bce2ea@macosforge.org> #1352: Segfault occurs when invoked the Module#{class_variable_set, class_variable_get} within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby m = Module.new th = Thread.new { 1000.times do |i| m.class_variable_set(:"@@foo_#{i}", i) end } 1000.times do |i| begin m.class_variable_get(:"@@foo_#{i}") rescue end end th.join }}} BackTrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00007fff83cc3c00 in strlen () (gdb) t a a bt Thread 3 (process 25594): #0 0x00000001000ad36e in rb_str_intern_fast (str=0) at string.c:6298 #1 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #2 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #3 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #4 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x10177f928) at vm.h:697 #5 0x00000001000db2d0 in rb_yield (val=489) at vm_eval.c:183 #6 0x000000010004d1da in int_dotimes (num=4001, sel=0x100fe7350) at numeric.c:3241 #7 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #8 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #9 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #10 0x0000000101500744 in ?? () #11 0x0000000101500c81 in ?? () #12 0x0000000100132c67 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #13 0x0000000100132c67 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #14 0x0000000100132c67 in rb_vm_block_eval (b=0x200020960, argc=0, argv=0x0) at dispatcher.cpp:1228 #15 0x000000010014d093 in rb_vm_thread_run (thread=8590067680) at vm.cpp:4856 #16 0x00007fff83cf9fd6 in _pthread_start () #17 0x00007fff83cf9e89 in thread_start () Current language: auto; currently c Thread 2 (process 25594): #0 0x00007fff833ee528 in Auto::visitAllocatedBlocks () #1 0x00007fff833ed944 in Auto::MemoryScanner::scan_retained_and_old_blocks () #2 0x00007fff833e8a47 in Auto::Collector::check_roots () #3 0x00007fff833ed8b1 in Auto::MemoryScanner::scan () #4 0x00007fff833e277d in Auto::Zone::collect () #5 0x00007fff833cba7e in auto_collect_internal () #6 0x00007fff833cc0bd in auto_collection_work () #7 0x00007fff83cfcd64 in _dispatch_call_block_and_release () #8 0x00007fff83cdb8d2 in _dispatch_queue_drain () #9 0x00007fff83cdb734 in _dispatch_queue_invoke () #10 0x00007fff83cdb2de in _dispatch_worker_thread2 () #11 0x00007fff83cdac08 in _pthread_wqthread () #12 0x00007fff83cdaaa5 in start_wqthread () Thread 1 (process 25594): #0 0x00007fff83cc3c00 in strlen () #1 0x000000010012d622 in rb_vm_dispatch () at dispatcher.cpp:698 #2 0x00000001000d9dc9 in rb_vm_call0 (vm=0x100f231c0, top=0, self=8590682912, klass=0x200037b60, sel=0x0, block=0x0, opt=2 '\002', argc=0, argv=0x0) at vm.h:654 #3 0x00000001000daeee in rb_vm_call2 (block=0x0, self=8590682912, klass=8590162784, sel=0x0, argc=0, argv=0x0) at vm.h:679 #4 0x00000001000dad8e in rb_call (recv=8590682912, mid=11488, argc=0, argv=0x0, scope=1, pass_current_block=false) at vm_eval.c:32 #5 0x00000001000db111 in rb_funcall (recv=8590682912, mid=11488, n=0) at vm_eval.c:106 #6 0x0000000100025490 in exc_message (exc=8590682912, sel=0x7fff880df27c) at error.c:455 #7 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #8 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #9 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #10 0x0000000100025926 in rb_vm_call0 (vm=0x100f231c0, top=0, self=8590682912, klass=0x200037b60, sel=0x7fff880df27c, block=0x0, opt=2 '\002', argc=0, argv=0x0) at vm.h:654 #11 0x000000010002585f in rb_vm_call (self=8590682912, sel=0x7fff880df27c, argc=0, argv=0x0) at vm.h:661 #12 0x00000001000277ed in format_message (exc=8590682912) at error.c:1274 #13 0x0000000100139e2a in rb_ensure () at vm.cpp:3695 #14 0x00000001000279a8 in rb_format_exception_message (exc=8590682912) at error.c:1314 #15 0x00000001000c6925 in rb_rb2oc_exception (exc=8590682912) at objc.m:504 #16 0x0000000100148868 in __vm_raise () at vm.cpp:3561 #17 0x00000001001489fa in rb_vm_raise (exception=8590682912) at vm.cpp:3639 #18 0x0000000100028bc3 in rb_exc_raise (mesg=8590682912) at eval.c:290 #19 0x0000000100025c39 in rb_name_error (id=Could not find the frame base for "rb_name_error". ) at error.c:670 #20 0x00000001000c10da in rb_cvar_get3 (klass=0, id=13110, check=true, defined=false) at variable.c:1827 #21 0x00000001000c112e in rb_cvar_get2 (klass=8590068000, id=13110, check=true) at variable.c:1838 #22 0x00000001000c1152 in rb_cvar_get (klass=8590068000, id=13110) at variable.c:1844 #23 0x00000001000532ce in rb_mod_cvar_get (obj=8590068000, sel=0x100fc15d0, iv=8590682944) at object.c:2418 #24 0x000000010012e8e6 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:161 #25 0x000000010012e8e6 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #26 0x000000010012e8e6 in rb_vm_dispatch () at dispatcher.cpp:872 #27 0x0000000101500744 in ?? () #28 0x0000000101500db2 in ?? () #29 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #30 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #31 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #32 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x7fff5fbfcc78) at vm.h:697 #33 0x00000001000db2d0 in rb_yield (val=117) at vm_eval.c:183 #34 0x000000010004d1da in int_dotimes (num=4001, sel=0x100fe7350) at numeric.c:3241 #35 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #36 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #37 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #38 0x0000000101500744 in ?? () #39 0x0000000101500224 in ?? () #40 0x000000010014a072 in rb_vm_run (fname=0x2000a74c0 "/Users/watson/tmp/t.rb", node=0x2000252a0, binding=0x0, inside_eval=false) at vm.cpp:4115 #41 0x000000010002898b in ruby_run_node (n=0x2000252a0) at eval.c:211 #42 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfde58) at main.cpp:40 (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 4 07:42:23 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 04 Jul 2011 14:42:23 -0000 Subject: [MacRuby] #1353: Segfault occurs when invoked the Module#{const_set, const_get} within some threads. Message-ID: <051.19866f6cb62046f4a72f2c01e59801d8@macosforge.org> #1353: Segfault occurs when invoked the Module#{const_set, const_get} within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Maybe, I guess that this problem is similar with #1352. Test Script: {{{ #!ruby m = Module.new th = Thread.new { 1000.times do |i| m.const_set("M1#{i}", i) end } 1000.times do |i| begin m.const_get("M1#{i}") rescue end end th.join }}} BackTrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00007fff83cc3c00 in strlen () (gdb) t a a bt Thread 3 (process 25779): #0 0x00000001000beccb in generic_ivar_dict (obj=8590087968, create=false) at variable.c:824 #1 0x00000001000bf0c2 in rb_class_ivar_dict (mod=8590088032) at variable.c:940 #2 0x00000001000bf0f8 in rb_class_ivar_dict_or_create (mod=8590088032) at variable.c:954 #3 0x00000001000c0e01 in mod_av_set (klass=8590088032, id=13485, val=509, isconst=2) at variable.c:1735 #4 0x00000001000c0ed6 in rb_const_set (klass=8590088032, id=13485, val=509) at variable.c:1760 #5 0x0000000100052e86 in rb_mod_const_set (mod=8590088032, sel=0x100fc1150, name=8590703360, value=509) at object.c:2153 #6 0x000000010012e927 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:163 #7 0x000000010012e927 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #8 0x000000010012e927 in rb_vm_dispatch () at dispatcher.cpp:872 #9 0x0000000101500744 in ?? () #10 0x0000000101500f55 in ?? () #11 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #12 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #13 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #14 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x10177f928) at vm.h:697 #15 0x00000001000db2d0 in rb_yield (val=509) at vm_eval.c:183 #16 0x000000010004d1da in int_dotimes (num=4001, sel=0x100fe7360) at numeric.c:3241 #17 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #18 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #19 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #20 0x0000000101500744 in ?? () #21 0x0000000101500c81 in ?? () #22 0x0000000100132c67 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #23 0x0000000100132c67 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #24 0x0000000100132c67 in rb_vm_block_eval (b=0x200020960, argc=0, argv=0x0) at dispatcher.cpp:1228 #25 0x000000010014d093 in rb_vm_thread_run (thread=8590067808) at vm.cpp:4856 #26 0x00007fff83cf9fd6 in _pthread_start () #27 0x00007fff83cf9e89 in thread_start () Current language: auto; currently c Thread 2 (process 25779): #0 0x00007fff833da477 in Auto::WriteBarrier::range_has_marked_cards () #1 0x00007fff833ee9b4 in Auto::visitAllocatedBlocks () #2 0x00007fff833ed944 in Auto::MemoryScanner::scan_retained_and_old_blocks () #3 0x00007fff833e8a47 in Auto::Collector::check_roots () #4 0x00007fff833ed8b1 in Auto::MemoryScanner::scan () #5 0x00007fff833e277d in Auto::Zone::collect () #6 0x00007fff833cba7e in auto_collect_internal () #7 0x00007fff833cc0bd in auto_collection_work () #8 0x00007fff83cfcd64 in _dispatch_call_block_and_release () #9 0x00007fff83cdb8d2 in _dispatch_queue_drain () #10 0x00007fff83cdb734 in _dispatch_queue_invoke () #11 0x00007fff83cdb2de in _dispatch_worker_thread2 () #12 0x00007fff83cdac08 in _pthread_wqthread () #13 0x00007fff83cdaaa5 in start_wqthread () Thread 1 (process 25779): #0 0x00007fff83cc3c00 in strlen () #1 0x000000010012d622 in rb_vm_dispatch () at dispatcher.cpp:698 #2 0x00000001000d9dc9 in rb_vm_call0 (vm=0x100f231d0, top=0, self=8590687424, klass=0x200037b60, sel=0x0, block=0x0, opt=2 '\002', argc=0, argv=0x0) at vm.h:654 #3 0x00000001000daeee in rb_vm_call2 (block=0x0, self=8590687424, klass=8590162784, sel=0x0, argc=0, argv=0x0) at vm.h:679 #4 0x00000001000dad8e in rb_call (recv=8590687424, mid=11488, argc=0, argv=0x0, scope=1, pass_current_block=false) at vm_eval.c:32 #5 0x00000001000db111 in rb_funcall (recv=8590687424, mid=11488, n=0) at vm_eval.c:106 #6 0x0000000100025490 in exc_message (exc=8590687424, sel=0x7fff880df27c) at error.c:455 #7 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #8 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #9 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #10 0x0000000100025926 in rb_vm_call0 (vm=0x100f231d0, top=0, self=8590687424, klass=0x200037b60, sel=0x7fff880df27c, block=0x0, opt=2 '\002', argc=0, argv=0x0) at vm.h:654 #11 0x000000010002585f in rb_vm_call (self=8590687424, sel=0x7fff880df27c, argc=0, argv=0x0) at vm.h:661 #12 0x00000001000277ed in format_message (exc=8590687424) at error.c:1274 #13 0x0000000100139e2a in rb_ensure () at vm.cpp:3695 #14 0x00000001000279a8 in rb_format_exception_message (exc=8590687424) at error.c:1314 #15 0x00000001000c6925 in rb_rb2oc_exception (exc=8590687424) at objc.m:504 #16 0x0000000100148868 in __vm_raise () at vm.cpp:3561 #17 0x00000001001489fa in rb_vm_raise (exception=8590687424) at vm.cpp:3639 #18 0x0000000100028bc3 in rb_exc_raise (mesg=8590687424) at eval.c:290 #19 0x0000000100025c39 in rb_name_error (id=Could not find the frame base for "rb_name_error". ) at error.c:670 #20 0x00000001000bfb1a in uninitialized_constant (klass=8590088032, id=13109) at variable.c:1234 #21 0x00000001000bfcf4 in rb_mod_const_missing (klass=Could not find the frame base for "rb_mod_const_missing". ) at variable.c:1281 #22 0x000000010012e8e6 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:161 #23 0x000000010012e8e6 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #24 0x000000010012e8e6 in rb_vm_dispatch () at dispatcher.cpp:872 #25 0x00000001000bfca1 in rb_vm_call0 (vm=0x100f231d0, top=0, self=8590088032, klass=0x200025720, sel=0x100f200c0, block=0x0, opt=2 '\002', argc=1, argv=0x7fff5fbfbfc8) at vm.h:654 #26 0x00000001000bfbda in rb_vm_call (self=8590088032, sel=0x100f200c0, argc=1, argv=0x7fff5fbfbfc8) at vm.h:661 #27 0x00000001000bfb74 in call_const_missing (klass=8590088032, id=13109) at variable.c:1246 #28 0x00000001000c04d6 in rb_const_get_0 (klass=8590088032, id=13109, exclude=0, recurse=2) at variable.c:1493 #29 0x00000001000c0537 in rb_const_get (klass=8590088032, id=13109) at variable.c:1505 #30 0x0000000100052e05 in rb_mod_const_get (mod=8590088032, sel=0x100fc1020, argc=1, argv=0x7fff5fbfd050) at object.c:2130 #31 0x000000010012e2b3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #32 0x000000010012e2b3 in rb_vm_dispatch () at dispatcher.cpp:872 #33 0x0000000101500744 in ?? () #34 0x0000000101500da1 in ?? () #35 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #36 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #37 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278 #38 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x7fff5fbfd5f8) at vm.h:697 #39 0x00000001000db2d0 in rb_yield (val=213) at vm_eval.c:183 #40 0x000000010004d1da in int_dotimes (num=4001, sel=0x100fe7360) at numeric.c:3241 #41 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #42 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #43 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872 #44 0x0000000101500744 in ?? () #45 0x0000000101500224 in ?? () #46 0x000000010014a072 in rb_vm_run (fname=0x2000a8da0 "/Users/watson/tmp/test_const_set_get.rb", node=0x2000251e0, binding=0x0, inside_eval=false) at vm.cpp:4115 #47 0x000000010002898b in ruby_run_node (n=0x2000251e0) at eval.c:211 #48 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfe7d8) at main.cpp:40 (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 4 22:18:06 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 05 Jul 2011 05:18:06 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.cabe8a7d787461390e649ea94e2f4d0a@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: critical | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: Keywords: | ------------------------------------+--------------------------------------- Comment(by mrada@?): Some simple benchmarks at https://gist.github.com/1064281 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 10:52:22 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 05 Jul 2011 17:52:22 -0000 Subject: [MacRuby] #1343: autotest-fsevent AND autotest-growl causes SegFault In-Reply-To: <046.b8bbba2209ffd62b6e849bda65153e7d@macosforge.org> References: <046.b8bbba2209ffd62b6e849bda65153e7d@macosforge.org> Message-ID: <055.40518ce9c8a66af7678836c17b4cf4a8@macosforge.org> #1343: autotest-fsevent AND autotest-growl causes SegFault -----------------------------+---------------------------------------------- Reporter: kykim@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by kykim@?): I *think* I've figured out the code that is causing the problem... If not, it's causing *a* problem. This is a simplification of the autotest gem code, btw. {{{ require 'rubygems' require 'sys/uname' class TestHooks HOOKS = { :something => [], :nothing => [] } def self.add_hook(name, &block) HOOKS[name] << block end def hook(name, &args) HOOKS[name].any?{ |hook| hook[self, *args] } end def do_something puts "doing something" end end th = TestHooks.new puts TestHooks::HOOKS.inspect th.do_something TestHooks.add_hook :something do if Sys::Uname.sysname == 'Darwin' && Sys::Uname.release.to_i >= 9 class ::TestHooks remove_method :do_something def do_something hook :nothing begin puts "doing something else" end end end else puts "wrong OS and/or version" end end puts TestHooks::HOOKS.inspect th.hook(:something) th.do_something }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 17:31:39 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 00:31:39 -0000 Subject: [MacRuby] #1352: Segfault occurs when invoked the Module#{class_variable_set, class_variable_get} within some threads. In-Reply-To: <051.6d320eb1d43f64d17a72637cc3bce2ea@macosforge.org> References: <051.6d320eb1d43f64d17a72637cc3bce2ea@macosforge.org> Message-ID: <060.102435ddf46ef07092c55650e7b2f7cd@macosforge.org> #1352: Segfault occurs when invoked the Module#{class_variable_set, class_variable_get} within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Likely a race condition in symbol.c global hashes. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 17:51:13 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 00:51:13 -0000 Subject: [MacRuby] #1352: Segfault occurs when invoked the Module#{class_variable_set, class_variable_get} within some threads. In-Reply-To: <051.6d320eb1d43f64d17a72637cc3bce2ea@macosforge.org> References: <051.6d320eb1d43f64d17a72637cc3bce2ea@macosforge.org> Message-ID: <060.5ab8032966a14a9642281a3c1dc7f171@macosforge.org> #1352: Segfault occurs when invoked the Module#{class_variable_set, class_variable_get} within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Should be fixed in https://github.com/MacRuby/MacRuby/commit/d08f39ddfa8b1816e92712334abf544af9716306 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 17:52:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 00:52:57 -0000 Subject: [MacRuby] #1353: Segfault occurs when invoked the Module#{const_set, const_get} within some threads. In-Reply-To: <051.19866f6cb62046f4a72f2c01e59801d8@macosforge.org> References: <051.19866f6cb62046f4a72f2c01e59801d8@macosforge.org> Message-ID: <060.17b12d9e791d51d98211c6690fc07463@macosforge.org> #1353: Segfault occurs when invoked the Module#{const_set, const_get} within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: It doesn't crash anymore with https://github.com/MacRuby/MacRuby/commit/d08f39ddfa8b1816e92712334abf544af9716306 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 17:57:52 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 00:57:52 -0000 Subject: [MacRuby] #1350: Segfault occurs when invoked an alias within some threads In-Reply-To: <051.9eb8b15b9a77edc259296891dcb78147@macosforge.org> References: <051.9eb8b15b9a77edc259296891dcb78147@macosforge.org> Message-ID: <060.b485e184d2bd6318fb8cb1324e8ec614@macosforge.org> #1350: Segfault occurs when invoked an alias within some threads ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): With https://github.com/MacRuby/MacRuby/commit/d08f39ddfa8b1816e92712334abf544af9716306 it doesn't seem to crash anymore. However, because of lazy JIT compilation of methods, it fails very often with: {{{ /Users/lrz/src/macruby-master/t2.rb:18:in `block': undefined method `bar' for class `Foo' (NameError) from /Users/lrz/src/macruby-master/t2.rb:17:in `
' }}} Changing the snippet like this makes it work: {{{ # ... f1 = Foo.new f1.bar('hey') # <- this forces the #bar method JIT compilation & registration f2 = f1.clone # ... }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 17:58:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 00:58:48 -0000 Subject: [MacRuby] #1349: Segfault occurs when invoked String#to_sym and Proc.new in some threads In-Reply-To: <051.ac75b2be208208990c5e7dd5dc46ec33@macosforge.org> References: <051.ac75b2be208208990c5e7dd5dc46ec33@macosforge.org> Message-ID: <060.ab64832e4a6ff27a60534ac0b934b3c4@macosforge.org> #1349: Segfault occurs when invoked String#to_sym and Proc.new in some threads ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): this problem would be fixed by https://github.com/MacRuby/MacRuby/commit/d08f39ddfa8b1816e92712334abf544af9716306 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 18:03:56 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 01:03:56 -0000 Subject: [MacRuby] #1349: Segfault occurs when invoked String#to_sym and Proc.new in some threads In-Reply-To: <051.ac75b2be208208990c5e7dd5dc46ec33@macosforge.org> References: <051.ac75b2be208208990c5e7dd5dc46ec33@macosforge.org> Message-ID: <060.1c7108d4712eea04c91c54036a5e0bdb@macosforge.org> #1349: Segfault occurs when invoked String#to_sym and Proc.new in some threads ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Indeed it is :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 18:27:00 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 01:27:00 -0000 Subject: [MacRuby] #1346: Segfault occurs when invoked a Module#attr within some threads. In-Reply-To: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> References: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> Message-ID: <060.d50ad3d1da25f0568aa0b9db0bfb2db8@macosforge.org> #1346: Segfault occurs when invoked a Module#attr within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): To fix this issue and #1347, at least, it looks like it needs the exclusive control for JIT compile. {{{ #!diff diff --git a/vm.cpp b/vm.cpp index abdf61b..947fb83 100644 --- a/vm.cpp +++ b/vm.cpp @@ -2630,14 +2630,18 @@ rb_vm_define_attr(Class klass, const char *name, bool read, bool write) ID iname = rb_intern(buf); if (read) { + GET_CORE()->lock(); Function *f = RoxorCompiler::shared->compile_read_attr(iname); + GET_CORE()->unlock(); SEL sel = sel_registerName(name); rb_vm_prepare_method(klass, false, sel, f, rb_vm_arity(0), VM_METHOD_FBODY); } if (write) { + GET_CORE()->unlock(); Function *f = RoxorCompiler::shared->compile_write_attr(iname); + GET_CORE()->unlock(); snprintf(buf, sizeof buf, "%s=:", name); SEL sel = sel_registerName(buf); rb_vm_prepare_method(klass, false, sel, f, rb_vm_arity(1), @@ -2734,8 +2738,10 @@ rb_vm_define_method3(Class klass, ID mid, rb_vm_block_t *block) const int arity = rb_vm_arity_n(block->arity); SEL sel = rb_vm_id_to_sel(mid, arity); + GET_CORE()->lock(); Function *func = RoxorCompiler::shared->compile_block_caller(block); IMP imp = GET_CORE()->compile(func); + GET_CORE()->unlock(); NODE *body = rb_vm_cfunc_node_from_imp(klass, arity < -1 ? -2 : arity, imp, 0); GC_RETAIN(body); GC_RETAIN(block); }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 18:43:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 01:43:01 -0000 Subject: [MacRuby] #1346: Segfault occurs when invoked a Module#attr within some threads. In-Reply-To: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> References: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> Message-ID: <060.634d938766ad5e14af6e3dbfacc3db15@macosforge.org> #1346: Segfault occurs when invoked a Module#attr within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Looks good to me! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 18:45:31 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 01:45:31 -0000 Subject: [MacRuby] #1346: Segfault occurs when invoked a Module#attr within some threads. In-Reply-To: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> References: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> Message-ID: <060.8ee95686766f074714613e34665cd522@macosforge.org> #1346: Segfault occurs when invoked a Module#attr within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by kouji@?): included typo. see below. {{{ if (write) { + GET_CORE()->lock(); Function *f = RoxorCompiler::shared->compile_write_attr(iname); + GET_CORE()->unlock(); snprintf(buf, sizeof buf, "%s=:", name); }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 18:46:43 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 01:46:43 -0000 Subject: [MacRuby] #1346: Segfault occurs when invoked a Module#attr within some threads. In-Reply-To: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> References: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> Message-ID: <060.863abd99e421c4372fa03d5efda55e13@macosforge.org> #1346: Segfault occurs when invoked a Module#attr within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): Oops, indeed :( -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 18:48:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 01:48:32 -0000 Subject: [MacRuby] #1346: Segfault occurs when invoked a Module#attr within some threads. In-Reply-To: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> References: <051.1dd2b2d4808a6bae60e60d595cdcedae@macosforge.org> Message-ID: <060.f08b38d1ba46d3c10bb1ac22b68b281f@macosforge.org> #1346: Segfault occurs when invoked a Module#attr within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): (I need better glasses :)) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 5 20:33:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 03:33:57 -0000 Subject: [MacRuby] #1354: Segfault occurs when duplicate the Class which is been autoloaded and use constant of duplicated Class. Message-ID: <051.2e470e48e33e236e44335ed8d26279ac@macosforge.org> #1354: Segfault occurs when duplicate the Class which is been autoloaded and use constant of duplicated Class. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby FILE = "/tmp/auto_load.rb" File.open(FILE, "w") {|f| f.puts <<"EOS" class Foo CONST = "hello, world" end EOS } class Foo autoload :CONST, FILE end Bar = Foo.dup p Foo.autoload?(:CONST) # => expect "/tmp/auto_load.rb" p Bar.autoload?(:CONST) # => expect "/tmp/auto_load.rb" p Foo::CONST # => expect "hello, world" p Bar::CONST # => expect NameError }}} Result: {{{ $ ruby19 ~/tmp/t.rb "/tmp/auto_load.rb" "/tmp/auto_load.rb" "hello, world" /Users/watson/tmp/t.rb:19:in `
': uninitialized constant Bar::CONST (NameError) $ DYLD_LIBRARY_PATH=. ./macruby ~/tmp/t.rb "/tmp/auto_load.rb" "/tmp/auto_load.rb" "hello, world" zsh: segmentation fault DYLD_LIBRARY_PATH=. ./macruby ~/tmp/t.rb }}} BackTrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000010 0x000000010009af0e in st_delete (table=0x0, key=0x7fff5fbfdab0, value=0x7fff5fbfdad0) at st.c:536 536 if (table->entries_packed) { (gdb) bt #0 0x000000010009af0e in st_delete (table=0x0, key=0x7fff5fbfdab0, value=0x7fff5fbfdad0) at st.c:536 #1 0x00000001000bfb8d in autoload_delete (mod=8590070688, id=12421) at variable.c:1346 #2 0x00000001000bfbe9 in rb_autoload_load (klass=8590070688, id=12421) at variable.c:1360 #3 0x00000001000bfee2 in rb_const_get_0 (klass=8590070688, id=12421, exclude=0, recurse=2) at variable.c:1450 #4 0x00000001000c0137 in rb_const_get (klass=8590070688, id=12421) at variable.c:1505 #5 0x0000000100140ad3 in rb_vm_const_lookup_level (outer=8590070688, path=12421, lexical=false, defined=false, outer_stack=0x0) at vm.cpp:1346 #6 0x0000000101600fa5 in ?? () #7 0x0000000101600408 in ?? () #8 0x0000000100149c8a in rb_vm_run (fname=0x2000a8cc0 "/Users/watson/tmp/t.rb", node=0x2000256e0, binding=0x0, inside_eval=false) at vm.cpp:4121 #9 0x000000010002858b in ruby_run_node (n=0x2000256e0) at eval.c:211 #10 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfde58) at main.cpp:40 Current language: auto; currently c (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 6 07:02:55 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 14:02:55 -0000 Subject: [MacRuby] #1347: Segfault occurs when invoked a Module#define_method within some threads. In-Reply-To: <051.e5a764ce316dad3f78892add56b4cfe4@macosforge.org> References: <051.e5a764ce316dad3f78892add56b4cfe4@macosforge.org> Message-ID: <060.deb81fdff2e250e6d35abce6d861ad76@macosforge.org> #1347: Segfault occurs when invoked a Module#define_method within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): To fix this problem and #1348, it looks like it would need to exclusive control as following. {{{ #!diff diff --git a/vm.cpp b/vm.cpp index eebda6d..fb57f37 100644 --- a/vm.cpp +++ b/vm.cpp @@ -1022,6 +1022,7 @@ RoxorCore::add_method(Class klass, SEL sel, IMP imp, IMP ruby_imp, real_node->sel = sel; // Cache the implementation. + GET_CORE()->lock(); std::map::iterator iter2 = ruby_imps.find(imp); rb_vm_method_node_t *node; if (iter2 == ruby_imps.end()) { @@ -1033,6 +1034,7 @@ RoxorCore::add_method(Class klass, SEL sel, IMP imp, IMP ruby_imp, node = iter2->second; assert(node->objc_imp == imp); } + GET_CORE()->unlock(); node->klass = klass; node->arity = arity; node->flags = flags; @@ -3052,7 +3054,7 @@ RoxorCore::gen_to_ocval_convertor(std::string type) #endif } -static const int VM_LVAR_USES_SIZE = 8; +static const int VM_LVAR_USES_SIZE = 16; enum { VM_LVAR_USE_TYPE_BLOCK = 1, VM_LVAR_USE_TYPE_BINDING = 2 @@ -3072,6 +3074,7 @@ rb_vm_add_lvar_use(rb_vm_var_uses **var_uses, void *use, return; } + GET_CORE()->lock(); if ((*var_uses == NULL) || ((*var_uses)->uses_count == VM_LVAR_USES_SIZE)) { @@ -3087,6 +3090,7 @@ rb_vm_add_lvar_use(rb_vm_var_uses **var_uses, void *use, GC_WB(&(*var_uses)->uses[current_index], use); (*var_uses)->use_types[current_index] = use_type; ++(*var_uses)->uses_count; + GET_CORE()->unlock(); } extern "C" }}} MacRuby crashes If does not change VM_LVAR_USES_SIZE. but, I do not know yet why it needs to change :( -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 6 08:34:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 15:34:54 -0000 Subject: [MacRuby] #1347: Segfault occurs when invoked a Module#define_method within some threads. In-Reply-To: <051.e5a764ce316dad3f78892add56b4cfe4@macosforge.org> References: <051.e5a764ce316dad3f78892add56b4cfe4@macosforge.org> Message-ID: <060.203ab0cd91335d08331daef7918fdebb@macosforge.org> #1347: Segfault occurs when invoked a Module#define_method within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): previous patch had been cause a deadlock :( so, I rewrote a patch. {{{ #!diff diff --git a/vm.cpp b/vm.cpp index eebda6d..9e37186 100644 --- a/vm.cpp +++ b/vm.cpp @@ -2672,8 +2672,10 @@ define_method: char types[100]; resolve_method_type(types, sizeof types, klass, method, sel, types_count); + GET_CORE()->lock(); node = GET_CORE()->add_method(klass, sel, objc_imp, ruby_imp, arity, flags, types); + GET_CORE()->unlock(); if (!redefined) { if (!genuine_selector && arity.max != arity.min) { @@ -3052,7 +3054,7 @@ RoxorCore::gen_to_ocval_convertor(std::string type) #endif } -static const int VM_LVAR_USES_SIZE = 8; +static const int VM_LVAR_USES_SIZE = 16; enum { VM_LVAR_USE_TYPE_BLOCK = 1, VM_LVAR_USE_TYPE_BINDING = 2 @@ -3072,6 +3074,7 @@ rb_vm_add_lvar_use(rb_vm_var_uses **var_uses, void *use, return; } + GET_CORE()->lock(); if ((*var_uses == NULL) || ((*var_uses)->uses_count == VM_LVAR_USES_SIZE)) { @@ -3087,6 +3090,7 @@ rb_vm_add_lvar_use(rb_vm_var_uses **var_uses, void *use, GC_WB(&(*var_uses)->uses[current_index], use); (*var_uses)->use_types[current_index] = use_type; ++(*var_uses)->uses_count; + GET_CORE()->unlock(); } extern "C" }}} To fix #1348, just change a VM_LVAR_USES_SIZE -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 6 10:39:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 06 Jul 2011 17:39:04 -0000 Subject: [MacRuby] #1347: Segfault occurs when invoked a Module#define_method within some threads. In-Reply-To: <051.e5a764ce316dad3f78892add56b4cfe4@macosforge.org> References: <051.e5a764ce316dad3f78892add56b4cfe4@macosforge.org> Message-ID: <060.24f1527ac06d20428efae2ed2389140f@macosforge.org> #1347: Segfault occurs when invoked a Module#define_method within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I agree for locking around add_method(). But I don't think locking in rb_vm_add_lvar_use() is the way to go. I believe the lvar_use thing has never been designed for thread safety, and I wonder if there isn't a better way to solve these race conditions. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 7 08:02:17 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 07 Jul 2011 15:02:17 -0000 Subject: [MacRuby] #1355: Segfault occurs when invoked a Module#dup within some threads. Message-ID: <051.e536dd5d103524655f1e47a11deecbba@macosforge.org> #1355: Segfault occurs when invoked a Module#dup within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby m1 = Module.new m2 = Module.new 200.times do |i| m1.instance_eval{ define_method("m#{i}", Proc.new{}) } m2.instance_eval{ define_method("m#{i}", Proc.new{}) } end th = Thread.new { 1000.times do m1.dup end } 1000.times do m2.dup end th.join puts :ok }}} BackTrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000010 [Switching to process 65497 thread 0x1707] 0x00007fff84c2467e in std::_Rb_tree_insert_and_rebalance () (gdb) t a a bt Thread 4 (process 65497): #0 0x00007fff84c2467e in std::_Rb_tree_insert_and_rebalance () #1 0x0000000100161c6b in std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert (this=0x102068358, __x=0x0, __p=0x10b683eb0, __v=@0x1017a03b0) at stl_tree.h:842 #2 0x0000000100161f6a in std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique (this=0x102068358, __position={_M_node = 0x102068360}, __v=@0x1017a03b0) at stl_tree.h:1008 #3 0x0000000100162285 in std::map, std::allocator > >::insert (this=0x102068358, __position={_M_node = 0x102068360}, __x=@0x1017a03b0) at stl_map.h:427 #4 0x000000010016232d in std::map, std::allocator > >::operator[] (this=0x102068358, __k=@0x1017a0420) at stl_map.h:350 #5 0x000000010013c07b in RoxorCore::method_node_get (this=0x102068200, m=0x10c8000a8, create=true) at vm.cpp:832 #6 0x000000010013fb8f in RoxorCore::copy_method (this=0x102068200, klass=0x200224900, m=0x101474888) at vm.cpp:2455 #7 0x0000000100146336 in RoxorCore::copy_methods (this=0x102068200, from_class=0x200015760, to_class=0x200224900) at vm.cpp:2472 #8 0x00000001001468e9 in rb_vm_copy_methods (from_class=0x200015760, to_class=0x200224900) at vm.cpp:2423 #9 0x00000001000184b4 in rb_mod_init_copy (clone=8592181504, sel=0x0, orig=8590022496) at class.c:304 #10 0x000000010001861e in rb_class_init_copy (clone=8592181504, sel=0x100f357b0, orig=8590022496) at class.c:342 #11 0x000000010012e4e6 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:161 #12 0x000000010012e4e6 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #13 0x000000010012e4e6 in rb_vm_dispatch () at dispatcher.cpp:872 #14 0x000000010004e88d in rb_vm_call0 (vm=0x1014ca140, top=0, self=8592181504, klass=0x2002248c0, sel=0x100f357b0, block=0x0, opt=2 '\002', argc=1, argv=0x1017a1390) at vm.h:654 #15 0x000000010004e71e in rb_vm_call (self=8592181504, sel=0x100f357b0, argc=1, argv=0x1017a1390) at vm.h:661 #16 0x000000010004ed8a in init_copy (dest=8592181504, obj=8590022496) at object.c:221 #17 0x000000010004f29d in rb_obj_dup (obj=8590022496) at object.c:326 #18 0x000000010004f4a5 in rb_nsobj_dup (obj=8590022496, sel=4310855408) at object.c:360 #19 0x000000010012e4b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #20 0x000000010012e4b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #21 0x000000010012e4b4 in rb_vm_dispatch () at dispatcher.cpp:872 #22 0x0000000101600954 in ?? () #23 0x0000000101611214 in ?? () #24 0x0000000100134887 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #25 0x0000000100134887 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #26 0x0000000100134887 in rb_vm_yield_args () at dispatcher.cpp:1278 #27 0x00000001000daefd in rb_vm_yield (argc=1, argv=0x1017a2928) at vm.h:697 #28 0x00000001000daed0 in rb_yield (val=2069) at vm_eval.c:183 #29 0x000000010004cdda in int_dotimes (num=4001, sel=0x100fe73e0) at numeric.c:3241 #30 0x000000010012e4b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #31 0x000000010012e4b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #32 0x000000010012e4b4 in rb_vm_dispatch () at dispatcher.cpp:872 #33 0x0000000101600954 in ?? () #34 0x0000000101611079 in ?? () #35 0x0000000100132867 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #36 0x0000000100132867 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #37 0x0000000100132867 in rb_vm_block_eval (b=0x2000c5580, argc=0, argv=0x0) at dispatcher.cpp:1228 #38 0x000000010014ccf7 in rb_vm_thread_run (thread=8590747008) at vm.cpp:4864 #39 0x00007fff83cf9fd6 in _pthread_start () #40 0x00007fff83cf9e89 in thread_start () Thread 3 (process 65497): #0 0x00007fff83cdaa2a in __workq_kernreturn () #1 0x00007fff83cdae3c in _pthread_wqthread () #2 0x00007fff83cdaaa5 in start_wqthread () Thread 2 (process 65497): #0 0x00007fff83cdaa2a in __workq_kernreturn () #1 0x00007fff83cdae3c in _pthread_wqthread () #2 0x00007fff83cdaaa5 in start_wqthread () Thread 1 (process 65497): #0 0x00007fff83cc64ab in pthread_mutex_lock () #1 0x00007fff8012a4b9 in flush_cache () #2 0x00007fff80130415 in flushCaches () #3 0x00007fff80125934 in _class_addMethod () #4 0x000000010013fada in RoxorCore::copy_method (this=0x102068200, klass=0x2002245c0, m=0x101186c78) at vm.cpp:2448 #5 0x0000000100146336 in RoxorCore::copy_methods (this=0x102068200, from_class=0x200015620, to_class=0x2002245c0) at vm.cpp:2472 #6 0x00000001001468e9 in rb_vm_copy_methods (from_class=0x200015620, to_class=0x2002245c0) at vm.cpp:2423 #7 0x00000001000184b4 in rb_mod_init_copy (clone=8592180672, sel=0x0, orig=8590022176) at class.c:304 #8 0x000000010001861e in rb_class_init_copy (clone=8592180672, sel=0x100f357b0, orig=8590022176) at class.c:342 #9 0x000000010012e4e6 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:161 #10 0x000000010012e4e6 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #11 0x000000010012e4e6 in rb_vm_dispatch () at dispatcher.cpp:872 #12 0x000000010004e88d in rb_vm_call0 (vm=0x100f231c0, top=0, self=8592180672, klass=0x200224580, sel=0x100f357b0, block=0x0, opt=2 '\002', argc=1, argv=0x7fff5fbfb6b0) at vm.h:654 #13 0x000000010004e71e in rb_vm_call (self=8592180672, sel=0x100f357b0, argc=1, argv=0x7fff5fbfb6b0) at vm.h:661 #14 0x000000010004ed8a in init_copy (dest=8592180672, obj=8590022176) at object.c:221 #15 0x000000010004f29d in rb_obj_dup (obj=8590022176) at object.c:326 #16 0x000000010004f4a5 in rb_nsobj_dup (obj=8590022176, sel=4310855408) at object.c:360 #17 0x000000010012e4b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #18 0x000000010012e4b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #19 0x000000010012e4b4 in rb_vm_dispatch () at dispatcher.cpp:872 #20 0x0000000101600954 in ?? () #21 0x0000000101611154 in ?? () #22 0x0000000100134887 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #23 0x0000000100134887 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #24 0x0000000100134887 in rb_vm_yield_args () at dispatcher.cpp:1278 #25 0x00000001000daefd in rb_vm_yield (argc=1, argv=0x7fff5fbfcc48) at vm.h:697 #26 0x00000001000daed0 in rb_yield (val=2061) at vm_eval.c:183 #27 0x000000010004cdda in int_dotimes (num=4001, sel=0x100fe73e0) at numeric.c:3241 #28 0x000000010012e4b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #29 0x000000010012e4b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #30 0x000000010012e4b4 in rb_vm_dispatch () at dispatcher.cpp:872 #31 0x0000000101600954 in ?? () #32 0x0000000101600359 in ?? () #33 0x0000000100149ca2 in rb_vm_run (fname=0x2000a7ac0 "/Users/watson/tmp/t.rb", node=0x200015520, binding=0x0, inside_eval=false) at vm.cpp:4123 #34 0x000000010002858b in ruby_run_node (n=0x200015520) at eval.c:211 #35 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfde58) at main.cpp:40 (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 7 09:20:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 07 Jul 2011 16:20:34 -0000 Subject: [MacRuby] #1355: Segfault occurs when invoked a Module#dup within some threads. In-Reply-To: <051.e536dd5d103524655f1e47a11deecbba@macosforge.org> References: <051.e536dd5d103524655f1e47a11deecbba@macosforge.org> Message-ID: <060.975ed6d16284322b2e40813d1f522db8@macosforge.org> #1355: Segfault occurs when invoked a Module#dup within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): It looks like it needs exclusive control in RoxorCore::copy_method() {{{ #!diff diff --git a/vm.cpp b/vm.cpp index 5896ca6..542300a 100644 --- a/vm.cpp +++ b/vm.cpp @@ -2452,7 +2452,9 @@ RoxorCore::copy_method(Class klass, Method m) Method m2 = class_getInstanceMethod(klass, sel); assert(m2 != NULL); assert(method_getImplementation(m2) == method_getImplementation(m)); + GET_CORE()->lock(); rb_vm_method_node_t *node2 = method_node_get(m2, true); + GET_CORE()->unlock(); memcpy(node2, node, sizeof(rb_vm_method_node_t)); } return true; }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 7 09:47:16 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 07 Jul 2011 16:47:16 -0000 Subject: [MacRuby] #1356: Segfault occurs when invoked a Pointer.new within some threads. Message-ID: <051.a41431aedf8f2eafcbf10a2543982c09@macosforge.org> #1356: Segfault occurs when invoked a Pointer.new within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Segfault occurs when invoked a Pointer.new within some threads. Test Script: {{{ #!ruby th = Thread.new { 200.times do Pointer.new('@') end } 200.times do Pointer.new('@') end th.join puts :ok }}} BackTrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00000001005cab0e in (anonymous namespace)::GVN::runOnFunction () at Type.h:511 511 } (gdb) t a a bt Thread 3 (process 76104): #0 0x00000001005be592 in llvm::DenseMap<(anonymous namespace)::Expression, unsigned int, llvm::DenseMapInfo<(anonymous namespace)::Expression>, llvm::DenseMapInfo >::FindAndConstruct () at Type.h:511 #1 0x00000001005c3a29 in (anonymous namespace)::ValueTable::lookup_or_add () at Type.h:511 #2 0x00000001005c92de in (anonymous namespace)::GVN::processBlock () at Type.h:511 #3 0x00000001005cae66 in (anonymous namespace)::GVN::runOnFunction () at Type.h:511 #4 0x0000000100904ea0 in llvm::FPPassManager::runOnFunction () at vector.tcc:300 #5 0x000000010090503c in llvm::FunctionPassManagerImpl::run () at vector.tcc:300 #6 0x0000000100905329 in llvm::FunctionPassManager::run () at vector.tcc:300 #7 0x0000000100142379 in RoxorCore::optimize (this=0x102068200, func=0x1048001f0) at vm.cpp:554 #8 0x00000001001423f2 in RoxorCore::compile (this=0x102068200, func=0x1048001f0, run_optimize=true) at vm.cpp:591 #9 0x00000001001424f2 in RoxorCore::gen_to_ocval_convertor (this=0x102068200, type=@0x10177e320) at vm.cpp:3052 #10 0x00000001000e18dd in rb_pointer_init_type (ptr=0x200021000, type=8590069696) at bridgesupport.cpp:867 #11 0x00000001000e1a08 in rb_pointer_new (type_str=0x2000211a0 "@", val=0x200021180, len=1) at bridgesupport.cpp:879 #12 0x00000001000e1e42 in rb_pointer_s_new (rcv=8590643360, sel=0x100f22350, argc=1, argv=0x10177f388) at bridgesupport.cpp:910 #13 0x000000010012deb3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #14 0x000000010012deb3 in rb_vm_dispatch () at dispatcher.cpp:872 #15 0x00000001015006d4 in ?? () #16 0x0000000101500e4c in ?? () #17 0x0000000100134887 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #18 0x0000000100134887 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #19 0x0000000100134887 in rb_vm_yield_args () at dispatcher.cpp:1278 #20 0x00000001000daefd in rb_vm_yield (argc=1, argv=0x10177f928) at vm.h:697 #21 0x00000001000daed0 in rb_yield (val=1) at vm_eval.c:183 #22 0x000000010004cdda in int_dotimes (num=801, sel=0x100fe73e0) at numeric.c:3241 #23 0x000000010012e4b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #24 0x000000010012e4b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #25 0x000000010012e4b4 in rb_vm_dispatch () at dispatcher.cpp:872 #26 0x00000001015006d4 in ?? () #27 0x0000000101500c01 in ?? () #28 0x0000000100132867 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #29 0x0000000100132867 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #30 0x0000000100132867 in rb_vm_block_eval (b=0x2000a99c0, argc=0, argv=0x0) at dispatcher.cpp:1228 #31 0x000000010014cd0f in rb_vm_thread_run (thread=8590086752) at vm.cpp:4866 #32 0x00007fff83cf9fd6 in _pthread_start () #33 0x00007fff83cf9e89 in thread_start () Thread 2 (process 76104): #0 0x00007fff83cdaa2a in __workq_kernreturn () #1 0x00007fff83cdae3c in _pthread_wqthread () #2 0x00007fff83cdaaa5 in start_wqthread () Thread 1 (process 76104): #0 0x00000001005cab0e in (anonymous namespace)::GVN::runOnFunction () at Type.h:511 #1 0x0000000100904ea0 in llvm::FPPassManager::runOnFunction () at vector.tcc:300 #2 0x000000010090503c in llvm::FunctionPassManagerImpl::run () at vector.tcc:300 #3 0x0000000100905329 in llvm::FunctionPassManager::run () at vector.tcc:300 #4 0x0000000100142379 in RoxorCore::optimize (this=0x102068200, func=0x1011ae630) at vm.cpp:554 #5 0x00000001001423f2 in RoxorCore::compile (this=0x102068200, func=0x1011ae630, run_optimize=true) at vm.cpp:591 #6 0x00000001001424f2 in RoxorCore::gen_to_ocval_convertor (this=0x102068200, type=@0x7fff5fbfb690) at vm.cpp:3052 #7 0x00000001000e18dd in rb_pointer_init_type (ptr=0x200020dc0, type=8590069120) at bridgesupport.cpp:867 #8 0x00000001000e1a08 in rb_pointer_new (type_str=0x200020b60 "@", val=0x200020b40, len=1) at bridgesupport.cpp:879 #9 0x00000001000e1e42 in rb_pointer_s_new (rcv=8590643360, sel=0x100f22350, argc=1, argv=0x7fff5fbfc6f8) at bridgesupport.cpp:910 #10 0x000000010012deb3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #11 0x000000010012deb3 in rb_vm_dispatch () at dispatcher.cpp:872 #12 0x00000001015006d4 in ?? () #13 0x0000000101500d2c in ?? () #14 0x00000001001348cb in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #15 0x00000001001348cb in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #16 0x00000001001348cb in rb_vm_yield_args () at dispatcher.cpp:1278 #17 0x00000001000daefd in rb_vm_yield (argc=1, argv=0x7fff5fbfcc98) at vm.h:697 #18 0x00000001000daed0 in rb_yield (val=1) at vm_eval.c:183 #19 0x000000010004cdda in int_dotimes (num=801, sel=0x100fe73e0) at numeric.c:3241 #20 0x000000010012e4b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #21 0x000000010012e4b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #22 0x000000010012e4b4 in rb_vm_dispatch () at dispatcher.cpp:872 #23 0x00000001015006d4 in ?? () #24 0x0000000101500190 in ?? () #25 0x0000000100149cba in rb_vm_run (fname=0x2000a78a0 "/Users/watson/tmp/t.rb", node=0x200024ee0, binding=0x0, inside_eval=false) at vm.cpp:4125 #26 0x000000010002858b in ruby_run_node (n=0x200024ee0) at eval.c:211 #27 0x0000000100000be3 in main (argc=2, argv=0x100f1c040, envp=0x7fff5fbfde58) at main.cpp:40 (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 7 09:55:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 07 Jul 2011 16:55:58 -0000 Subject: [MacRuby] #1356: Segfault occurs when invoked a Pointer.new within some threads. In-Reply-To: <051.a41431aedf8f2eafcbf10a2543982c09@macosforge.org> References: <051.a41431aedf8f2eafcbf10a2543982c09@macosforge.org> Message-ID: <060.d7da3c636aed5c24b4779ee05bfa0afe@macosforge.org> #1356: Segfault occurs when invoked a Pointer.new within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): It looks like it needs exclusive control in RoxorCore::gen_to_ocval_convertor() {{{ #!diff diff --git a/vm.cpp b/vm.cpp index 5896ca6..a959bf0 100644 --- a/vm.cpp +++ b/vm.cpp @@ -3035,6 +3035,8 @@ RoxorCore::gen_to_rval_convertor(std::string type) void * RoxorCore::gen_to_ocval_convertor(std::string type) { + RoxorCoreLock lock; + std::map::iterator iter = to_ocval_convertors.find(type); if (iter != to_ocval_convertors.end()) { }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 8 09:28:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 08 Jul 2011 16:28:53 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.c0161f9311b358a79dd4ea1fb20ac355@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by eric@?): This persists into Lion with Xcode 4.1/4.2. I'm willing to assist the devs in resolving this issue (having access to both 4.1 and 4.2), if one wants to contact me (have to do this in private due to NDA). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jul 9 10:27:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 09 Jul 2011 17:27:32 -0000 Subject: [MacRuby] #972: RSpec 2.0.1 & Bundler rake task segfaults under MacRuby 0.7.1 In-Reply-To: <047.990520718669fe1017526adce8ff1145@macosforge.org> References: <047.990520718669fe1017526adce8ff1145@macosforge.org> Message-ID: <056.ae86e7c19f596186fd7836b514ac3866@macosforge.org> #972: RSpec 2.0.1 & Bundler rake task segfaults under MacRuby 0.7.1 ------------------------------+--------------------------------------------- Reporter: jon@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ------------------------------+--------------------------------------------- Comment(by mrada@?): It looks like this issue is gone if you install the latest rake (from git, not rubygems). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 10 10:17:47 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 10 Jul 2011 17:17:47 -0000 Subject: [MacRuby] #1357: Segfault occurs when invoked a Kernel#eval within some threads. Message-ID: <051.e9eb7863284c9104cd80610021b6b5f1@macosforge.org> #1357: Segfault occurs when invoked a Kernel#eval within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby th = Thread.new { 10000.times do eval "1 + 2" end } 10000.times do eval "3 + 4" end th.join puts :ok }}} BackTrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000107bc1000 0x00007fff83610380 in libunwind::LocalAddressSpace::getEncodedP () (gdb) t a a bt Thread 5 (process 27911): #0 0x00007fff834f4a2a in __workq_kernreturn () #1 0x00007fff834f4e3c in _pthread_wqthread () #2 0x00007fff834f4aa5 in start_wqthread () Thread 4 (process 27911): #0 0x00007fff834f4a2a in __workq_kernreturn () #1 0x00007fff834f4e3c in _pthread_wqthread () #2 0x00007fff834f4aa5 in start_wqthread () Thread 3 (process 27911): #0 0x00007fff834dadc2 in semaphore_wait_signal_trap () #1 0x00007fff834e040d in pthread_mutex_lock () #2 0x00000001000ee31d in RoxorCore::lock (this=0x102068200) at vm.h:852 #3 0x000000010015a6ce in RoxorCoreLock::RoxorCoreLock (this=0x10171e0cf) at vm.cpp:95 #4 0x0000000100149af4 in rb_vm_run (fname=0x10099e4d4 "(eval)", node=0x200274460, binding=0x0, inside_eval=true) at vm.cpp:4079 #5 0x000000010014a0a5 in rb_vm_run_under () at vm.cpp:4230 #6 0x000000010014a2b7 in rb_vm_eval_string (self=8590062368, klass=0, src=8592598944, binding=0x0, file=0x10099e4d4 "(eval)", line=1, should_push_outer=false) at vm.cpp:4274 #7 0x00000001000db411 in eval_string_with_should_push_outer (self=8590062368, klass=0, src=8592598944, scope=4, file=0x10099e4d4 "(eval)", line=1, should_push_outer=false) at vm_eval.c:299 #8 0x00000001000db4e0 in eval_string (self=8590062368, klass=0, src=8592598944, scope=4, file=0x10099e4d4 "(eval)", line=1) at vm_eval.c:320 #9 0x00000001000db8aa in rb_f_eval (self=8590062368, sel=0x100f27180, argc=1, argv=0x10171f380) at vm_eval.c:441 #10 0x000000010012deb3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #11 0x000000010012deb3 in rb_vm_dispatch () at dispatcher.cpp:872 #12 0x00000001016006d4 in ?? () #13 0x0000000101600e71 in ?? () #14 0x0000000100134887 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #15 0x0000000100134887 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #16 0x0000000100134887 in rb_vm_yield_args () at dispatcher.cpp:1278 #17 0x00000001000daefd in rb_vm_yield (argc=1, argv=0x10171f928) at vm.h:697 #18 0x00000001000daed0 in rb_yield (val=19605) at vm_eval.c:183 #19 0x000000010004cdda in int_dotimes (num=40001, sel=0x100fe7370) at numeric.c:3241 #20 0x000000010012e4b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #21 0x000000010012e4b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #22 0x000000010012e4b4 in rb_vm_dispatch () at dispatcher.cpp:872 #23 0x00000001016006d4 in ?? () #24 0x0000000101600c01 in ?? () #25 0x0000000100132867 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #26 0x0000000100132867 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #27 0x0000000100132867 in rb_vm_block_eval (b=0x2000a8d40, argc=0, argv=0x0) at dispatcher.cpp:1228 #28 0x000000010014ccf7 in rb_vm_thread_run (thread=8590070112) at vm.cpp:4864 #29 0x00007fff83513fd6 in _pthread_start () #30 0x00007fff83513e89 in thread_start () Thread 2 (process 27911): #0 0x00007fff834f4a2a in __workq_kernreturn () #1 0x00007fff834f4e3c in _pthread_wqthread () #2 0x00007fff834f4aa5 in start_wqthread () Thread 1 (process 27911): #0 0x00007fff83610380 in libunwind::LocalAddressSpace::getEncodedP () #1 0x00007fff8361595c in libunwind::CFI_Parser::decodeFDE () #2 0x00007fff836105ff in _unw_add_dynamic_fde () #3 0x000000010045d009 in (anonymous namespace)::JITEmitter::finishFunction () at Type.h:511 #4 0x00000001001e3eea in (anonymous namespace)::Emitter::runOnMachineFunction () at vector.tcc:300 #5 0x00000001004e270d in llvm::MachineFunctionPass::runOnFunction () at Type.h:511 #6 0x0000000100904ea0 in llvm::FPPassManager::runOnFunction () at vector.tcc:300 #7 0x000000010090503c in llvm::FunctionPassManagerImpl::run () at vector.tcc:300 #8 0x0000000100905329 in llvm::FunctionPassManager::run () at vector.tcc:300 #9 0x000000010044b80a in llvm::JIT::jitTheFunction () at vector.tcc:300 #10 0x000000010044be81 in llvm::JIT::getPointerToFunction () at vector.tcc:300 #11 0x00000001001423fa in RoxorCore::compile (this=0x102068200, func=0x108072ab0, run_optimize=true) at vm.cpp:595 #12 0x0000000100149c07 in rb_vm_run (fname=0x10099e4d4 "(eval)", node=0x200279480, binding=0x0, inside_eval=true) at vm.cpp:4111 #13 0x000000010014a0a5 in rb_vm_run_under () at vm.cpp:4230 #14 0x000000010014a2b7 in rb_vm_eval_string (self=8590062368, klass=0, src=8592570400, binding=0x0, file=0x10099e4d4 "(eval)", line=1, should_push_outer=false) at vm.cpp:4274 #15 0x00000001000db411 in eval_string_with_should_push_outer (self=8590062368, klass=0, src=8592570400, scope=4, file=0x10099e4d4 "(eval)", line=1, should_push_outer=false) at vm_eval.c:299 #16 0x00000001000db4e0 in eval_string (self=8590062368, klass=0, src=8592570400, scope=4, file=0x10099e4d4 "(eval)", line=1) at vm_eval.c:320 #17 0x00000001000db8aa in rb_f_eval (self=8590062368, sel=0x100f27180, argc=1, argv=0x7fff5fbfc6d0) at vm_eval.c:441 #18 0x000000010012deb3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #19 0x000000010012deb3 in rb_vm_dispatch () at dispatcher.cpp:872 #20 0x00000001016006d4 in ?? () #21 0x0000000101600d41 in ?? () #22 0x0000000100134887 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #23 0x0000000100134887 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #24 0x0000000100134887 in rb_vm_yield_args () at dispatcher.cpp:1278 #25 0x00000001000daefd in rb_vm_yield (argc=1, argv=0x7fff5fbfcc78) at vm.h:697 #26 0x00000001000daed0 in rb_yield (val=19609) at vm_eval.c:183 #27 0x000000010004cdda in int_dotimes (num=40001, sel=0x100fe7370) at numeric.c:3241 #28 0x000000010012e4b4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #29 0x000000010012e4b4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #30 0x000000010012e4b4 in rb_vm_dispatch () at dispatcher.cpp:872 #31 0x00000001016006d4 in ?? () #32 0x0000000101600188 in ?? () #33 0x0000000100149ca2 in rb_vm_run (fname=0x200023a80 "/Users/watson/tmp/t.rb", node=0x200020de0, binding=0x0, inside_eval=false) at vm.cpp:4123 #34 0x000000010002858b in ruby_run_node (n=0x200020de0) at eval.c:211 #35 0x0000000100000be3 in main (argc=2, argv=0x100f1c030, envp=0x7fff5fbfde38) at main.cpp:40 (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 10 11:06:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 10 Jul 2011 18:06:27 -0000 Subject: [MacRuby] #1195: Socket#accept_nonblock blocks for Unix domain socket In-Reply-To: <055.01e1a55b8ba75da0ecb56c354da88f40@macosforge.org> References: <055.01e1a55b8ba75da0ecb56c354da88f40@macosforge.org> Message-ID: <064.b96fc55f47b95bee26b67507c5afea12@macosforge.org> #1195: Socket#accept_nonblock blocks for Unix domain socket --------------------------------------+------------------------------------- Reporter: warpflyght@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------------+------------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Fixed with https://github.com/MacRuby/MacRuby/commit/4aaea9412dbf51da5d8abb41f00a459bdf033067 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 10 11:15:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 10 Jul 2011 18:15:14 -0000 Subject: [MacRuby] #1221: xml-object gem fails: no superclass method `initialize' (works on MRI 1.9.2) In-Reply-To: <052.121ebc11d222d01739012cb448a6546d@macosforge.org> References: <052.121ebc11d222d01739012cb448a6546d@macosforge.org> Message-ID: <061.9f806ec14485a5384cebb53c6bc62587@macosforge.org> #1221: xml-object gem fails: no superclass method `initialize' (works on MRI 1.9.2) -----------------------------------+---------------------------------------- Reporter: andre.lewis@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------------+---------------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: no longer, this issue does not reproduce with MacRuby latest. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 10 19:24:28 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 11 Jul 2011 02:24:28 -0000 Subject: [MacRuby] #1079: Failed to install pg gem In-Reply-To: <049.fb0d4e08b5088870d5e90ac5417406c7@macosforge.org> References: <049.fb0d4e08b5088870d5e90ac5417406c7@macosforge.org> Message-ID: <058.81d65036e26ecd5cd8a02bdd17e487bb@macosforge.org> #1079: Failed to install pg gem --------------------------------+------------------------------------------- Reporter: mr.saint@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by pierre@?): FYI, same issue here with MacRuby 0.10 (ruby 1.9.2) [universal-darwin10.0, x86_64]: make /usr/bin/gcc -I. -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2 /universal-darwin10.0 -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2/ruby/backward -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/local/Cellar/postgresql/9.0.4/include -fno-common -arch x86_64 -fexceptions -fno-common -pipe -O3 -g -Wall -arch x86_64 -o compat.o -c compat.c /usr/bin/gcc -I. -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2 /universal-darwin10.0 -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2/ruby/backward -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/local/Cellar/postgresql/9.0.4/include -fno-common -arch x86_64 -fexceptions -fno-common -pipe -O3 -g -Wall -arch x86_64 -o pg.o -c pg.c pg.c: In function ?new_pgresult?: pg.c:118: warning: implicit declaration of function ?rb_enc_to_index? pg.c: In function ?enc_get_index?: pg.c:3739: warning: implicit declaration of function ?ENCODING_GET_INLINED? pg.c:3740: error: ?ENCODING_INLINE_MAX? undeclared (first use in this function) pg.c:3740: error: (Each undeclared identifier is reported only once pg.c:3740: error: for each function it appears in.) pg.c: In function ?find_or_create_johab?: pg.c:3759: warning: implicit declaration of function ?rb_define_dummy_encoding? pg.c: In function ?pgconn_internal_encoding_set?: pg.c:3866: warning: implicit declaration of function ?rb_usascii_str_new_cstr? make: *** [pg.o] Error 1 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 10 19:25:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 11 Jul 2011 02:25:53 -0000 Subject: [MacRuby] #1079: Failed to install pg gem In-Reply-To: <049.fb0d4e08b5088870d5e90ac5417406c7@macosforge.org> References: <049.fb0d4e08b5088870d5e90ac5417406c7@macosforge.org> Message-ID: <058.4199c90092b58adabe2b2c9b4f56a624@macosforge.org> #1079: Failed to install pg gem --------------------------------+------------------------------------------- Reporter: mr.saint@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by pierre@?): Sorry about that... {{{ make /usr/bin/gcc -I. -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2 /universal-darwin10.0 -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2/ruby/backward -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/local/Cellar/postgresql/9.0.4/include -fno-common -arch x86_64 -fexceptions -fno-common -pipe -O3 -g -Wall -arch x86_64 -o compat.o -c compat.c /usr/bin/gcc -I. -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2 /universal-darwin10.0 -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2/ruby/backward -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/local/Cellar/postgresql/9.0.4/include -fno-common -arch x86_64 -fexceptions -fno-common -pipe -O3 -g -Wall -arch x86_64 -o pg.o -c pg.c pg.c: In function ?new_pgresult?: pg.c:118: warning: implicit declaration of function ?rb_enc_to_index? pg.c: In function ?enc_get_index?: pg.c:3739: warning: implicit declaration of function ?ENCODING_GET_INLINED? pg.c:3740: error: ?ENCODING_INLINE_MAX? undeclared (first use in this function) pg.c:3740: error: (Each undeclared identifier is reported only once pg.c:3740: error: for each function it appears in.) pg.c: In function ?find_or_create_johab?: pg.c:3759: warning: implicit declaration of function ?rb_define_dummy_encoding? pg.c: In function ?pgconn_internal_encoding_set?: pg.c:3866: warning: implicit declaration of function ?rb_usascii_str_new_cstr? make: *** [pg.o] Error 1 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 11 08:50:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 11 Jul 2011 15:50:48 -0000 Subject: [MacRuby] #1079: Failed to install pg gem In-Reply-To: <049.fb0d4e08b5088870d5e90ac5417406c7@macosforge.org> References: <049.fb0d4e08b5088870d5e90ac5417406c7@macosforge.org> Message-ID: <058.7c90c448cabd26bac13538a9c5996758@macosforge.org> #1079: Failed to install pg gem --------------------------------+------------------------------------------- Reporter: mr.saint@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Fixed with https://github.com/MacRuby/MacRuby/commit/7bef6537877c2306391f4eff3e39b92fd58fbf87 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 11 16:45:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 11 Jul 2011 23:45:15 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.55b81042185cb9b43ea2cbc4173328a9@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by watson1978@?): at least, it looks like it needs the exclusive control as following. {{{ #!diff diff --git a/vm.cpp b/vm.cpp index 6023920..df76396 100644 --- a/vm.cpp +++ b/vm.cpp @@ -795,6 +795,7 @@ extern "C" void * rb_vm_get_constant_cache(const char *name) { + RoxorCoreLock lock; return GET_CORE()->constant_cache_get(rb_intern(name)); } @@ -1543,8 +1544,10 @@ vm_alias_method(Class klass, Method method, ID name, bool noargs) SEL sel = rb_vm_id_to_sel(name, noargs ? 0 : 1); rb_vm_method_node_t *node = GET_CORE()->method_node_get(method); if (node != NULL) { + GET_CORE()->lock(); GET_CORE()->add_method(klass, sel, imp, node->ruby_imp, node->arity, node->flags, types); + GET_CORE()->unlock(); } else { class_replaceMethod(klass, sel, imp, types); @@ -2180,8 +2183,10 @@ prepare_method: imp = (IMP)data; } assert(objc_imp_types != NULL); + GET_CORE()->lock(); GET_CORE()->resolve_method(klass, sel, NULL, arity, flags, imp, m, objc_imp_types); + GET_CORE()->unlock(); } else { #if MACRUBY_STATIC }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 11 18:06:36 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 12 Jul 2011 01:06:36 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.702670a7ae98b46393a4a4154d28af92@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by kouji@?): I created a better patch for this. Now, I am compiling and checking this. {{{ #!diff diff --git a/vm.cpp b/vm.cpp index 5896ca6..f4d663f 100644 --- a/vm.cpp +++ b/vm.cpp @@ -795,6 +795,7 @@ extern "C" void * rb_vm_get_constant_cache(const char *name) { + RoxorCoreLock lock; return GET_CORE()->constant_cache_get(rb_intern(name)); } @@ -1543,6 +1544,7 @@ vm_alias_method(Class klass, Method method, ID name, bool noargs) SEL sel = rb_vm_id_to_sel(name, noargs ? 0 : 1); rb_vm_method_node_t *node = GET_CORE()->method_node_get(method); if (node != NULL) { + RoxorCoreLock lock; GET_CORE()->add_method(klass, sel, imp, node->ruby_imp, node->arity, node->flags, types); } @@ -2180,6 +2182,7 @@ prepare_method: imp = (IMP)data; } assert(objc_imp_types != NULL); + RoxorCoreLock lock; GET_CORE()->resolve_method(klass, sel, NULL, arity, flags, imp, m, objc_imp_types); } }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 11 21:58:45 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 12 Jul 2011 04:58:45 -0000 Subject: [MacRuby] #1262: Rack error calling [] in Faraday via the Octokit gem In-Reply-To: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> References: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> Message-ID: <056.03fda67e71dda987d50bba8605341a14@macosforge.org> #1262: Rack error calling [] in Faraday via the Octokit gem ------------------------------+--------------------------------------------- Reporter: sferik@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: github, octokit, rack, hubcap, 0.11-blocker ------------------------------+--------------------------------------------- Comment(by watson1978@?): in rack/utils.rb, HeaderHash's @names was initialized with https://github.com/rack/rack/blob/master/lib/rack/utils.rb#L343 [[BR]] but, when HeaderHash#[] was invoked, @names seems to be nil. test script works if change the https://github.com/rack/rack/blob/master/lib/rack/utils.rb#L359-361 as following. {{{ def [](k) + @names ||= {} super(k) || super(@names[k.downcase]) end }}} when suppress the JIT optimization as following (using VM_OPT_LEVEL=0), you can load more faster. {{{ $ time VM_OPT_LEVEL=0 macruby 1262-test_octokit.rb 2>&1 > /dev/null VM_OPT_LEVEL=0 macruby 1262-test_octokit.rb 2>&1 > /dev/null 6.43s user 0.36s system 98% cpu 6.879 total }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 12 07:16:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 12 Jul 2011 14:16:35 -0000 Subject: [MacRuby] #1262: Rack error calling [] in Faraday via the Octokit gem In-Reply-To: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> References: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> Message-ID: <056.7dc00237291c91a973beb81bb0705c41@macosforge.org> #1262: Rack error calling [] in Faraday via the Octokit gem ------------------------------+--------------------------------------------- Reporter: sferik@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: github, octokit, rack, hubcap, 0.11-blocker ------------------------------+--------------------------------------------- Comment(by watson1978@?): When invoked Hash#dup, does not copy instance variable. {{{ #!ruby require 'rubygems' require 'rack/utils' include Rack::Utils h = HeaderHash.new h.instance_eval{ p @names } h2 = h.dup h2.instance_eval{ p @names } }}} {{{ $ ruby19 t.rb {} {} $ macruby t.rb {} nil }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 12 08:01:02 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 12 Jul 2011 15:01:02 -0000 Subject: [MacRuby] #1262: Rack error calling [] in Faraday via the Octokit gem In-Reply-To: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> References: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> Message-ID: <056.41b0f1b243a0828bb049a762ce097c9b@macosforge.org> #1262: Rack error calling [] in Faraday via the Octokit gem ------------------------------+--------------------------------------------- Reporter: sferik@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: github, octokit, rack, hubcap, 0.11-blocker ------------------------------+--------------------------------------------- Comment(by watson1978@?): The similar problems occur other than Hash. {{{ #!ruby class MyArray < Array def initialize @names = "foo" end end a1 = MyArray.new a1.instance_eval{ p @names } a2 = a1.dup a2.instance_eval{ p @names } }}} {{{ $ ruby19 ~/tmp/ttt.rb "foo" "foo" $ DYLD_LIBRARY_PATH=. ./macruby ~/tmp/ttt.rb "foo" nil }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 12 14:10:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 12 Jul 2011 21:10:04 -0000 Subject: [MacRuby] #1262: Rack error calling [] in Faraday via the Octokit gem In-Reply-To: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> References: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> Message-ID: <056.26cd2ea58409e0ea222eb649539f7b41@macosforge.org> #1262: Rack error calling [] in Faraday via the Octokit gem ------------------------------+--------------------------------------------- Reporter: sferik@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: github, octokit, rack, hubcap, 0.11-blocker ------------------------------+--------------------------------------------- Comment(by eloy.de.enige@?): The problem is that classes like Array and Hash have their own #dup implementation which don't copy the dynamically defined ivars. For instance, with the following naive patch, the last Array example works: https://gist.github.com/1078981 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 12 14:14:18 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 12 Jul 2011 21:14:18 -0000 Subject: [MacRuby] #1262: Rack error calling [] in Faraday via the Octokit gem In-Reply-To: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> References: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> Message-ID: <056.28cd744ece6b9037afbc6b7b903563c0@macosforge.org> #1262: Rack error calling [] in Faraday via the Octokit gem ------------------------------+--------------------------------------------- Reporter: sferik@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: github, octokit, rack, hubcap, 0.11-blocker ------------------------------+--------------------------------------------- Comment(by eloy.de.enige@?): Btw, a one line reduction: {{{ 1:% ./miniruby -e 'h = {}; h.instance_variable_set(:@answer, 42); p h.instance_variable_get(:@answer); p h.dup.instance_variable_get(:@answer)' 42 nil % ruby19 -e 'h = {}; h.instance_variable_set(:@answer, 42); p h.instance_variable_get(:@answer); p h.dup.instance_variable_get(:@answer)' 42 42 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 12 14:18:20 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 12 Jul 2011 21:18:20 -0000 Subject: [MacRuby] #1262: Rack error calling [] in Faraday via the Octokit gem In-Reply-To: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> References: <047.5ca341f2eab29b1803ecb9277131710d@macosforge.org> Message-ID: <056.a774f2fd39c78c5f7566936afbe228c3@macosforge.org> #1262: Rack error calling [] in Faraday via the Octokit gem ------------------------------+--------------------------------------------- Reporter: sferik@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: github, octokit, rack, hubcap, 0.11-blocker ------------------------------+--------------------------------------------- Comment(by eloy.de.enige@?): Updated the gist to cover Hash in the naive patch as well. {{{ % ./miniruby -e 'h = {}; h.instance_variable_set(:@answer, 42); p h.instance_variable_get(:@answer); p h.dup.instance_variable_get(:@answer)' 42 42 % ./miniruby -e 'a = []; a.instance_variable_set(:@answer, 42); p a.instance_variable_get(:@answer); p a.dup.instance_variable_get(:@answer)' 42 42 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 12 18:45:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 13 Jul 2011 01:45:15 -0000 Subject: [MacRuby] #972: RSpec 2.0.1 & Bundler rake task segfaults under MacRuby 0.7.1 In-Reply-To: <047.990520718669fe1017526adce8ff1145@macosforge.org> References: <047.990520718669fe1017526adce8ff1145@macosforge.org> Message-ID: <056.4753e3f8f5e14cb1d3ef66d894d67a03@macosforge.org> #972: RSpec 2.0.1 & Bundler rake task segfaults under MacRuby 0.7.1 ------------------------------+--------------------------------------------- Reporter: jon@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ------------------------------+--------------------------------------------- Comment(by scott@?): I'm encountering this problem while using the following: MacRuby nightly 2011-07-12 bundler - 1.1.pre.5 rake - from https://github.com/jimweirich/rake.git @ commit 6e3c542a2a38caeda625 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 13 21:36:38 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 14 Jul 2011 04:36:38 -0000 Subject: [MacRuby] #1358: Methods declared on a subclass of Module cannot be called Message-ID: <053.76290789f610704320f20f7fddb6436b@macosforge.org> #1358: Methods declared on a subclass of Module cannot be called ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- I am trying to create a module that overrides #alias_method so I can delay the method aliasing until a later time, but when I subclass Module and add methods I cannot call the method. Here is a reduction: {{{ class Foo < Module def test puts 'lol' end end foo = Foo.new foo.test # => NoMethodError: private method foo.instance_eval { test } # => ArgumentError: wrong number of arguments foo.module_eval { test } # => ArgumentError: wrong number of arguments }}} The same code works on CRuby in all cases, even though that seems weird. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 13 23:03:33 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 14 Jul 2011 06:03:33 -0000 Subject: [MacRuby] #1359: Aliased objective-c methods are not equal to their ruby aliases Message-ID: <053.70205a076d00b6ab6720f406acc8f1b7@macosforge.org> #1359: Aliased objective-c methods are not equal to their ruby aliases ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- I was writing a test case to check that a method was aliased correctly and ran across this: {{{ class NSURL alias_method :inspect, :absoluteString end class Test def one end alias_method :two, :one end test = Test.new url = NSURL.URLWithString('http://macruby.org/') test.method(:one) == test.method(:two) # => true url.method(:inspect) == url.method(:absoluteString) # => false }}} It seems that when I call `url.method(:inspect)` it returns the a different method "#" but if I #call that method it will do the correct thing. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 14 07:53:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 14 Jul 2011 14:53:58 -0000 Subject: [MacRuby] #1358: Methods declared on a subclass of Module cannot be called In-Reply-To: <053.76290789f610704320f20f7fddb6436b@macosforge.org> References: <053.76290789f610704320f20f7fddb6436b@macosforge.org> Message-ID: <062.a7136e88fc6e93cc40205603438cd53f@macosforge.org> #1358: Methods declared on a subclass of Module cannot be called ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Comment(by watson1978@?): This issue looks like related to #1108 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 14 07:57:55 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 14 Jul 2011 14:57:55 -0000 Subject: [MacRuby] #1358: Methods declared on a subclass of Module cannot be called In-Reply-To: <053.76290789f610704320f20f7fddb6436b@macosforge.org> References: <053.76290789f610704320f20f7fddb6436b@macosforge.org> Message-ID: <062.c75e1ef9a32349b6ff77a591664e2972@macosforge.org> #1358: Methods declared on a subclass of Module cannot be called ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Comment(by mrada@?): Oops. Yes, I guess it can be closed as a duplicate. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 14 22:18:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 15 Jul 2011 05:18:57 -0000 Subject: [MacRuby] #1360: require of nokogiri causes a segfault. Message-ID: <046.aa97c2abc39cfca874348cbd3071afb9@macosforge.org> #1360: require of nokogiri causes a segfault. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- MacRuby 0.10.0 or the nightly(2011-07-14), with nokogiri 1.5.0. Steps to reproduce: macirb -rubygems -r'nokogiri' -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 14 22:22:02 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 15 Jul 2011 05:22:02 -0000 Subject: [MacRuby] #1360: require of nokogiri causes a segfault. In-Reply-To: <046.aa97c2abc39cfca874348cbd3071afb9@macosforge.org> References: <046.aa97c2abc39cfca874348cbd3071afb9@macosforge.org> Message-ID: <055.cb5208f2c0587254cf635e0de739a31c@macosforge.org> #1360: require of nokogiri causes a segfault. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by watson1978@?): Please see http://www.macruby.org/trac/ticket/1308#comment:7 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 15 07:08:45 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 15 Jul 2011 14:08:45 -0000 Subject: [MacRuby] #1361: Using pg gem returns bus error Message-ID: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> #1361: Using pg gem returns bus error -------------------------------+-------------------------------------------- Reporter: tpitale@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: pg gem postgres -------------------------------+-------------------------------------------- Install macruby from git master. Install pg gem 0.11. macirb require 'rubygems' require 'pg' connection = PGconn.open(:dbname => 'somedb') connection.exec("LISTEN test1") # or any sql Bus error -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 15 07:10:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 15 Jul 2011 14:10:50 -0000 Subject: [MacRuby] #1361: Using pg gem returns bus error In-Reply-To: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> References: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> Message-ID: <057.c7c04233e68d8218aca85d871b670209@macosforge.org> #1361: Using pg gem returns bus error -------------------------------+-------------------------------------------- Reporter: tpitale@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: pg gem postgres -------------------------------+-------------------------------------------- Comment(by tpitale@?): https://gist.github.com/ba72b246154b87c7e642 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 15 07:36:42 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 15 Jul 2011 14:36:42 -0000 Subject: [MacRuby] #1361: Using pg gem returns bus error In-Reply-To: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> References: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> Message-ID: <057.1608301e51d982f9c002c1123d670470@macosforge.org> #1361: Using pg gem returns bus error -------------------------------+-------------------------------------------- Reporter: tpitale@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: pg gem postgres -------------------------------+-------------------------------------------- Comment(by watson1978@?): hmm, I can't reproduce in my environment. {{{ $ psql --version psql (PostgreSQL) 9.0.4 contains support for command-line editing $ cat test_pg.rb require 'rubygems' require 'pg' connection = PGconn.open(:dbname => 'test') puts connection.exec("LISTEN test1").result_status $ macruby test_pg.rb 1 }}} please attach a crash log. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 15 07:48:22 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 15 Jul 2011 14:48:22 -0000 Subject: [MacRuby] #1361: Using pg gem returns bus error In-Reply-To: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> References: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> Message-ID: <057.93c71cc6dc45c54b17585e7ef883dc70@macosforge.org> #1361: Using pg gem returns bus error -------------------------------+-------------------------------------------- Reporter: tpitale@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: pg gem postgres -------------------------------+-------------------------------------------- Comment(by tpitale@?): I'm rebuilding MacRuby from master now, this may be my own problem. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 15 08:15:38 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 15 Jul 2011 15:15:38 -0000 Subject: [MacRuby] #1361: Using pg gem returns bus error In-Reply-To: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> References: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> Message-ID: <057.0760cb29ec1d7d376a8e03650e9bb96b@macosforge.org> #1361: Using pg gem returns bus error -------------------------------+-------------------------------------------- Reporter: tpitale@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: pg gem postgres -------------------------------+-------------------------------------------- Comment(by tpitale@?): It seems to be a macirb thing. It's succeeding now the first time I run exec, but eventually it returns a Bus error or a segmentation fault. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 15 09:56:16 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 15 Jul 2011 16:56:16 -0000 Subject: [MacRuby] #1361: Using pg gem returns bus error In-Reply-To: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> References: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> Message-ID: <057.388ac7021b3f68107a895db823efd5d7@macosforge.org> #1361: Using pg gem returns bus error -------------------------------+-------------------------------------------- Reporter: tpitale@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: pg gem postgres -------------------------------+-------------------------------------------- Comment(by watson1978@?): I also got a crash within macirb. {{{ $ DYLD_LIBRARY_PATH=. gdb --args ./macruby /usr/local/bin/macirb irb(main):007:0> puts connection.exec("LISTEN test1").result_status Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0xfffffffdffd29f47 0x00000001000995bd in st_lookup (table=0x2002c5fa0, key=6, value=0x7fff5fbf5478) at st.c:298 298 hash_val = do_hash(key, table); (gdb) bt #0 0x00000001000995bd in st_lookup (table=0x2002c5fa0, key=6, value=0x7fff5fbf5478) at st.c:298 #1 0x00000001075ae1d5 in pgconn_get_client_encoding_as_rb_encoding (conn=) at pg.c:3778 #2 0x00000001075b4ccf in new_pgresult [inlined] () at /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/Gems/1.9.2/gems/pg-0.11.0/ext/pg.c:117 #3 0x00000001075b4ccf in pgconn_exec (argc=1, argv=, self=8592953824) at pg.c:1005 #4 0x0000000101761ee7 in ?? () #5 0x000000010012defb in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #6 0x000000010012defb in rb_vm_dispatch () at dispatcher.cpp:872 #7 0x0000000101702034 in ?? () #8 0x000000010176624e in ?? () #9 0x0000000100149cea in rb_vm_run (fname=0x2002aace0 "(irb)", node=0x2002dcaa0, binding=0x2000ffe80, inside_eval=true) at vm.cpp:4123 #10 0x000000010014a0ed in rb_vm_run_under () at vm.cpp:4230 #11 0x000000010014a2ff in rb_vm_eval_string (self=8590086944, klass=0, src=8592416064, binding=0x2000ffe80, file=0x2002aace0 "(irb)", line=7, should_push_outer=false) at vm.cpp:4274 #12 0x00000001000db459 in eval_string_with_should_push_outer (self=8590086944, klass=0, src=8592416064, scope=8592079744, file=0x2002aace0 "(irb)", line=7, should_push_outer=false) at vm_eval.c:299 #13 0x00000001000db528 in eval_string (self=8590086944, klass=0, src=8592416064, scope=8592079744, file=0x2002aace0 "(irb)", line=7) at vm_eval.c:320 #14 0x00000001000db8f2 in rb_f_eval (self=8590086944, sel=0x100f27180, argc=4, argv=0x7fff5fbf7938) at vm_eval.c:441 #15 0x000000010012defb in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #16 0x000000010012defb in rb_vm_dispatch () at dispatcher.cpp:872 #17 0x00000001012a16f5 in dyld_stub_strncpy () #18 0x00000001012a2adf in MREP_519E9DD5E8BC4C729284F20BE045241F () #19 0x000000010012e5c4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:165 #20 0x000000010012e5c4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #21 0x000000010012e5c4 in rb_vm_dispatch () at dispatcher.cpp:872 #22 0x00000001012a16f5 in dyld_stub_strncpy () #23 0x00000001012a329f in MREP_519E9DD5E8BC4C729284F20BE045241F () #24 0x000000010012e52e in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:161 #25 0x000000010012e52e in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #26 0x000000010012e52e in rb_vm_dispatch () at dispatcher.cpp:872 #27 0x00000001012a16f5 in dyld_stub_strncpy () #28 0x00000001012a3ba7 in MREP_519E9DD5E8BC4C729284F20BE045241F () #29 0x000000010012e52e in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:161 #30 0x000000010012e52e in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #31 0x000000010012e52e in rb_vm_dispatch () at dispatcher.cpp:872 #32 0x00000001035de385 in dyld_stub_strncpy () #33 0x00000001035dfa22 in MREP_88F39853BC014BDD9242BFD103DB6765 () #34 0x000000010012e52e in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:161 #35 0x000000010012e52e in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #36 0x000000010012e52e in rb_vm_dispatch () at dispatcher.cpp:872 #37 0x00000001035de385 in dyld_stub_strncpy () #38 0x00000001035dfdde in MREP_88F39853BC014BDD9242BFD103DB6765 () #39 0x000000010012e52e in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:161 #40 0x000000010012e52e in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #41 0x000000010012e52e in rb_vm_dispatch () at dispatcher.cpp:872 #42 0x00000001035de385 in dyld_stub_strncpy () #43 0x00000001035e0095 in MREP_88F39853BC014BDD9242BFD103DB6765 () #44 0x000000010012e56f in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:163 #45 0x000000010012e56f in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #46 0x000000010012e56f in rb_vm_dispatch () at dispatcher.cpp:872 #47 0x0000000101702034 in ?? () #48 0x0000000101700ded in ?? () #49 0x0000000101700321 in ?? () #50 0x000000010170017a in ?? () #51 0x0000000100149cea in rb_vm_run (fname=0x2000a7be0 "/usr/local/bin/macirb", node=0x2000b4ec0, binding=0x0, inside_eval=false) at vm.cpp:4123 #52 0x000000010002858b in ruby_run_node (n=0x2000b4ec0) at eval.c:211 #53 0x0000000100000be3 in main (argc=2, argv=0x100f1c030, envp=0x7fff5fbfde50) at main.cpp:40 Current language: auto; currently c (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 15 10:06:22 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 15 Jul 2011 17:06:22 -0000 Subject: [MacRuby] #1361: Using pg gem returns bus error In-Reply-To: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> References: <048.8bf32b95d99486989a9a72e747b4778b@macosforge.org> Message-ID: <057.b82eb57e13a51b711b5b4291501b3b9f@macosforge.org> #1361: Using pg gem returns bus error -------------------------------+-------------------------------------------- Reporter: tpitale@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: pg gem postgres -------------------------------+-------------------------------------------- Comment(by watson1978@?): Maybe, I guess that pg gem needs the write barrier at https://bitbucket.org/ged/ruby-pg/src/3d744d9776c3/ext/pg.c#cl-4089 [[BR]] I guess this issue is same as http://www.macruby.org/trac/ticket/1308#comment:9 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 15 20:43:18 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 16 Jul 2011 03:43:18 -0000 Subject: [MacRuby] #1360: require of nokogiri causes a segfault. In-Reply-To: <046.aa97c2abc39cfca874348cbd3071afb9@macosforge.org> References: <046.aa97c2abc39cfca874348cbd3071afb9@macosforge.org> Message-ID: <055.bc7decb9a46236400d03c4d24a7c29e3@macosforge.org> #1360: require of nokogiri causes a segfault. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by rob@?): Thanks for the reply Watson! OK, it doesn't sound like it'll be a easy fix, too bad :-( (I would love to use Nokogiri with MacRuby) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 15 20:56:47 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 16 Jul 2011 03:56:47 -0000 Subject: [MacRuby] #1360: require of nokogiri causes a segfault. In-Reply-To: <046.aa97c2abc39cfca874348cbd3071afb9@macosforge.org> References: <046.aa97c2abc39cfca874348cbd3071afb9@macosforge.org> Message-ID: <055.670b91ae456c051a54b26a52dc6d9861@macosforge.org> #1360: require of nokogiri causes a segfault. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by rob@?): Do you think my issue is directly related to the other ticket? In the example on that ticket, it looks like nokogiri can be required and some sample code run, but for me i can't require nokogiri without an segfault straight away. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jul 16 17:29:52 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 17 Jul 2011 00:29:52 -0000 Subject: [MacRuby] #1362: segfault with "rake test" Message-ID: <049.9016d806020a84c06d8ef6e478318ebc@macosforge.org> #1362: segfault with "rake test" --------------------------------+------------------------------------------- Reporter: austin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- On the latest Text::Format code (https://github.com/halostatue/text- format), when I run "rake test" (hoe required), I get a segfault: 3399 text-hyphen ? rake test /Library/Frameworks/MacRuby.framework/Versions/0.10/usr/bin/macruby -w -Ilib:bin:test:. -e 'require "rubygems"; require "test/unit"; require "test/test_bugs.rb"; require "test/test_text_hyphen.rb"' -- zsh: segmentation fault rake test rake test 8.48s user 0.38s system 69% cpu 12.683 total -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jul 16 19:25:41 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 17 Jul 2011 02:25:41 -0000 Subject: [MacRuby] #1362: segfault with "rake test" In-Reply-To: <049.9016d806020a84c06d8ef6e478318ebc@macosforge.org> References: <049.9016d806020a84c06d8ef6e478318ebc@macosforge.org> Message-ID: <058.b0f21a531b8d50a20ffc759928976414@macosforge.org> #1362: segfault with "rake test" --------------------------------+------------------------------------------- Reporter: austin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by mrada@?): If you have hoe, then you also have a rake from ruby gems. The stock rake gem has problems with MacRuby, specifically what you are talking about (I have this issue frequently). So I think that might be the problem here. A workaround you could try is to uninstall rake from rubygems and to edit the installed gemspec for hoe so that it does not depend on rake. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 19 11:23:16 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 19 Jul 2011 18:23:16 -0000 Subject: [MacRuby] #1363: macirb "framework 'AppKit' results in segfault Message-ID: <050.7efe924d149dc9e85e79fb3f2a462b51@macosforge.org> #1363: macirb "framework 'AppKit' results in segfault ---------------------------------+------------------------------------------ Reporter: will@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ This happened with the last stable version, then I updated to the newest nightly, and it is still happening. ~ ? macirb >> framework "AppKit" [1] 2582 segmentation fault macirb ~ ? macirb -v DietRB (0.6.1) ~ ? macruby -v MacRuby 0.10 (ruby 1.9.2) [universal-darwin10.0, x86_64] ~ ? uname -a Darwin nott.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64 ~ ? macruby -v MacRuby 0.11 (ruby 1.9.2) [universal-darwin10.0, x86_64] ~ ? macirb >> framework 'AppKit' [1] 2711 segmentation fault macirb ~ ? macirb -v DietRB (0.6.1) This works fine though ~ ? macruby -e 'framework "AppKit"' ~ ? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 19 13:00:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 19 Jul 2011 20:00:35 -0000 Subject: [MacRuby] #1363: macirb "framework 'AppKit' results in segfault In-Reply-To: <050.7efe924d149dc9e85e79fb3f2a462b51@macosforge.org> References: <050.7efe924d149dc9e85e79fb3f2a462b51@macosforge.org> Message-ID: <059.89f08864ca2dd2c6e7ed79cc96f37530@macosforge.org> #1363: macirb "framework 'AppKit' results in segfault ---------------------------------+------------------------------------------ Reporter: will@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by will@?): I was on xcode 3. I just installed xcode 4, and still have this problem -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 19 13:04:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 19 Jul 2011 20:04:44 -0000 Subject: [MacRuby] #1363: macirb "framework 'AppKit' results in segfault In-Reply-To: <050.7efe924d149dc9e85e79fb3f2a462b51@macosforge.org> References: <050.7efe924d149dc9e85e79fb3f2a462b51@macosforge.org> Message-ID: <059.400ecc18261d2e03d14e676df263471d@macosforge.org> #1363: macirb "framework 'AppKit' results in segfault ---------------------------------+------------------------------------------ Reporter: will@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by mrada@?): Just taking a guess here, but what customizations do you have in your ~/.irbrc file? Also, the crash report might be useful (look in ~/Logs/CrashReporter). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 19 13:08:28 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 19 Jul 2011 20:08:28 -0000 Subject: [MacRuby] #1363: macirb "framework 'AppKit' results in segfault In-Reply-To: <050.7efe924d149dc9e85e79fb3f2a462b51@macosforge.org> References: <050.7efe924d149dc9e85e79fb3f2a462b51@macosforge.org> Message-ID: <059.9f99c437f9b895c80e90fbccb15a2f5c@macosforge.org> #1363: macirb "framework 'AppKit' results in segfault ---------------------------------+------------------------------------------ Reporter: will@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by will@?): irbrc was it. I renamed it, and the segfualt went away. I should have been clued into that, since for macirb I had to wrap my requires the LoadError rescue I haven't tracked down which of these things cause that to happen, but here is what I have. {{{ #!/usr/bin/ruby begin require 'irb/completion' require 'irb/ext/save-history' require 'rubygems' require 'interactive_editor' rescue LoadError end IRB.conf[:SAVE_HISTORY] = 1000 IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history" IRB.conf[:PROMPT_MODE] = :SIMPLE IRB.conf[:AUTO_INDENT] = true class Object # list methods which aren't in superclass def local_methods(obj = self) (obj.methods - obj.class.superclass.instance_methods).sort end # print documentation # # ri 'Array#pop' # Array.ri # Array.ri :pop # arr.ri :pop def ri(method = nil) unless method && method =~ /^[A-Z]/ # if class isn't specified klass = self.kind_of?(Class) ? name : self.class.name method = [klass, method].compact.join('#') end puts `ri '#{method}'` end end def copy(str) IO.popen('pbcopy', 'w') { |f| f << str.to_s } end def paste `pbpaste` end load File.dirname(__FILE__) + '/.railsrc' if $0 == 'irb' && ENV['RAILS_ENV'] }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 20 15:18:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 20 Jul 2011 22:18:04 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.b03512701e2b8feca4b42897b404aff1@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by sean@?): So, Lion went public today.... You can't use Xcode 4.0.x with Lion and MacRuby is broken with Xcode 4.1 and 4.2. This is a pretty sad state of affairs for MacRuby. You can't give Apple your $30 and use their latest OS if you want to develop with MacRuby. PowerPC development and MacRuby development are on the same footing? I'd love to get an update on this. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 20 15:20:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 20 Jul 2011 22:20:10 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.ab9f053170b000df04232c4c1c50914e@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by eric@?): All of my attempts at any form of communication seem to have fallen on deaf ears. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 21 00:47:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 21 Jul 2011 07:47:57 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.fd0ed647e4e2ca6816964a332640f693@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by lsansonetti@?): It looks like Xcode breaks the rb_nibtool utility, we will have to investigate. It's a shame but there is obviously a workaround, which consists of adding the outlets and actions by yourself in the IB view. MacRuby works fine on Lion otherwise, as a matter of fact I lived on Lion since its inception and kept developing MacRuby on it :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 21 12:41:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 21 Jul 2011 19:41:14 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.f0906eaee9726b5dd06ac14a0652f9f8@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by rolando@?): How would you do that? I mean add the outlets and actions by ourself? poking in the XIB? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 21 20:06:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 22 Jul 2011 03:06:58 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.40178e38dc61294fa0ff75cf79130174@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by rolando@?): So... I've been trying to make it work and so far the only way is to connect the outlets on runtime, but it's far from the ideal scenario. Just for the sake of trying to fix it, how was rb_nibtool called from IB? I have some time this weekend and I'll love to have a functional xcode 4.2 + macruby working -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 21 22:03:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 22 Jul 2011 05:03:04 -0000 Subject: [MacRuby] #1364: NameError: uninitialized class variable in NSObject Message-ID: <060.4b320934a4b3bcec8141fd746b2ef702@macosforge.org> #1364: NameError: uninitialized class variable in NSObject -------------------------------------------+-------------------------------- Reporter: satoh@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: class variables, @@ -------------------------------------------+-------------------------------- satoh-MBP:trunk satounorio$ rvm use macruby Using /Users/satounorio/.rvm/gems/macruby-0.10 satoh-MBP:trunk satounorio$ irb irb(main):001:0> module M irb(main):002:1> @@hello = "hello" irb(main):003:0> end => "hello" irb(main):004:0> include M => NSObject irb(main):005:0> @@hello NameError: uninitialized class variable @@hello in NSObject irb(main):006:0> M.class_variables_get(:@@hello) NoMethodError: undefined method `class_variables_get' for M:Class irb(main):007:0> M.class_variable_get(:@@hello) => "hello" irb(main):008:0> -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 21 22:16:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 22 Jul 2011 05:16:54 -0000 Subject: [MacRuby] #1365: in `new': must be called with a block (ThreadError) Message-ID: <060.c6b6f8e7f05e9b4ddc92e2f5d824375b@macosforge.org> #1365: in `new': must be called with a block (ThreadError) -------------------------------------------+-------------------------------- Reporter: satoh@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: Thread.new, call -------------------------------------------+-------------------------------- I {{{ , [2011-07-20T15:32:12.259415 #22560] INFO -- : Running with MacRuby 0.10 (ruby 1.9.2) [universal-darwin10.0, x86_64] macruby /Users/satounorio/dionea/dionea/branches/2011-branch/dionea- ruby19/dioneas.rb:20:in `new': must be called with a block (ThreadError) ===excerpt (line 20 is the 4th line below=== Original_thread_new = Thread.method(:new) class Thread def self.new(*args, &block) t = Dionea::Original_thread_new.call(args, block) {|args, block| str_msg = "Dionea.debugger should not be nil" #Dionea::Log.debug "New thread has been created #{Thread.current}" if Dionea.debugger.class == nil.class then Dionea::Log.error str_msg raise str_msg end threadID = Dionea.debugger.set_thread(block.binding) if RUBY_VERSION >= '1.9' #$stderr.print "DBG: Trying set_trace_func: debuggee threads \n" Thread.current.set_trace_func(Dionea.debugger.traceFunc) unless threadID == 0 end begin block.call(*args) #, &block) ensure unless threadID == 0 then Dionea.debugger.unset_thread(threadID) end end } t end#Thread.new(*args, &block) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 22 11:09:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 22 Jul 2011 18:09:53 -0000 Subject: [MacRuby] #1366: Lion/XCode 4.1 update breaks IB Message-ID: <051.2026aa4511ed9a26894df196e364a1ac@macosforge.org> #1366: Lion/XCode 4.1 update breaks IB ----------------------------------+----------------------------------------- Reporter: paolo.bosetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: XCode ----------------------------------+----------------------------------------- After LION and Xcode 4.1 update, the XIB editor does not show anymore the available IBActions and IBOutlets from macruby classes. So, right-drag from controls to class placeholders or vice versa does not pops up the usual HUD miniwindow offering the available outlets. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 22 15:09:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 22 Jul 2011 22:09:35 -0000 Subject: [MacRuby] #1366: Lion/XCode 4.1 update breaks IB In-Reply-To: <051.2026aa4511ed9a26894df196e364a1ac@macosforge.org> References: <051.2026aa4511ed9a26894df196e364a1ac@macosforge.org> Message-ID: <060.7fc88b9882ad9f6e59ec238a76daa6f9@macosforge.org> #1366: Lion/XCode 4.1 update breaks IB ----------------------------------+----------------------------------------- Reporter: paolo.bosetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: XCode ----------------------------------+----------------------------------------- Comment(by paolo.bosetti@?): Oops! Just noticed this previous ticket http://www.macruby.org/trac/ticket/1322. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 22 17:22:12 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 23 Jul 2011 00:22:12 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.3e55ae83aa496b21f6c2939b20fcd98d@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by paolo.bosetti@?): @rolando: yes I remember that the old InterfaceBuilder offered the possibility to manually add outlets and actions, but I can't figure out how to do that on Xcode 4.2... apart of adding them programmatically, of course. I actually just found a workaround: 1. create an Objective-C class (.m/.h files) with the same name of the ruby class of your controller. MacRuby will override the methods you define here. 2. open your nib viewer, and using the assistant open side by side the Obj-C interface file. 3. right-drag from your controller to the interface file (yes into the code view): when you release the mouse, a popover will appear asking you what do you want to create (outlet or action) and what has to be its name. 4. for actions, you can safely leave the implementation empty. 5. now in the NIB viewer you can connect your actions/outlet as usual. Since the ruby classes get parsed AFTER the ObjC ones, the action methods you will define in ruby will override the (empty) methods you created above. Let me know if it works for you. The good of this workaround is that when the bug will be solved, you will only have to delete the ObjC files. Or you can keep them and implement there some specific task, of course. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 25 09:42:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 25 Jul 2011 16:42:37 -0000 Subject: [MacRuby] #1367: Crashes when invoked a Mutex#synchronize in non-MainThread Message-ID: <051.c4139450ad7e96b0f047952b1d2a3813@macosforge.org> #1367: Crashes when invoked a Mutex#synchronize in non-MainThread ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby mutex = Mutex.new Thread.new { mutex.synchronize do end } }}} Result: {{{ $ DYLD_LIBRARY_PATH=. ./miniruby ~/tmp/t.rb Assertion failed: (errorcode == 0), function setInstance, file ThreadLocal.cpp, line 62. zsh: abort DYLD_LIBRARY_PATH=. ./miniruby ~/tmp/t.rb }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 25 13:48:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 25 Jul 2011 20:48:24 -0000 Subject: [MacRuby] #1180: REQUEST: set rubygems to allow gem activation on *.rbo files In-Reply-To: <053.048392ee05b9117b8c84b148d5afe86a@macosforge.org> References: <053.048392ee05b9117b8c84b148d5afe86a@macosforge.org> Message-ID: <062.1bf9f7cdbcc0bcb60f3972cbbe3da304@macosforge.org> #1180: REQUEST: set rubygems to allow gem activation on *.rbo files ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by scott@?): The [http://polyglot.rubyforge.org/ polyglot gem] introduces a clever way to solve this problem. Replying to [ticket:1180 mrada@?]: > Rubygems will only be able to activate a gem if the require string is the exact file name, or if the string plus a set of predefined file suffixes exactly matches a file. > > In the case of a compiled gem where the original *.rb files have been removed, rubygems will think that the file does not exist. This can be worked around by using #gem first to avoid the code path that rubygems would normally take when trying to find a file in a gem and simply activate the gems paths. > > A better solution would be to add '.rbo' to the list of known file suffixes. However, with rubygems 1.4.2, the list of suffixes is static, so the list would have to be directly edited. > > Around rubygems 1.6.0, the list of suffixes became an instance variable which can modified from the MacRuby specific defaults file. > > I've made the changes in my fork of MacRuby on github: > https://github.com/ferrous26/MacRuby/commit/09cc3e656072f2c2d75de95b00b5eb5d5cc4a13e -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 25 14:08:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 25 Jul 2011 21:08:34 -0000 Subject: [MacRuby] #1368: [BUG] unknown Objective-C immediate: 0x1 (nil) Message-ID: <053.8b1c65011138f1edd52e661e9e264fd4@macosforge.org> #1368: [BUG] unknown Objective-C immediate: 0x1 (nil) ------------------------------------+--------------------------------------- Reporter: jacob@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- I suspect it is a poorly initialized constant in the foundation framework. The fault is 100% repeatable on my sandy bridge i5 macbook air (osx 10.7). {{{ /~$ macirb irb(main):001:0> framework 'foundation' => true irb(main):002:0> Object.constants.each { |s| s = eval(s.to_s) } unknown: [BUG] unknown Objective-C immediate: 0x1 (nil) MacRuby 0.10 (ruby 1.9.2) [universal-darwin10.0, x86_64] Illegal instruction: 4 #0 0x00007fff8d43ece2 in __pthread_kill () #1 0x00007fff8f78b7d2 in pthread_kill () #2 0x0000000100a4ca56 in LLVMLinkInJIT () #3 0x000000010002e0cd in rb_bug () #4 0x00000001000e4411 in rb_objc_convert_immediate () #5 0x0000000101f02a0e in ?? () #6 0x00000001000fbfbc in rb_vm_resolve_const_value () #7 0x00000001000ddf76 in rb_mod_remove_const () #8 0x0000000100146124 in rb_vm_const_lookup_level () #9 0x0000000101f019b9 in ?? () }}} The critical symbol seems to be KLSSharedFileListItemBeforeFirst {{{ irb(main):001:0> framework 'foundation' => true irb(main):002:0> KLSSharedFileListItemBeforeFirst unknown: [BUG] unknown Objective-C immediate: 0x1 (nil) MacRuby 0.10 (ruby 1.9.2) [universal-darwin10.0, x86_64] Abort trap: 6 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jul 25 14:49:23 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 25 Jul 2011 21:49:23 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.ef5e662f87b7eb88f5879ea34b1eb23f@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by magnars@?): CC me! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jul 26 22:21:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 27 Jul 2011 05:21:10 -0000 Subject: [MacRuby] #1369: ArgumentError (and some friends) do not always provide a backtrace Message-ID: <053.cb1b6f846c270dea730745e3cf5f5c33@macosforge.org> #1369: ArgumentError (and some friends) do not always provide a backtrace ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- It is sometimes possible for backtrace information to be left out of an error message. I have observed this problem with ArgumentError and NameError. It is possible to workaround the issue using some code from Eloy given in this gist: https://gist.github.com/1107314 Though, I am having some difficulty reducing the problem to a nice test case right now. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 27 11:26:18 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 27 Jul 2011 18:26:18 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.2c2d034f997a1d3bed805ebe28d1a30f@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by mattaimonetti@?): I opened a new radar: 9850538 Please do the same. In the meantime, I will look for a workaround. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 27 11:39:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 27 Jul 2011 18:39:32 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.255a55210cb9e5da8554ac3c1ff77e5f@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by paolo.bosetti@?): Replying to [comment:14 mattaimonetti@?]: > I opened a new radar: 9850538 Please do the same. In the meantime, I will look for a workaround. What is a radar? How I'd open new one? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 27 11:47:29 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 27 Jul 2011 18:47:29 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.f27531afdce45926b4eb39abace9990e@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by eric@?): I don't explicitly see how opening a Radar will have any real affect in this. The Macruby.org framework is different from the Macruby framework that comes bundled with Lion (especially since the bundled framework is private). They inherently are for the same thing, but if you want to develop and release an application using Macruby, you have to download and install it, so Apple really would have no interest in supporting outside developers. On top of that, this is not the first time a new Xcode build has broken Macruby support with IB. I believe the initial release from 3 to 4 did the same thing, and it was a thing that the Macruby team had to resolve the issue. Somebody correct me if I am wrong, but this seems like something the Macruby team will have to fix, not Apple. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 27 12:04:25 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 27 Jul 2011 19:04:25 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.69090c24fd94dbeae3fcbcc5bfa180f8@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by mrada@?): To open a radar, go to bugreporter.apple.com/ and login using your apple developer credentials. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 27 12:08:19 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 27 Jul 2011 19:08:19 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.f3b1ba3b33f29e6552325ec86311165f@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by mattaimonetti@?): @Eric, sorry but you are wrong ;) Xcode calls rb_nibtool to provice Xcode with the actions and outlets available and recently the Xcode team removed this call, breaking MacRuby support. We (the MacRuby team) don't have control over Xcode and therefore can't fix the problem without some crazy workarounds. Radars are ways for developers to let Apple know that we encountered an issue and need their assistance. It is critical for developers to file radars to increase the awareness around a given problem. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 27 12:12:43 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 27 Jul 2011 19:12:43 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.4d8bb424e2dcd4f3a1e188aa213027ba@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by eric@?): @Mattaimonetti I stand corrected :) Filing a radar now. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 27 12:17:45 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 27 Jul 2011 19:17:45 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.fcfece60c6615555b824729a39f1a0f5@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by paolo.bosetti@?): Just filed one me too. I just did not know them as "radars", always called them "bug reports" ;) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jul 27 12:18:59 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 27 Jul 2011 19:18:59 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.1a91f1f0e3eaa0aff457de8aa2fc37bc@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by paolo.bosetti@?): BTW, the workaround I described above for me actually works fine, I'm still using it without any problem. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jul 28 17:16:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 29 Jul 2011 00:16:48 -0000 Subject: [MacRuby] #1356: Segfault occurs when invoked a Pointer.new within some threads. In-Reply-To: <051.a41431aedf8f2eafcbf10a2543982c09@macosforge.org> References: <051.a41431aedf8f2eafcbf10a2543982c09@macosforge.org> Message-ID: <060.83b1aebd2cd5c2587d82f7e582894429@macosforge.org> #1356: Segfault occurs when invoked a Pointer.new within some threads. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Fixed with https://github.com/MacRuby/MacRuby/commit/c01342ab56fac9d48ac8a3b5033119f070ebe8b1 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jul 29 08:28:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 29 Jul 2011 15:28:15 -0000 Subject: [MacRuby] #1370: __FILE__ is different for compiled code Message-ID: <053.eb2288f72d57cf3f54664def7c4cfbf2@macosforge.org> #1370: __FILE__ is different for compiled code ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Use of the special __FILE__ variable changes between the JIT and AOT version of its usage. When using AOT code, only the name of the file is given, not the full path. Demo code: {{{ def bug! puts __FILE__ puts File.dirname(__FILE__) puts File.expand_path(__FILE__) end bug! Dir.chdir '/Users/Shared' do bug! end Dir.chdir '/Library/LaunchDaemons' do bug! end }}} First run the code using JIT, the same output will be repeated for each directory change. Then compile the code using macrubyc and run the compiled version, the output will be different each time. JIT: {{{ /Users/mrada/bug3.rb /Users/mrada /Users/mrada/bug3.rb /Users/mrada/bug3.rb /Users/mrada /Users/mrada/bug3.rb /Users/mrada/bug3.rb /Users/mrada /Users/mrada/bug3.rb }}} AOT: {{{ bug3.rb . /Users/mrada/bug3.rb bug3.rb . /Users/Shared/bug3.rb bug3.rb . /Library/LaunchDaemons/bug3.rb }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 31 00:24:06 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 31 Jul 2011 07:24:06 -0000 Subject: [MacRuby] #1370: __FILE__ is different for compiled code In-Reply-To: <053.eb2288f72d57cf3f54664def7c4cfbf2@macosforge.org> References: <053.eb2288f72d57cf3f54664def7c4cfbf2@macosforge.org> Message-ID: <062.9234449aac48f6191760ca9499095de1@macosforge.org> #1370: __FILE__ is different for compiled code ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Comment(by watson1978@?): This issue seems to duplicate #721. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 31 12:14:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 31 Jul 2011 19:14:35 -0000 Subject: [MacRuby] #721: Compiled ruby files return incorrect values for __FILE__ In-Reply-To: <050.bee6b8b1a61a678516c8c6b7365e1f44@macosforge.org> References: <050.bee6b8b1a61a678516c8c6b7365e1f44@macosforge.org> Message-ID: <059.70395b7b99fbf57dc342eb14a7d022fb@macosforge.org> #721: Compiled ruby files return incorrect values for __FILE__ ---------------------------------+------------------------------------------ Reporter: mred@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby Later Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by mrada@?): I duplicated this issue with ticket #1370. I was testing out a compiled Hot Cocoa. I hacked up a work around for that particular case that should work for most other cases: https://github.com/ferrous26/hotcocoa/commit/8e38eb2546e3385e2f934577bd852154d6980f6c It is based on the fact that $LOADED_FEATURES keeps the absolute path for loaded files. I think a similar bit of code could fix this issue if it is possible to set `__FILE__` at load time using whatever code is already being used to add the file name to $LOADED_FEATURES. I haven't looked into it though... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jul 31 18:47:05 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 01 Aug 2011 01:47:05 -0000 Subject: [MacRuby] #542: Attempt to unlock a mutex which is not locked (ThreadError) In-Reply-To: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> References: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> Message-ID: <063.d6aa3360bdbfbcb3d7a4e998c9911d27@macosforge.org> #542: Attempt to unlock a mutex which is not locked (ThreadError) -------------------------------------+-------------------------------------- Reporter: valerii.hiora@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by jhemmelg@?): OK, I was looking further into this. It looks like the mutex is not re- locked when cond.wait returns in the main thread. The synchronize method then tries to unlock it and finds it already unlocked. The documentation for ConditionVariable::wait claims to re-lock the mutex on wakeup. I can't see where that is supposed to be happening. It may be some magic with the thread wakeup logic, but I can't see it in either the macruby code or the cruby 1.9.2 code. I'll try to keep digging but I wouldn't be disappointed if someone else figures it out first. -- Ticket URL: MacRuby