ruby-entity-component-framework icon indicating copy to clipboard operation
ruby-entity-component-framework copied to clipboard

JRuby TypeError on game exit

Open solucet opened this issue 11 years ago • 1 comments

JRuby 1.7.10 currently raises a TypeError when the sample game is exited using the Escape key. Specifically, the offending line is in lib/ruby/playing_state.rb, line 143. Marshal.dump is being called on the EntityManager instance, which uses a hash with a default proc for its @component_stores instance variable -- but JRuby can't dump a hash with a default proc.

Tested in Fedora 20 with JRuby 1.7.10. Will try testing on a Windows box when I have one available.

% ruby -v
jruby 1.7.10 (1.9.3p392) 2014-01-09 c4ecd6b on OpenJDK 64-Bit Server VM 1.7.0_51-mockbuild_2014_01_17_13_38-b00 [linux-amd64]

solucet avatar Feb 07 '14 19:02 solucet

Confirmed. The problematic line is in entity_manager.rb:

@component_stores = Hash.new { |h, k| h[k] = {} }

Working on a fix.

cpowell avatar Feb 08 '14 23:02 cpowell