User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: Android Crash reports java.lang.ArrayIndexOutOfBoundsException

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    723
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)

    Android Crash reports java.lang.ArrayIndexOutOfBoundsException

    Hey there, so i have a new crash report that is becoming really popular (and that's a bad thing for sure!) it's "java.lang.ArrayIndexOutOfBoundsException".

    I have two version of this crash:

    - java.lang.ArrayIndexOutOfBoundsException
    Events.CEventProgram.computeEventList
    Code:
    java.lang.ArrayIndexOutOfBoundsException: 
     
      at Events.CEventProgram.computeEventList (CEventProgram.java:1803)
     
      at Events.CEventProgram.executeChildEvents (CEventProgram.java:1434)
     
      at Events.CEventProgram.call_Actions (CEventProgram.java:2038)
     
      at Events.CEventProgram.computeEventList (CEventProgram.java:1782)
     
      at RunLoop.CRun.f_GameLoop (CRun.java:5493)
     
      at RunLoop.CRun.doRunLoop (CRun.java:596)
     
      at Application.CRunApp.loopFrame (CRunApp.java:1067)
     
      at Application.CRunApp.playApplication (CRunApp.java:797)
     
      at Application.CRunTimerTask.run (CRunTimerTask.java:52)
     
      at android.os.Handler.handleCallback (Handler.java:873)
     
      at android.os.Handler.dispatchMessage (Handler.java:99)
     
      at android.os.Looper.loop (Looper.java:214)
     
      at android.app.ActivityThread.main (ActivityThread.java:7091)
     
      at java.lang.reflect.Method.invoke (Native Method)
     
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
     
      at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)
    - java.lang.ArrayIndexOutOfBoundsException
    OpenGL.CTextSurface.manualDrawTextEllipsis
    Code:
    java.lang.ArrayIndexOutOfBoundsException: 
     
      at android.text.StaticLayout.calculateEllipsis (StaticLayout.java:667)
     
      at android.text.StaticLayout.out (StaticLayout.java:631)
     
      at android.text.StaticLayout.generate (StaticLayout.java:423)
     
      at android.text.StaticLayout.<init> (StaticLayout.java:140)
     
      at android.widget.TextView.makeSingleLayout (TextView.java:6455)
     
      at android.widget.TextView.makeNewLayout (TextView.java:6312)
     
      at android.widget.TextView.assumeLayout (TextView.java:6213)
     
      at android.widget.TextView.onDraw (TextView.java:5369)
     
      at android.view.View.draw (View.java:15249)
     
      at OpenGL.CTextSurface.manualDrawTextEllipsis (CTextSurface.java:406)
     
      at Extensions.CRunKcBoxA.DisplayObject (CRunKcBoxA.java:1048)
     
      at Extensions.CRunKcBoxA.displayRunObject (CRunKcBoxA.java:745)
     
      at Objects.CExtension.spriteDraw (CExtension.java:197)
     
      at Sprites.CSpriteGen.winDrawSprites (CSpriteGen.java:1363)
     
      at Sprites.CSpriteGen.spriteDraw (CSpriteGen.java:1381)
     
      at RunLoop.CRun.screen_Update (CRun.java:3068)
     
      at RunLoop.CRun.f_GameLoop (CRun.java:5537)
     
      at RunLoop.CRun.doRunLoop (CRun.java:596)
     
      at Application.CRunApp.loopFrame (CRunApp.java:1067)
     
      at Application.CRunApp.playApplication (CRunApp.java:797)
     
      at Application.CRunTimerTask.run (CRunTimerTask.java:52)
     
      at android.os.Handler.handleCallback (Handler.java:739)
     
      at android.os.Handler.dispatchMessage (Handler.java:95)
     
      at android.os.Looper.loop (Looper.java:135)
     
      at android.app.ActivityThread.main (ActivityThread.java:5343)
     
      at java.lang.reflect.Method.invoke (Native Method)
     
      at java.lang.reflect.Method.invoke (Method.java:372)
     
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:905)
     
      at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:700)
    And as a bonus (or not), i also still have a few In-app crashes:
    - java.lang.IllegalStateException
    Extensions.InAppControl.startSetup
    Code:
    java.lang.IllegalStateException: 
     
      at Extensions.InAppControl.startSetup (InAppControl.java:196)
     
      at Extensions.CRunInAppAndroid.createRunObject (CRunInAppAndroid.java:416)
     
      at Objects.CExtension.init (CExtension.java:85)
     
      at RunLoop.CRun.f_CreateObject (CRun.java:1624)
     
      at RunLoop.CRun.createFrameObjects (CRun.java:868)
     
      at RunLoop.CRun.initRunLoop (CRun.java:565)
     
      at Application.CRunApp.startTheFrame (CRunApp.java:1029)
     
      at Application.CRunApp.playApplication (CRunApp.java:772)
     
      at Application.CRunTimerTask.run (CRunTimerTask.java:52)
     
      at android.os.Handler.handleCallback (Handler.java:874)
     
      at android.os.Handler.dispatchMessage (Handler.java:100)
     
      at android.os.Looper.loop (Looper.java:198)
     
      at android.app.ActivityThread.main (ActivityThread.java:6729)
     
      at java.lang.reflect.Method.invoke (Native Method)
     
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
     
      at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)


    This is the kind of crashes that takes me away from the rankings on Android...

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,433
    Mentioned
    229 Post(s)
    Tagged
    4 Thread(s)
    @Dobermman can you tell us from what device are these errors, what fusion version are you using, and where to download your apk?

    1.- Important here what fusion version in this come from

    2.- This error strangely happens in an internal lib, so from what device is this comes from is important to detect and test

    3,- Seems that the device does not allow to start the InApp rerurning an IllegalState ( i will check)


    ================================================== ====================


    Please also add the ACE you do related to inApp in text or image
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    723
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Hello @Fernando ,
    1. I'm using Fusion 2.5+ R292.22

    2. Devices list:
    - java.lang.ArrayIndexOutOfBoundsException
    Events.CEventProgram.computeEventList
    devices-list1.png

    - java.lang.ArrayIndexOutOfBoundsException
    OpenGL.CTextSurface.manualDrawTextEllipsis
    devices-list2.png

    - java.lang.IllegalStateException
    Extensions.InAppControl.startSetup
    devices-list3.png

    ACE:
    The in-app group is activated only if the user goes in the game shop:
    inapp-ACE.jpg

    The APK link: https://play.google.com/store/apps/d...artanfirefight

  4. #4
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,433
    Mentioned
    229 Post(s)
    Tagged
    4 Thread(s)
    i have been using your application during weekend, and need you to answer me a question about the InApp Object

    Is this object used in the same frame of the scroll game, is it created when needed or does always stay ON?, I am adding a protection to never sleep or kill the object even when using in scroll frame something like was done for multiple object.

    ====================================

    InApp have a different start when using in android 9, checking this, may be the guilty.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2014
    Posts
    220
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I can tell you exactly where the InAppControl.startSetup error is coming from, because I tested it extensively. If you want the longer version, you can check this older thread: https://community.clickteam.com/threads/106060-New-in-app-purchase-crash-reports-appeared-after-upgrading-to-292-10?p=751706#post751706

    The short version is that the error appeared somewhere between Clickteam version 292.7 and 292.10. I know this, because I didn't have it at all in version 292.7 or any version before that, but it suddenly appeared in 292.10 and it never disappeared since. The version that my game is currently compiled with is 292.14 and I still have the error on a daily basis. (After checking the older thread in more detail, I realized that this info is only half-correct. Please check the edit at the bottom of this thread for more accurate info)

    I guarantee 100% that everyone who made a game with 292.10 or above who is using the IAP object must have encountered this error at least once. The reason why me and Dobermann are the ones getting it more frequently is that our games have almost a million downloads, and lots of active users, so the chances are much higher to get the error in our games than in games that have 10k downloads or less.

    I made dozens of versions, adding and removing stuff in order to figure out exactly what is causing the error, and after all these tests, I know for certain that it's coming from the actions that are performed by the IAP object in the background, not by any of the events. The reason why I can say this with 100% certainty is because I used to have lots of frames that had only the IAP object in them, with no IAP related events whatsoever, and immediately after removing those objects from those frames, my startSetup crashes dropped by 90%, while I was still using 292.10.

    The IAP objects had remained there from the time when I was using Admob, so I needed to check during the game if a purchase had been made to remove ads or not. After I removed the ads from the game completely, I removed all the IAP related events, but left the IAP object there, thinking that it wasn't doing anything. However, when Fernando told me that the IAP object was checking the purchases by itself after every app resume, I realized that this object also does a lot of stuff in the background, so I decided to remove the object from any places where it wasn't absolutely necessary.

    Right now, the IAP object is only present in places that are rarely visited by users in my game, and even so, I still get around 7 of these errors per day (as opposed to more than 100, back when I had the object in most of my frames). For me, this solution works, because I no longer use ads, so there is no need for me to check the purchases unless the player is trying to pass from one book to the other. However, if you have a game that displays ads constantly, you are going to be forced to have an IAP object in there, so you can check on each app resume if there was a 'remove ads' purchase or not, according to Google's guidelines. If you have a game with ads, you will probably have a crash rate over 2% no matter what you do. (mine is now 0.60% after all these changes I did)

    I will tell you right off the bat: do not try to reproduce these issues on your device. It's impossible. I've spent months checking user logs, and they've happened in pretty much every device and android version under the sun (yes it also happens on android versions below 9, so android version 9 is not the culprit). I've seen them also happening on a Nexus 7 and a Samsung S3, which are both devices that I also own. I tried tirelessly to reproduce the crashes on those 2 devices using every action I could think of, and it made no difference. I tried resuming the game, going from frame to frame rapidly, closing the game and starting it up again but I just couldn't get it to crash.

    The only surefire way to fix this issue is to check the changes in the code that were made between 292.7 and 292.10 (the root cause of the problem may have happened before 292.7. Please check the edit at the bottom of the thread) and see how these changes affect the startSetup function and the way it is called in the background operations made by the IAP object. The only way to test it after you fix it is to give the new Clickteam version to someone like me or Dobermann who have a lot of active users and therefore have a greater chance to run into the bug. I won't be able to do tests in the following weeks, so for now it'll have to be Dobermann, or whoever else is reading this and has many active users.

    Hopefully this info will help with the identification of this exasperating bug, because it was extremely difficult to find this info as it is.

    Also, just to be clear, this bug does not happen only in the scrollable frames. It also happened in my main menu frame, which is a very simple frame with a few buttons, with no scrolling at all. It's not something specific to our games. It is a generic IAP object problem that was not there before and appeared in 292.10. As further proof that it's a generic problem, here's another post from someone with a third game, unrelated to ours, which mentioned getting this exact same error after upgrading to 292.10: https://community.clickteam.com/threads/106067-InappAndroid-and-active-pic-problems-about-R292-10?highlight=startsetup

    Edit: I just re-read what I said in August, and it seems that I misremembered something. My problem with the startSetup error started appearing after I switched from the pre-gradle 291.6 version to the post-gradle 292.10 version. It is therefore more likely that the root cause of the problem happened somewhere in the transition to gradle. When I tested the game with 292.7, it indeed didn't have the startSetup error, but what it did have was an older type of IAP error (SKUdetails), which started happening a lot more frequently after the gradle upgrade. I used to get SKUdetails errors with 291.6 too, but much less frequently. Between 292.7 and 292.10, the SKUdetails error disappears and it gets replaced with the startSetup error, which has the exact same number of occurrences as the SKUdetails error had in 292.7, with the same code.

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2014
    Posts
    220
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    In case you're wondering what the 'skudetails' error mentioned in my previous post is, here it is:

    java.lang.NullPointerException:

    at Extensions.InAppControl.querySkuDetails (InAppControl.java:755)

    at Extensions.InAppControl.queryInventory (InAppControl.java:871)

    at Extensions.InAppControl.queryInventory (InAppControl.java:829)

    at Extensions.InAppControl$3.run (InAppControl.java:927)

    at java.lang.Thread.run (Thread.java:761)


    As mentioned before, this error was eliminated in 292.10 and replaced with the startSetup error.

    Not sure if this helps, but there is also a much older IAP error that happens probably to pretty much anyone using the IAP object, and this error is also affected by the background operations done by the IAP object, although not exclusively. I know this because the number of these errors decreased after the update to my game in which all I did was to remove the IAP objects from the frames where they weren't doing anything, and remove the inactive conditions related to the IAP object. Here is the log of the error:

    java.lang.NullPointerException:

    at Extensions.InAppControl.queryPurchases (InAppControl.java:740)

    at Extensions.InAppControl.queryInventory (InAppControl.java:913)

    at Extensions.InAppControl.queryInventory (InAppControl.java:890)

    at Extensions.InAppControl$3.run (InAppControl.java:989)

    at java.lang.Thread.run (Thread.java:764)

  7. #7
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,433
    Mentioned
    229 Post(s)
    Tagged
    4 Thread(s)
    These should not appears anymore in latest version.

    I did a long work in InApp this weekend notice that asking permissions was affecting the first inventory request, and in some devices latest version also a crash, this should be now solved, @Nemeean_lion , @Dobermann let me know if you want to try new version of InApp object plus new runtime.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  8. #8
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2014
    Posts
    220
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Nice!

    Unfortunately I can't do any tests in the next few weeks, but hopefully Dobermann will be able to test it in one of his games for now.

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    723
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fernando View Post
    i have been using your application during weekend, and need you to answer me a question about the InApp Object

    Is this object used in the same frame of the scroll game, is it created when needed or does always stay ON?, I am adding a protection to never sleep or kill the object even when using in scroll frame something like was done for multiple object.

    ====================================

    InApp have a different start when using in android 9, checking this, may be the guilty.
    The In-App object is only present on the menu frame, the game engine is on another frame. It is created at start (all the extensions are created at start (i've totaly forgot that i can create them when i need them, i should try this), but the group that has all the vents related to the in-app object is activated only if the user click on the shop button.

    Yes i could release a new beta to check the changes, but the IAP wasn't my big issu or my arrayindexoutofboundsexception crashes are linked to the iap?

  10. #10
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,433
    Mentioned
    229 Post(s)
    Tagged
    4 Thread(s)
    not sure about the first crash are you using child events in your mfa?

    need more information


    error 2 an 3, I worked and I have the changes that should address them.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

Page 1 of 2 1 2 LastLast

Similar Threads

  1. app crash after update. java.lang.IllegalStateException
    By Perry in forum Android Export Module 2.5
    Replies: 6
    Last Post: 19th October 2017, 04:09 PM
  2. Users Crash report - java.lang.UnsatisfiedLinkError:
    By macca02 in forum Android Export Module 2.5
    Replies: 4
    Last Post: 2nd November 2014, 07:32 AM
  3. Google Play Crash Report java.lang.ClassNotFoundException
    By Nippe in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 6th November 2013, 12:22 PM
  4. [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
  5. Google Play Crash Message: java.lang.IllegalArgumentException
    By tom79 in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 22nd July 2013, 01:56 PM

Posting Permissions

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