Leonids icon indicating copy to clipboard operation
Leonids copied to clipboard

Emitters freeze after several seconds when built from latest tools

Open jacobtabak opened this issue 4 years ago • 3 comments

I cloned the project and tried to run on Android Studio 3.6.3. Some adjustments had to be made to get it to build:

  • Update gradle plugin to com.android.tools.build:gradle:3.6.3
  • Add google() repository to root build.gradle
  • Update gradle to 5.6.4 in gradle-wrapper.properties
  • Remove minSdkVersion from AndroidManifest.xml

First thing I noticed when I got the sample up and running is that the emitters that are supposed to go on indefinitely stop emitting after several seconds. I downloaded the sample from Google Play and it works fine.

Would you mind taking a few minutes trying to build with the latest tools and see if you encounter the same issues?

jacobtabak avatar May 19 '20 21:05 jacobtabak

I haven't touched this project in a long while, if I were to update it I will most like look into better compatibility with Kotlin (like, making sure the interfaces with one method are the last parameter)

If you find different behaviour, try getting the code that was tagged as released, there have been a few minor bugs and tweaks that haven't been into any release, the latest code is not the same as the latest published version.

I might try to take a look. Thanks for the heads up!

plattysoft avatar May 29 '20 19:05 plattysoft

~~Thank you for your response! You're right, I just changed the project reference in the sample to the latest release and it works now. But there is definitely an issue with the master branch at the time of this comment.~~

Edit: It still seems to be an issue even using the released version of the library.

jacobtabak avatar Jun 05 '20 20:06 jacobtabak

I think the problem is actually related to a leak of some sort. I put a log statement in the timer task in the sample app and each time you start an emitter a new timertask is added and never cleaned up. I'm using Leonids for a "follow touch" emitter, and I don't run into problems if I destroy/clean up the previous particle system when a new down touch is detected.

jacobtabak avatar Jun 15 '20 22:06 jacobtabak