Skip to content
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

java.lang.NullPointerException from incomplete regex on the REPL #3254

Closed
p6rt opened this issue Oct 27, 2013 · 5 comments
Closed

java.lang.NullPointerException from incomplete regex on the REPL #3254

p6rt opened this issue Oct 27, 2013 · 5 comments
Labels
JVM Related to Rakudo-JVM testneeded

Comments

@p6rt
Copy link

p6rt commented Oct 27, 2013

Migrated from rt.perl.org#120379 (status was 'open')

Searchable as RT120379$

@p6rt
Copy link
Author

p6rt commented Oct 27, 2013

From @moritz

moritz@​pat​:~/p6/json>perl6-j

'asa' ~~ /​:s ^a* %
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
Exception in thread "main" org.perl6.nqp.runtime.UnwindException
  at
org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java​:113)
  at
org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java​:304)
  at
org.perl6.nqp.runtime.GlobalContext.<init>(GlobalContext.java​:222)
  at
org.perl6.nqp.runtime.CompilationUnit.enterFromMain(CompilationUnit.java​:59)

  at perl6.main(gen/jvm/main.nqp)
moritz@​pat​:~/p6/json>perl6-j --version
This is perl6 version 2013.10-79-g0026bfb built on JVM

needless to say, this is not the level of error reporting that we aspire to.

@p6rt
Copy link
Author

p6rt commented Feb 7, 2015

From @usev6

This no longer gives a NullPointerException​:

$ perl6-j

'asa' ~~ /​:s ^a* %
===SORRY!=== Error while compiling <unknown file>
Missing quantifier on the left argument of %
at <unknown file>​:2
------> <BOL>⏏<EOL>

$ perl6-j --version
This is perl6 version 2015.01-60-g12db81b built on JVM

Is this closeable or do we need a test for the rakudo.jvm REPL?

1 similar comment
@p6rt
Copy link
Author

p6rt commented Feb 7, 2015

From @usev6

This no longer gives a NullPointerException​:

$ perl6-j

'asa' ~~ /​:s ^a* %
===SORRY!=== Error while compiling <unknown file>
Missing quantifier on the left argument of %
at <unknown file>​:2
------> <BOL>⏏<EOL>

$ perl6-j --version
This is perl6 version 2015.01-60-g12db81b built on JVM

Is this closeable or do we need a test for the rakudo.jvm REPL?

@p6rt
Copy link
Author

p6rt commented Feb 7, 2015

@usev6 - Status changed from 'new' to 'open'

@p6rt p6rt added JVM Related to Rakudo-JVM testneeded labels Jan 5, 2020
usev6 added a commit to usev6/rakudo that referenced this issue Apr 11, 2021
usev6 added a commit to usev6/rakudo that referenced this issue May 1, 2021
As described in Raku/old-issue-tracker#3254
the following evaluation used to fail badly in the REPL (on the JVM
backend) a couple of years ago:

  'asa' ~~ /:s ^a* %
  java.lang.NullPointerException
  java.lang.NullPointerException
  [...]
  Exception in thread "main" org.perl6.nqp.runtime.UnwindException
  [...]

The problem has been fixed a long time ago (the exact commit is
unknown) and the incomplete regex results in a sane error message,
but we didn't have a regression test, yet.
usev6 added a commit to usev6/rakudo that referenced this issue May 1, 2021
As described in Raku/old-issue-tracker#3254
the following evaluation used to fail badly in the REPL (on the JVM
backend) a couple of years ago:

  'asa' ~~ /:s ^a* %
  java.lang.NullPointerException
  java.lang.NullPointerException
  [...]
  Exception in thread "main" org.perl6.nqp.runtime.UnwindException
  [...]

The problem has been fixed a long time ago (the exact commit is
unknown) and the incomplete regex results in a sane error message,
but we didn't have a regression test, yet.
@usev6
Copy link

usev6 commented May 2, 2021

Test added with rakudo/rakudo@cbf12d22e1. I'm closing this issue.

@usev6 usev6 closed this as completed May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JVM Related to Rakudo-JVM testneeded
Projects
None yet
Development

No branches or pull requests

2 participants