-
Notifications
You must be signed in to change notification settings - Fork 985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invalidate() flood #411
Comments
Does this happen on the sample app too? might be related to #164 I can't recreate it with the sample app on the "Starter map" example. Do you have the compass visible by chance? Perhaps it's related to #400 or #283 The only thing i'm seeing that unexpected in the logs is this after zoom in/zoom out |
I currently lack the time to set up the sample app. I am not using compass. I use MyLocationNewOverlay and a self written overlay for app/game related items on map. The latter overlay might not fully optimal yet, but it easily copes with usual scoll and use load. I've seen abover error message occasionally, need to check, if this is often. |
https://play.google.com/store/apps/details?id=org.osmdroid&hl=en or download the latest release package and install the APK yourself. The sample map has everything in it and it's what we use for qa/testing |
So if I can't reproduce it, there isn't much i can do. The osmdroid sample map does not exhibit this behavior which leads me to believe it's probably something in your code. What my location overlay are you using? There could be a test case that we're missing too. In either case, I need more information |
Sorry for being not helpful enough. It's all a matter of time. Just to keep you updated: Cursory toying around with v5.4.1 and an 6.0.0 emulator, I could now see this behaviour also on 6.0.0. It only happens on certain zoom out. Zoom in and scroll are immune. The sequence "going wild" contains a mixture of above thread dumps and Choreographer ones:
Seems like the zoom out animation kind of gets stuck going forever. |
might be related to #413 |
Nothing conclusive, but some intermediate results. I am testing modified (debug code) snapshot builds of osmdroid now.
|
Is it second zoom out triggered before the first ends? it could be a synchronization issue. Are the zoom out events fired before the map is displayed? |
No sync, no action before map is displayed: A working touch sequence here is: "Start App", "Wait for map display", "touch for dynamic zoom buttons", "unzoom", "wait for unzoom to finish", "touch for dynamic zoom buttons", "unzoom" => Freeze. Map can not be scrolled any more, "lock" can be releaved by a double touch, i.e. one zoom in. |
Are you using the built in zoom controls? |
Yes, the built in zoom controlls. |
I'm still having problems reproducing on 6.0 hardware and the emulator. What kind of device is this on? Again, does this happen on the example app or this behavior only in yours? |
My App. I have not yet setup the building of the example app. Too many lose ends, to little time. I have the issue here now on an S4Active A4.2.2 on an Android 5X Emulator A6.0 and I have a user report from an Moto G (2nd Gen) A6.0. I have another user report from an Sony device which seems immune. |
Can you download the sample app? It's on github under releases or on Google On Sep 20, 2016 1:57 AM, "InI4" notifications@github.com wrote:
|
I wasn't aware, the test app was available on Googe Play. I've put it on my "hardcode" A4.2.2 device. I can not reproduce the issue there. On OSMapView with TilesOverlay (wo custom TileSource) zooming in is very much broken: Map is only painted here after you scroll after the zoom. Zooming out however works flawless. I also fail to fail in the Bug Drivers section. However toying with my own MapController branch, I got my App to behave seemingly better (user reports not complete, data not exactly matching): I moved the statement |
@InI4 well one issue at a time. If you can't reproduce the issue with the sample app, then it's probably something specific with your code.
|
I apologize I have no deep understanding of the Android View hierarchy. It would obviously help more, if someone looked into it, who understood, what happened. But maybe this points in some direction: But I introduced some debug code lately in my osmdroid branch: I traced all calls to invalidate(), invalidateDelayed(), postInvalidate() and postInvalidateDelayed() and found no code of my app being called on corresponding traces, That is, my observed endless events seem to be triggered by interaction between MapView.computeScroll() and MapView.setZoomLevel(). Apparently an invalidate can trigger a computeScroll(), can trigger a setZoomLevel() and both can trigger invalidations, in my case occasionally infinite ones. For now I am going to release my next app test version with the call to setZoomLevel() being removed from computeScroll(). |
It is reproducible with the "Follow me" sample. |
@InI4 Still happening? Can we close this issue? |
@monsieurtanuki I did not observe this behavior with 6.0.2 so far. |
My app here has a "near ANR" after app start on Android 4.2.2.
I am researching this for a few days now. I am running out of ideas now.
I have a map view. After first fix, when I press unzoom UI button (i.e. zoom out), the MapView starts repainting at 30 frames per second. This suffices to block main thread (due to an self written overlay). There are no tiles loaded, no invalidates() issued from the app code. The repainting does not stop (overloading map view by my own class, I see a continuous flood of invalidate() calls not issued by any application part)
The map is frozen then while the non map UI stays responsive. This does not end by itself. Only way to stop it, is a scroll on the map, which is hard to achive, cause map is so busy repainting. There
Once this flooding has been stopped by a scroll, everything is fine and map is working as expected.
Any hint, where this flood of messages might be coming from?
This issue happens in similar ways on 5.2 and 5.4.
The text was updated successfully, but these errors were encountered: