leaningtech / cheerpj-meta

Run Java 8 applications, libraries, applets, Java Web Start, and Oracle Forms on the web without legacy plugins.
https://labs.leaningtech.com/cheerpj
434 stars 21 forks source link

StackTraceElement.html#getFileName() returns null #162

Closed tytot closed 4 months ago

tytot commented 1 year ago

I have an executable (Java Swing) JAR that I converted using CheerpJ 2.3 on Ubuntu. When I try to run the application in an HTML page per the tutorial, the frame remains white and I get an Unhandled exception N4java4lang20NullPointerException / in the console.

Minimal reproducible example: https://github.com/tytot/cheerpj-demo

alexp-sssup commented 1 year ago

The problem with this application is that is tries to access the filename of stack trace elements unconditionally, while they are actually allowed to be null.

https://docs.oracle.com/javase/7/docs/api/java/lang/StackTraceElement.html#getFileName()

I'll keep this bug open since we might be able to fix this as part of the upcoming CheerpJ 3.0 architecture, but the program is our opinion buggy to begin with.

bates64 commented 4 months ago

CheerpJ 3.0 is now available. Let us know if you still have this issue using CheerpJ 3.0 @tytot. As Alessandro said, the application is arguably buggy, but it might work now anyway.

tytot commented 4 months ago

Thanks for letting me know, I upgraded and I'm no longer experiencing the error.

bates64 commented 4 months ago

Awesome!