Comments (8)
@smeet123 I probably figure out the reason for my case. I've been using a View.post()
to force the animation to run on UI thread. I also have a destroy()
call to .cancel()
in ParticleSystem
. It is very likely that the Runnable in my View.post()
function executed after .cancel()
, where mDrawingView
will become null (check the code in onUpdate()
and cancel()
). See if that's your case too.
from leonids.
There is a lot of information missing here.
Is this a crash on the Demo app on Play Store? If so, on which example? And what are the steps to replicate. Is it 100% replicable?
I did re-check the examples right now and they seem to work fine.
If this is something you are getting on you own app, please post the code, you may be doing something wrong on the initialization of the Particle System.
from leonids.
- Is this a crash on the Demo app on Play Store?
Ans : It is on play store. - It is not re-producible from my end but occasionally I am getting this error on google play store console and also getting this crash log on https://www.apteligent.com/
from leonids.
That was not my question. The question was if the crash was happening on the Demos, not if your app was on the Play Store.
Without steps to replicate, there's nothing I can do.
from leonids.
I have integrated the lib into my app and I have the same issue too. Not sure what's going on and here is the stacktrace from Crashlytics
Fatal Exception: java.lang.NullPointerException
at com.plattysoft.leonids.ParticleSystem.onUpdate(ParticleSystem.java:556)
at com.plattysoft.leonids.ParticleSystem.access$100(ParticleSystem.java:35)
at com.plattysoft.leonids.ParticleSystem$2.onAnimationUpdate(ParticleSystem.java:445)
at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1251)
at android.animation.ValueAnimator.animationFrame(ValueAnimator.java:1175)
at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1216)
at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:637)
at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:660)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:543)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5372)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:970)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:786)
at dalvik.system.NativeStart.main(NativeStart.java)
from leonids.
@raymondctc Thank you so much for the solution, I will check it once I get time.
from leonids.
May not be the cause of the reported NPE, but I can see a data race in ParticleTimerTask.run():
if(mPs.get() != null) {
ParticleSystem ps = mPs.get();
The two lines should be inverted:
ParticleSystem ps = mPs.get();
if(ps != null) {
from leonids.
from leonids.
Related Issues (20)
- 为什么用不了呀
- EmiterWithGravityExampleActivity ,How to make particles fly upward? HOT 1
- How to change TIMER_TASK_INTERVAL? HOT 2
- OneShot method doesn't call onDraw(); HOT 2
- Particle slowdown (air resistance)
- Copyright statement missing
- How to change the direction of the animation
- Use Leonids as a shared transition view HOT 1
- Emitters freeze after several seconds when built from latest tools HOT 3
- Particle Wall HOT 1
- Reverse Animation
- Rootview elevation HOT 2
- Bug causing crash
- Bug causing crash HOT 3
- JCenter shutdown HOT 5
- Top !!
- Typo in ParticleSystem class HOT 1
- Crash detected in onUpdate(long miliseconds) function
- java.lang.NullPointerException
- NPE HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leonids.