Skip to content
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

Crash after restart app #5048

Closed
Jean-BaptisteC opened this issue May 30, 2023 · 6 comments
Closed

Crash after restart app #5048

Jean-BaptisteC opened this issue May 30, 2023 · 6 comments
Labels

Comments

@Jean-BaptisteC
Copy link
Contributor

How to Reproduce

  • Close app
  • Start app -> app crashed (never reproduce)

Versions affected
Android 13 - v53.0

@westnordost
Copy link
Member

What do you mean with "close app"?

@Jean-BaptisteC
Copy link
Contributor Author

Go to list of app opened and swipe StreetComplete to close it

@westnordost
Copy link
Member

This puzzles me, how can a crash happen on cold start of the app?

Anyway, I noticed that this is a problem in tangram-es, so an upstream issue.

This seems to happen extremely scarcely so I won't bother with some kind of workaround that may or may not work.

@westnordost westnordost closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2023
@Helium314
Copy link
Collaborator

@westnordost do you remember the reason for

// tangram does not clear a layer properly on re-setting features on it, so let's remove
// and re-add the whole layer
layer?.remove()
val layer = ctrl.addDataLayer(DOWNLOADED_AREA_LAYER)

I tried removing the part above and

-    private var layer: MapData? = null
+    private val layer: MapData = ctrl.addDataLayer(DOWNLOADED_AREA_LAYER)

and

+        layer.clear()
         layer.setFeatures(listOf(
             Polygon(
                 polygons.map { polygon -> polygon.map { it.toLngLat() } },
                 mapOf()
             )
         ))
-        this.layer = layer

and didn't have a crash so far (instead of once every ~10 app starts).

@westnordost
Copy link
Member

What do you mean, reason for that? The reason is explained in the comment above.

Do you remember, we (still) have the issue that when you solve a quest and then zoom out, the solved quest seems to reappear (flickering, while zooming out) again, because apparently the pin is still in the cache for the other zooms or something. A similar phenomen only more noticeable (IIRC) could be seen with the downloaded area visualization.

@Helium314
Copy link
Collaborator

The reason is explained in the comment above.

"tangram does not clear a layer properly on re-setting features on it" isn't particularly clear on the issues it causes, that's why I asked. Thanks for the clarification.

So it's occasional crashes at startup or flickering in non-downloaded areas...
Since it only happens on startup, maybe starting with an empty layer instead of null helps. I'll try that for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants