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

Bug causing crash #113

Open
Kishor103 opened this issue Oct 30, 2020 · 3 comments
Open

Bug causing crash #113

Kishor103 opened this issue Oct 30, 2020 · 3 comments

Comments

@Kishor103
Copy link

The particle system is causing crash in some devices.
The crash report is as follows:-

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'void android.view.View.postInvalidate()' on a null object reference

com.plattysoft.leonids.ParticleSystem.onUpdate (ParticleSystem.java:683)
com.plattysoft.leonids.ParticleSystem.access$100 (ParticleSystem.java:38)
com.plattysoft.leonids.ParticleSystem$ParticleTimerTask.run (ParticleSystem.java:82)

@gs666
Copy link

gs666 commented Feb 18, 2021

same question...

@plattysoft
Copy link
Owner

I am curious as how did the drawingView became null.
Maybe the app was put into the background and the views destroyed while the animation was still running?

Do you have any insights on that? Or on Android version, or on how frequent it is?

Looks like it could be easily solved by adding a try catch and canceling the animation inside the catch.

@HXZg
Copy link

HXZg commented Jul 5, 2021

I use TimerTask to launch and call the cancel method. This happens occasionally.

Now I use stopEmitting instead of cancel

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

4 participants