Skip to content
Snippets Groups Projects
  1. Feb 19, 2015
    • Lars Kanis's avatar
    • Lars Kanis's avatar
      Discard borrowed object wrappers after method calls into Ruby. · 54a11707
      Lars Kanis authored
      This solves crashes of kind:
      	[BUG] rb_gc_mark(): 0x00000003f54af8 is T_ZOMBIE
      
      All parameters to Ruby event blocks or overloaded methods are converted to
      proper Ruby classes or wrapped by appropriate wrapper classes for borrowed
      objects. The wrapper classes are registered, to keep the connection between
      C-pointer (the borrowed object) and the wrapping Ruby object. This connection
      is canceled either when the borrowed object is destroyed or the Ruby wrapper
      is free'd. If neither of them happens, the wrapper object is re-used for the
      next call.
      
      This worked good with Ruby-1.8, which has one big mark and sweep run.
      Ruby-2.2 introduced incremental GC and has several mark and sweep runs, so
      that marks and sweeps are quite independent. Therefor we re-used objects,
      that are already maked for sweeping (so called T_ZOMBIE).
      
      This patch releases the connection between borrowed object and it's wrapper
      object after each call into Ruby code. Therefore the wrapper object isn't
      re-used, but a new one is created for each param to each call. The wrapper
      objects are later free'd by the GC. This patch could have a negative
      performance impact.
      54a11707
  2. Feb 18, 2015
  3. Feb 17, 2015
  4. Feb 16, 2015
  5. Feb 14, 2015
  6. Jul 09, 2014
  7. Mar 17, 2014
  8. Mar 16, 2014
  9. Mar 15, 2014
  10. Mar 14, 2014
  11. Mar 13, 2014
  12. Dec 20, 2013
  13. Dec 19, 2013
  14. Oct 02, 2013
  15. Sep 28, 2013
    • Lars Kanis's avatar
      Bump VERSION to 1.6.29 · f6d7188c
      Lars Kanis authored
      f6d7188c
    • Lars Kanis's avatar
      Manage GC'ing of FXTreeItem the same way as for FXFolderItem. · e36631d2
      Lars Kanis authored
      This fixes issue #10.
      
      Stacktrace was:
      ==4561== Invalid read of size 8
      ==4561==    at 0x4F726FF: st_lookup (st.c:414)
      ==4561==    by 0x4FCEAD6: rb_method_entry_get_without_cache (vm_method.c:182)
      ==4561==    by 0x4FD94E5: rb_funcall (vm_eval.c:315)
      ==4561==    by 0x810DAF2: FXRbCallVoidMethod(FX::FXObject*, unsigned long) (in /home/lars/.rvm/gems/ruby-2.0.0-p247/gems/fxruby-1.6.28/lib/fox16_c.so)
      ==4561==    by 0x81AC98E: FXRbTreeList::recalc() (in /home/lars/.rvm/gems/ruby-2.0.0-p247/gems/fxruby-1.6.28/lib/fox16_c.so)
      ==4561==    by 0x8FC78DC: FX::FXTreeList::removeItems(FX::FXTreeItem*, FX::FXTreeItem*, unsigned char) (FXTreeList.cpp:2340)
      ==4561==    by 0x8FC7916: FX::FXTreeList::removeItem(FX::FXTreeItem*, unsigned char) (FXTreeList.cpp:2347)
      ==4561==    by 0x829ED0F: FXRbTreeItem::freefunc(FX::FXTreeItem*) (in /home/lars/.rvm/gems/ruby-2.0.0-p247/gems/fxruby-1.6.28/lib/fox16_c.so)
      ==4561==    by 0x4EBA505: finalize_list (gc.c:1415)
      ==4561==    by 0x4EC15A3: rb_gc_call_finalizer_at_exit (gc.c:1552)
      ==4561==    by 0x4EA8064: ruby_cleanup (eval.c:127)
      ==4561==    by 0x4EA8292: ruby_run_node (eval.c:307)
      ==4561==  Address 0x74fb894853ff8550 is not stack'd, malloc'd or (recently) free'd
      ==4561==
      segfault_on_close.rb: [BUG] Segmentation fault
      e36631d2
  16. Jul 05, 2013
Loading