New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException for same CStruct in CStruct #3713
Comments
From @FROGGS$ perl6-m -e 'class Foo is repr<CStruct> { has int32 $.idontcare; has $ perl6-j --ll-exception -e 'class Foo is repr<CStruct> { has int32 |
From @usev6The class definition no longer results in a NullPointerException: $ perl6-j -e 'class Foo is repr<CStruct> { has int32 But it's not possible to create an object of class Foo (works on MoarVM): $ perl6-j -e 'class Foo is repr<CStruct> { has int32 |
1 similar comment
From @usev6The class definition no longer results in a NullPointerException: $ perl6-j -e 'class Foo is repr<CStruct> { has int32 But it's not possible to create an object of class Foo (works on MoarVM): $ perl6-j -e 'class Foo is repr<CStruct> { has int32 |
@usev6 - Status changed from 'new' to 'open' |
From @usev6At first sight this looks good now: $ perl6-j -e 'class Foo is repr<CStruct> { has int32 Unfortunatly, another NullPointerException surfaces when looking at the newly created $a: $ perl6-j -e 'class Foo is repr<CStruct> { has int32 Compare with rakudo.moar: $ perl6-m -e 'class Foo is repr<CStruct> { has int32 |
1 similar comment
From @usev6At first sight this looks good now: $ perl6-j -e 'class Foo is repr<CStruct> { has int32 Unfortunatly, another NullPointerException surfaces when looking at the newly created $a: $ perl6-j -e 'class Foo is repr<CStruct> { has int32 Compare with rakudo.moar: $ perl6-m -e 'class Foo is repr<CStruct> { has int32 |
From @usev6On Mon Jun 29 14:21:31 2015, bartolin@gmx.de wrote:
I tried to look at this NPE, but was unable to find a fix. However, here is what I suspect -- maybe it is useful for someone else: I think the NPE happens in o = (Object)Structure.newInstance(structClass, ((Pointer)o)); Four lines above 'o' is created with Object o = storage.readField(name); but 'storage.readField(name)' seems to be 'null'. Maybe this is not filled properly when the Perl 6 object is created? |
1 similar comment
From @usev6On Mon Jun 29 14:21:31 2015, bartolin@gmx.de wrote:
I tried to look at this NPE, but was unable to find a fix. However, here is what I suspect -- maybe it is useful for someone else: I think the NPE happens in o = (Object)Structure.newInstance(structClass, ((Pointer)o)); Four lines above 'o' is created with Object o = storage.readField(name); but 'storage.readField(name)' seems to be 'null'. Maybe this is not filled properly when the Perl 6 object is created? |
From @cokeOn Tue Jun 30 13:41:37 2015, bartolin@gmx.de wrote:
This appears to be working now; closable with tests: 09:57 < [Coke]> r: class Foo is repr<CStruct> { has int32 $.idontcare; has Foo -- |
From @usev6Hmm, actually the second NPE is still there: $ perl6-j -e 'class Foo is repr<CStruct> { has int32 |
1 similar comment
From @usev6Hmm, actually the second NPE is still there: $ perl6-j -e 'class Foo is repr<CStruct> { has int32 |
Migrated from rt.perl.org#123969 (status was 'open')
Searchable as RT123969$
The text was updated successfully, but these errors were encountered: