Comments (5)
It is watched, but so far there has been no need to maintain it. It seems that every crash report on something like that was a misuse coming for a misunderstanding of how it should be used (and I do agree that it is lacking detailed documentation)
Fell free to fix it and submit a PR.
from leonids.
So an NPE within the library's internal code is considered a misuse? How can that be? What is the misuse in the above stacktrace?
from leonids.
Maybe I did not express myself correctly.
As far as I know, all the logged issues on github are linked to wrong usage of the library.
I can not tell what you are doing from a stacktrace, without steps to replicate I can't really find or solve the issue.
You can get plenty of NPE on Android and that is not an issue of the framework (i.e. calling getActivity on a detached fragment)
If you give me steps to replicate, I can look into it, just with a stack trace there's not much I can do.
And finally, as I said, I am happy to accept contributions, so if you want to dig into it and submit a PR with a fix I'll be happy to merge it in.
from leonids.
As I indicated, the NPE is random and rare... similar to previous reports. The problem was already documented in issue #43 with a user supplied fix. Since the stacktrace (supplied by Crashlytics) doesn't go deep enough to highlight where in my code it starts, I cannot give a reliable example. The app just has a couple simple onetime particle emits... and the same code works most of the time except for a rare NPE.
Maybe at a minimum wrap the onUpdate in a try/catch to more gracefully handle the NPE regardless of the cause?
from leonids.
Feel free to do a patch, try it and it resolved the problem we can integrate it.
As you can see in the code
The particle system weak reference is only accessed if it is not null, even more, the fact that the previous line executes means that the reference is not null.
Can the reference be turned null between those 2 lines? I can't see how, but as I said, feel free to wrap it on a try/catch and see if that solves the problem. I am reluctant to add something like that to a release just for you to try it out without being sure what is causing it. It may as well surface somewhere else.
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
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.