User Tag List

Results 1 to 9 of 9

Thread: Android app crash with java.lang.NullPointerException: Attempt to get length of null

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    GKProduction's Avatar
    Join Date
    Aug 2017
    Location
    Russia, Krasnodar
    Posts
    162
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Android app crash with java.lang.NullPointerException: Attempt to get length of null

    I just was doing a small update for my app. I didn't do anything specific, but when all of a sudden I started getting application crashes:
    Code:
    java.lang.NullPointerException: Attempt to get length of null array
            at Events.CEventProgram.qual_GetNextOiList(CEventProgram.java:4430)
            at Events.CEventProgram.qual_GetFirstOiList(CEventProgram.java:4414)
            at Events.CEventProgram.assemblePrograms(CEventProgram.java:3725)
            at RunLoop.CRun.initRunLoop(CRun.java:576)
            at Application.CRunApp.startTheFrame(CRunApp.java:1052)
            at Application.CRunApp.playApplication(CRunApp.java:790)
            at Objects.CCCA.handle(CCCA.java:256)
            at RunLoop.CRun.f_GameLoop(CRun.java:5483)
            at RunLoop.CRun.doRunLoop(CRun.java:595)
            at Application.CRunApp.loopFrame(CRunApp.java:1090)
            at Application.CRunApp.playApplication(CRunApp.java:815)
            at Application.CRunTimerTask.run(CRunTimerTask.java:53)
            at android.os.Handler.handleCallback(Handler.java:938)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loopOnce(Looper.java:226)
            at android.os.Looper.loop(Looper.java:313)
            at android.app.ActivityThread.main(ActivityThread.java:8663)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
    What could be the reason for this?

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,369
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    New conditions that require the object to exist, global events need to check that object exists?
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)
    VNGames's Avatar
    Join Date
    Aug 2021
    Location
    Russia, Krasnodar
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fusion technologies

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    GKProduction's Avatar
    Join Date
    Aug 2017
    Location
    Russia, Krasnodar
    Posts
    162
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Fernando, thanks for the tip! No, I didn't have those conditions, but... suddenly I discovered a true reason of the problem.

    Look, Fusion has a problem with classifiers. I tried to describe it on this image:
    Problem with classifiers.png

    I've encountered a problem before where Fusion can't correctly identify the object type in events with the classified objects. In my case, that's what caused the crash.
    I solved my problem by replacing the classifier in active objects with a different one, so that there were no conflicts, and now app does not crash.

    I think it's worth considering this Fusion problem

  5. #5
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,369
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by GKProduction View Post
    Fernando, thanks for the tip! No, I didn't have those conditions, but... suddenly I discovered a true reason of the problem.

    Look, Fusion has a problem with classifiers. I tried to describe it on this image:
    Problem with classifiers.png

    I've encountered a problem before where Fusion can't correctly identify the object type in events with the classified objects. In my case, that's what caused the crash.
    I solved my problem by replacing the classifier in active objects with a different one, so that there were no conflicts, and now app does not crash.

    I think it's worth considering this Fusion problem
    Please can you send me a small mfa with this issue for me to check, is this only happening in android?
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    GKProduction's Avatar
    Join Date
    Aug 2017
    Location
    Russia, Krasnodar
    Posts
    162
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fernando View Post
    Please can you send me a small mfa with this issue for me to check, is this only happening in android?
    Little example of this bug: https://disk.yandex.ru/d/nzBHd7ZHn8Br3w

    I think, it may be happening on other platforms as well. Check it out just in case.

  7. #7
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,369
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    Thanks for the example, fixed for next beta.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  8. #8
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    GKProduction's Avatar
    Join Date
    Aug 2017
    Location
    Russia, Krasnodar
    Posts
    162
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Thank you for fix, Fernando!

    But why this fix is not described in 294 changelog?

  9. #9
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,369
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by GKProduction View Post
    Thank you for fix, Fernando!

    But why this fix is not described in 294 changelog?
    oh, i think i forgot to add in the first version of 294, but is fixed, changes were made for this contingency.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

Similar Threads

  1. Android Crash with java.lang.NullPointerException
    By GKProduction in forum Android Export Module 2.5
    Replies: 15
    Last Post: 9th April 2021, 05:45 PM
  2. Feedback on Crash java.lang.NullPointerException
    By Janette5 in forum Android Export Module 2.5
    Replies: 10
    Last Post: 6th April 2020, 05:34 AM
  3. Android Crash reports java.lang.ArrayIndexOutOfBoundsException
    By Dobermann in forum Android Export Module 2.5
    Replies: 16
    Last Post: 24th January 2020, 09:10 PM
  4. In-App Purchases causes Crashes java.lang.NullPointerException
    By trigonom in forum Android Export Module 2.5
    Replies: 1
    Last Post: 14th November 2018, 02:03 PM
  5. [CRASH] Google Play Crash Report: java.lang.NullPointerException
    By tom79 in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 1st August 2013, 04:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •