streetcomplete / StreetComplete

Easy to use OpenStreetMap editor for Android
https://streetcomplete.app
GNU General Public License v3.0
3.87k stars 353 forks source link

SC 45.1: SC shows error when layer switched - stack trace #4259

Closed pawlosck closed 2 years ago

pawlosck commented 2 years ago

Describe how to reproduce it here: I don't know. It happened, when I tried to see layers in SC. First, I checked lighting, next pavements and last I set to None (possible translations is wrong, but I am using non english SC). After pavements, SC started shows me popup to send email with this stack trace. I saw this popup every time when I tried to open SC. After few minutes, everything works correctly and I can't reproduce it again.

java.lang.RuntimeException: Tried to perform an operation on an invalid pointer! This means you may have used a MapData that has already been removed. at com.mapzen.tangram.MapData.checkPointer(MapData.java:116) at com.mapzen.tangram.MapData.clear(MapData.java:108) at de.westnordost.streetcomplete.screens.main.map.components.StyleableOverlayMapComponent.clear(StyleableOverlayMapComponent.kt:95) at de.westnordost.streetcomplete.screens.main.map.StyleableOverlayManager.clear(StyleableOverlayManager.kt:101) at de.westnordost.streetcomplete.screens.main.map.StyleableOverlayManager.access$clear(StyleableOverlayManager.kt:28) at de.westnordost.streetcomplete.screens.main.map.StyleableOverlayManager$mapDataListener$1.onReplacedForBBox(StyleableOverlayManager.kt:61) at de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource.callOnReplacedForBBox(MapDataWithEditsSource.kt:435) at de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource.access$callOnReplacedForBBox(MapDataWithEditsSource.kt:32) at de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource$mapDataListener$1.onReplacedForBBox(MapDataWithEditsSource.kt:110) at de.westnordost.streetcomplete.data.osm.mapdata.MapDataController.onReplacedForBBox(MapDataController.kt:236) at de.westnordost.streetcomplete.data.osm.mapdata.MapDataController.putAllForBBox(MapDataController.kt:77) at de.westnordost.streetcomplete.data.osm.mapdata.MapDataDownloader$download$2.invokeSuspend(MapDataDownloader.kt:33) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

pawlosck commented 2 years ago

Today, SC crashed with the same message. I lost few tasks.

matkoniecz commented 2 years ago

Has it happened with overlay enabled? Has it happened in the same place?

Not really sure is it worth doing - but in case there is some weird corruption you can uninstall and install app again.

pawlosck commented 2 years ago

Today, it happened when overlay enabled, but yesterday, I am not sure. what do you mean the same place? You mean the same place in app? if yes, it happened in few different places. Yesterday, it happened, when I tried to run app and SC started to find new tasks. Today it happenend when I tried to cut road. SC crashed.

matkoniecz commented 2 years ago

No, in the same place while mapping (maybe OSM data at specific location is triggering some bug? unlikely, but who knows)

pawlosck commented 2 years ago

I suppose 2-3 km. I can try to go other part of city and then I can confirm your suspicions.

pawlosck commented 2 years ago

The same problem. I had overlay disabled and SC still crashing. I checked in other part of the city. SC crashed when I had new note opened and I minimized SC to see something in Android. Currently, this app is extremely unstable.

mnalis commented 2 years ago

Currently, this app is extremely unstable.

That is very strange; I've been using SC for years and have not seen such case of instability. It seems to be something specific to your device which is crashing inside tangram library used to display the map. Unfortunately debugging this more deeply is beyond me, but it seems to be crashing when trying to clear cached map data.

Could you share:

What I would also try:

pawlosck commented 2 years ago

What I would also try:

* go to `Settings` / `delete cache`. Does the app crash immediately? If not, does it solve the problem or does it reappear?

Your suggestion is great. Yesterday, I cleared cache and today by few hours I was using SC and everything ok. I hope, it solves problem permanently. I checked with and without overlay enabled.

westnordost commented 2 years ago

Hmm, I think I found something. Fixed that.