FFI: java.lang.ClassCastException when accessing FFI::Struct member
-------------------------------------------------------------------
Key: JRUBY-3584
URL: http://jira.codehaus.org/browse/JRUBY-3584
Project: JRuby
Issue Type: Bug
Components: Extensions
Reporter: Mike Dalessio
Priority: Minor
When accessing a :pointer struct member, JRUBY throws:
java.lang.ClassCastException: org.jruby.ext.ffi.Struct cannot be cast to
org.jruby.ext.ffi.AbstractMemory
Stack walkback is below.
Failing spec is available at
http://github.com/mdalessio/jruby/tree/ffi-struct-member-exception, which is
branch ffi-struct-member-exception at my github fork,
git://github.com/mdalessio/jruby.git.
Please note that this branch includes additional specs submitted separately
under JIRA ticket http://jira.codehaus.org/browse/JRUBY-3583
This issue was introduced in commit 53c60f (
http://github.com/jruby/jruby/commit/53c60f13e621f487ab7601d4830e46f4e62183ce )
Partial stack walkback from cast exception:
StructLayoutBuilder.java:369:in `get': java.lang.ClassCastException:
org.jruby.ext.ffi.Struct cannot be cast to org.jruby.ext.ffi.AbstractMemory
from Struct.java:162:in `getFieldValue'
from
org/jruby/ext/ffi/Struct$i_method_1_0$RUBYINVOKER$getFieldValue.gen:-1:in `call'
from CachingCallSite.java:278:in `cacheAndCall'
from CachingCallSite.java:117:in `call'
from CallOneArgNode.java:57:in `interpret'
from NewlineNode.java:104:in `interpret'
from EvStrNode.java:86:in `interpret'
from DStrNode.java:86:in `appendToString'
from DStrNode.java:76:in `buildDynamicString'
from DStrNode.java:68:in `interpret'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:207:in `call'
from DefaultMethod.java:167:in `call'
from CachingCallSite.java:298:in `cacheAndCall'
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email