Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfBoundsException (ParticleView.kt:262) #10

Open
caretapp opened this issue Apr 12, 2023 · 0 comments
Open

IndexOutOfBoundsException (ParticleView.kt:262) #10

caretapp opened this issue Apr 12, 2023 · 0 comments

Comments

@caretapp
Copy link

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();
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant