#511: GCD crash with indirect method access ---------------------------------------+------------------------------------ Reporter: joshua.balla...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: GCD ---------------------------------------+------------------------------------
Old description: > The following code will crash when I run it on my Mac Pro (8x2.26 GHz): > > {{{ > #!/usr/local/bin/macruby > > class Foo > def doit > end > end > > class Bar > def initialize > @foo = Foo.new > end > > def step > @foo.doit > end > end > > @bars = [] > 1000.times { @bars << Bar.new } > > steps = Dispatch::Group.new > @bars.each do |bar| > Dispatch::Queue.concurrent.async(steps) { bar.step } > end > steps.wait > }}} > > Commenting out the "@foo.doit" line prevents the crash. New description: The following code will crash when I run it on my Mac Pro (8x2.26 GHz): {{{ #!/usr/local/bin/macruby class Foo def doit end end class Bar def initialize @foo = Foo.new end def step 100.times{ @foo.doit } end end @bars = [] 1000.times { @bars << Bar.new } steps = Dispatch::Group.new @bars.each do |bar| Dispatch::Queue.concurrent.async(steps) { bar.step } end steps.wait }}} Commenting out the "@foo.doit" line prevents the crash. -- Comment(by joshua.balla...@…): Adding repetitions inside of "step" makes it crash more regularly. -- Ticket URL: <http://www.macruby.org/trac/ticket/511#comment:4> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel