[MacRuby] #1343: autotest-fsevent AND autotest-growl causes SegFault
#1343: autotest-fsevent AND autotest-growl causes SegFault -----------------------------+---------------------------------------------- Reporter: kykim@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- install gems: autotest-standalone (or ZenTest) autotest-fsevent autotest-growl create .autotest: require 'autotest/fsevent'[[BR]] require 'autotest/growl' run autotest: DYLD_LIBRARY_PATH=. ./macruby -I./lib -rubygems `which autotest` Segmentation fault 1) Segmentation fault does not always occur, sometimes program exits[[BR]] 2) reverse order of requires in .autotest file, program usually exits[[BR]] 3) .autotest of autotest/fsevent only, exits[[BR]] 4) .autotest of autotest/growl only appears to work properly[[BR]] I'd happily try to debug and/or provide more info, but I'm unsure how to proceed, any pointers/directions are appreciated. -- Ticket URL: <http://www.macruby.org/trac/ticket/1343> MacRuby <http://macruby.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 eloy.de.enige@…): Which autotest-fsevents are you using? This one: https://github.com/svoop /autotest-fsevent ? -- Ticket URL: <http://www.macruby.org/trac/ticket/1343#comment:1> MacRuby <http://macruby.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 assume i am. i installed via "macgem install autotest-fsevent", which should pull from rubygems.org (which should pull that one) -- Ticket URL: <http://www.macruby.org/trac/ticket/1343#comment:2> MacRuby <http://macruby.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 eloy.de.enige@…): Can you try to find a reproducible segfault script and/or run it with gdb and a few backtraces when a segfault occurs? -- Ticket URL: <http://www.macruby.org/trac/ticket/1343#comment:3> MacRuby <http://macruby.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: <http://www.macruby.org/trac/ticket/1343#comment:4> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby