Skip to content

IndexOutOfBoundsException (ParticleView.kt:262) #10

@caretapp

Description

@caretapp

On resuming, the exception below is spammed. It happens for myself about every other resume.

W/System.err:     at me.ibrahimsn.particle.ParticleView$SurfaceViewThread.run(ParticleView.kt:262)
W/System.err: java.lang.IndexOutOfBoundsException: Index: 34, Size: 34
	@Override
	public void onResume() {
		super.onResume();
		particleView.setParticleMinRadius(utils.getRngNumber(2, 8));
		particleView.setParticleMaxRadius(utils.getRngNumber(16, 24));
		particleView.setParticleCount(utils.getRngNumber(20, 40));
		int[] particleClrs = new int[] {
				R.color.particle_color_1, R.color.particle_color_2, R.color.particle_color_3,
				R.color.particle_color_4, R.color.particle_color_5, R.color.particle_color_6
		};
		particleView.setParticleColor( ContextCompat.getColor(
				context, particleClrs[ utils.getRngNumber(0, particleClrs.length-1) ]) );
		particleView.setParticleLineColor( ContextCompat.getColor(
				context, particleClrs[ utils.getRngNumber(0, particleClrs.length-1) ]) );
		particleView.resume();
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions