WeakRef::RefError: Invalid Reference - probably recycled #863
first thanks for the great and consistent work on nanoc.
I create the used items inside a
Let me know if I can provide further information to this topic
The text was updated successfully, but these errors were encountered:
Yes, it seems GC is the culprit.
I added this:
+ require 'pry-byebug' + prestat = GC.stat if method_cache.key?(args) && method_cache[args].weakref_alive? + begin method_cache[args].value + rescue => e + errstat = GC.stat + binding.pry + raise + end else send(original_method_name, *args).tap do |r| method_cache[args] = WeakRef.new(Wrapper.new(r)) end end
When the debugger breaks I printed the GC count: