Comments (12)
I think I have it working now. I made sure the unregister was done after the map closed and that may have fixed the issue I had with curves not showing. Thanks for the fix and nice library!
from curve-fit.
Periodically, I'll get a NullPointerException when closing a map with a curve and then reopening it to show the curve again. I haven't isolated a pattern yet. Here is the stack trace:
java.lang.NullPointerException: Attempt to invoke interface method 'void com.makesense.labs.curvefit.interfaces.UiThreadCallback.publishToUiThread(android.os.Message)' on a null object reference
at com.makesense.labs.curvefit.impl.WorkerHandlerThread$1.handleMessage(WorkerHandlerThread.java:83)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
I'm trying to reproduce the issue. In WorkerHandlerThread
class, I have used a WeakReference
object to hold a callback reference to the CurveManager
class. Therefore, it is eligible for garbage collection. This could be causing some issue, but I'm still not sure. If you could provide me little more details like, steps to reproduce the issue or sending some dummy apk would be helpful to understand the problem better.
from curve-fit.
I'll look into it some more, but so far no pattern other than opening/closing map with curves. I set the CurveManager to null on map close so something with the weak reference could be the issue. I'm trying to delay showing the curves after map loaded to see if that fixes it.
from curve-fit.
I'm still getting periodic bug reports with this NPE. Any possibility of wrapping the code with a try/catch so the error doesn't cause a crash?
It's so random I can't offer any more information and the app is so large there is no way to provide you with a test case.
from curve-fit.
Hi,
I am unable to reproduce the issue of what you are facing right now. By this weekend, I'll release a new beta version of the library which will be compatible with Maps 3.0 beta. Please wait for that release.
from curve-fit.
Sorry for the delay.
This bug has been fixed in new 2.0.0 beta version. Please try using that.
from curve-fit.
I can't implement the Android Maps beta yet... any way you can add the fix to the current 1.1.0 release for those of us that need to run without the beta?
from curve-fit.
If you can tell me what was changed, I'll try to fix it myself on the non-beta version... it's frustrating to have NPEs in a production app for a nice library like this.
from curve-fit.
Sorry for late reply. I was on leave due to medical emergency. I will add the fix to the non beta version soon.
from curve-fit.
The patch is applied. Curve-Fit 1.1.1 is available now.
from curve-fit.
Well, 1.1.1 is actually worse. Not getting NPE, but also 95% of the time the curves do not render on the map. When it rarely renders, then multiple close/open of the map doesn't seem to ever show curves again until the app is restarted.
Is CurveManager.unregister necessary? I haven't been using it.
from curve-fit.
Calling unregister
method at the end is necessary. Otherwise, memory leaks will occur for sure. Also, the old GoogleMap
object will not be garbage collected and the Handler
uses this reference (old) to draw the PolyLine
(which will not have any effect).
from curve-fit.
Related Issues (8)
- Geodesic drawn Path LatLng List HOT 11
- Not compatible with Android Maps SDK 3.0 beta HOT 2
- Adjust curvature HOT 3
- CurveOptions width format? HOT 3
- Curve click error HOT 4
- Confused HOT 7
- show just once HOT 2
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 curve-fit.