1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

B4J Question Walking character bug

Discussion in 'B4J Questions' started by LucaMs, May 24, 2019.

  1. LucaMs

    LucaMs Expert Licensed 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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    More information please. How to reproduce it? Can you run in debug mode and post the line number?
     
  3. LucaMs

    LucaMs Expert Licensed User

    Unfortunately I don't know how.

    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.
     

    Attached Files:

  4. Erel

    Erel Administrator Staff Member Licensed User

    Do you see this line in the code: If bw.IsDeleted Or mTail.IsDeleted Then Return (line 26) ?
     
  5. LucaMs

    LucaMs Expert Licensed User

    No, in no module.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    I guess that it was fixed and never released. You should add the above check to prevent it.
     
  7. LucaMs

    LucaMs Expert Licensed User

    line 26 of fireworks class?
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Yes. It is not too important. It will be included when I'll upload an updated package.
     
    LucaMs likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice