java.lang.ArrayIndexOutOfBoundsException: length=4; index=4

Stack Overflow | Ashwani | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Particle Effect Changing Color at runtime

    Stack Overflow | 6 months ago | Ashwani
    java.lang.ArrayIndexOutOfBoundsException: length=4; index=4

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      length=4; index=4

      at com.badlogic.gdx.graphics.g2d.ParticleEmitter$GradientColorValue.getColor()
    2. libGDX Core
      ParticleEffect.draw
      1. com.badlogic.gdx.graphics.g2d.ParticleEmitter$GradientColorValue.getColor(ParticleEmitter.java:1313)
      2. com.badlogic.gdx.graphics.g2d.ParticleEmitter.activateParticle(ParticleEmitter.java:439)
      3. com.badlogic.gdx.graphics.g2d.ParticleEmitter.addParticle(ParticleEmitter.java:154)
      4. com.badlogic.gdx.graphics.g2d.ParticleEmitter.draw(ParticleEmitter.java:299)
      5. com.badlogic.gdx.graphics.g2d.ParticleEffect.draw(ParticleEffect.java:74)
      5 frames
    3. com.approduction.game
      GameScreen.render
      1. com.approduction.game.GameScreen.render(GameScreen.java:218)
      1 frame
    4. libGDX Core
      Game.render
      1. com.badlogic.gdx.Game.render(Game.java:46)
      1 frame
    5. libGDX Android Backend
      AndroidGraphics.onDrawFrame
      1. com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:459)
      1 frame
    6. Android Platform
      GLSurfaceView$GLThread.run
      1. android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1557)
      2. android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1263)
      2 frames