# New Ticket Created by Christian Bartolomaeus # Please include the string: [perl #123002] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=123002 >
I got a NullPointerException with a golfed version of a failing test from roast (test for RT #114380 in S14-roles/basic.t). The test in question uses "eval_lives_ok" which does something similiar to the golfed example via Test.pm. The test in question runs fine with "lives_ok" instead of "eval_lives_ok" $ perl6-j --version This is perl6 version 2014.09-222-g0dcd0d6 built on JVM $ perl6-j -e "sub foo { EVAL 'role R { }' }; foo; say 'alive'" ===SORRY!=== java.lang.NullPointerException Using EVAL on the role declaration directly doesn't fail: $ perl6-j -e "EVAL 'role R { }'; say 'alive'" alive With the help from psch (http://irclog.perlgeek.de/perl6/2014-10-17#i_9527240) I tried to get some more info with jdb, but everything I got was: ==== $ jdb -sourcepath nqp/src/vpathm/jvm/runtime/ -attach 8000 Set uncaught java.lang.Throwable Set deferred uncaught java.lang.Throwable Initializing jdb ... > VM Started: No frames on the current call stack main[1] catch java.lang.NullPointerException Set all java.lang.NullPointerException main[1] run > Exception occurred: java.lang.NullPointerException (to be caught at: 64411D3B4B0DBD5895A2F295CC3F75570C8D73C2.qb_54(), line=1,497 bci=2,686)"thread=main", org.perl6.nqp.runtime.Ops.getobjsc(), line=3,811 bci=1 main[1] up main[2] list Source file not found: src/Perl6/World.nqp main[2] resume All threads resumed. > The application exited ==== Additional informations where available with --ll-exception: ==== $ perl6-j --ll-exception -e "sub foo { EVAL 'role R { }' }; foo;" java.lang.NullPointerException in compile_in_context (src/Perl6/World.nqp:1497) in pkg_set_role_body_block (src/Perl6/World.nqp:1745) in package_def (src/Perl6/Actions.nqp:1953) in !reduce (gen/jvm/stage2/QRegex.nqp:771) in !cursor_pass (gen/jvm/stage2/QRegex.nqp:732) in package_def (src/Perl6/Grammar.nqp:2395) in package_declarator:sym<role> (src/Perl6/Grammar.nqp) in !protoregex (gen/jvm/stage2/QRegex.nqp:808) in package_declarator (src/Perl6/Grammar.nqp) in term:sym<package_declarator> (src/Perl6/Grammar.nqp) in !protoregex (gen/jvm/stage2/QRegex.nqp:808) in term (src/Perl6/Grammar.nqp) in termish (src/Perl6/Grammar.nqp:3557) in EXPR (gen/jvm/stage2/NQPHLL.nqp:558) in EXPR (src/Perl6/Grammar.nqp:3588) in statement (src/Perl6/Grammar.nqp:1300) in statementlist (src/Perl6/Grammar.nqp:1235) in LANG (gen/jvm/stage2/NQPHLL.nqp:766) in FOREIGN_LANG (src/Perl6/Grammar.nqp:1638) in comp_unit (src/Perl6/Grammar.nqp:1093) in TOP (src/Perl6/Grammar.nqp:356) in parse (gen/jvm/stage2/QRegex.nqp:1400) in parse (gen/jvm/stage2/NQPHLL.nqp:1425) in compile (gen/jvm/stage2/NQPHLL.nqp:1381) in EVAL (gen/jvm/CORE.setting:763) in EVAL (gen/jvm/CORE.setting:756) in foo (-e:1) in <unit> (-e:1) in <unit-outer> (-e:1) in eval (gen/jvm/stage2/NQPHLL.nqp:1145) in (gen/jvm/stage2/NQPHLL.nqp:1234) in command_eval (gen/jvm/stage2/NQPHLL.nqp:1231) in command_eval (src/Perl6/Compiler.nqp:17) in command_line (gen/jvm/stage2/NQPHLL.nqp:1216) in MAIN (gen/jvm/main.nqp:39) in <mainline> (gen/jvm/main.nqp:35) in (gen/jvm/main.nqp) ====