B4J Question Walking character bug

LucaMs

Expert
Licensed User
Longtime User
Deleting body: bird, 16
Deleting body: fried, 40
New graphic: ~temp24
Deleting body: fireworks tail, 44
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
at anywheresoftware.b4a.keywords.Common$2$1.run(Common.java:1020)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:496)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:442)
at b4j.example.x2bodywrapper._tick(x2bodywrapper.java:217)
at b4j.example.x2utils$ResumableSub_MainLoop.resume(x2utils.java:866)
at anywheresoftware.b4a.keywords.Common$2$1.run(Common.java:1018)
... 7 more
Caused by: java.lang.NullPointerException
at b4j.example.fireworks._tick(fireworks.java:156)
at b4j.example.fireworks.callSub(fireworks.java:175)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:471)
... 11 more
New graphic: ~temp25
New graphic: ~temp26
New graphic: ~temp27
 

LucaMs

Expert
Licensed User
Longtime User
How to reproduce it?
Unfortunately I don't know how.

Can you run in debug mode
I tried again, both debug and release mode without getting the crash.

If I'm not mistaken the problem was generated by the fireworks class; maybe the java file will be enough for you.
 

Attachments

  • fireworks.java
    10.1 KB · Views: 179
  • example.zip
    69.1 KB · Views: 184
Upvote 0
Top