Leonids icon indicating copy to clipboard operation
Leonids copied to clipboard

Bug causing crash

Open Kishor103 opened this issue 4 years ago • 3 comments

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)

Kishor103 avatar Oct 30 '20 12:10 Kishor103

same question...

gs666 avatar Feb 18 '21 07:02 gs666

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.

plattysoft avatar Feb 19 '21 21:02 plattysoft

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

Now I use stopEmitting instead of cancel

clickListenerData avatar Jul 05 '21 03:07 clickListenerData