SCEE
SCEE copied to clipboard
Switching custom overlays don't update the rendering
Switching between custom overlays doesn't update the rendering of them, and they will show still the rendering before.
Hacky workaround: click on a standard overlay while switching updates them properly.
Screenshot
https://github.com/user-attachments/assets/c336784b-ef6e-4b38-8566-8081f461d9e0
How to Reproduce
- create two different custom overlays
- switch between them
- observe bug
Expected Behavior
- rendering should work fine
Does it happen in normal StreetComplete? No, because there are no custom overlays
Versions affected Android 12 SCEE 58.22
Hacky workaround
Triple tap, much faster.
Yeah I noticed that too. But I think it was more interesting, that the switching between regular and custom overlays have different effect than between custom ones.
I can confirm the bug on SCEE 59.0-beta1 too. Few notes:
- using regular overlay selector (instead of quick overlay) do not have any effect (i.e. bug still appears)
- turning overlay off before switching to other custom overlay avoids the bug
Download data herealso fixes the display- panning (by significant [non-cached?] amount) or zooming also fixes the display
Settings/Quests/Create quests dynamicallydoes not seem to have any effect (i.e. bug still appears)
See https://github.com/Helium314/SCEE/pull/566#issuecomment-2563868279
@RubenKelevra (and everybody else) Is this still a problem for you in SCEE 60.0? It seems to be working fine for me now (on Android 14):
Video (click to expand)
https://github.com/user-attachments/assets/48eb09c9-a939-4495-ae4a-fb6b765ff52d
Testing this moved me to a crash loop again, yeah.
Details
type: crash
osVersion: google/oriole/oriole:15/AP4A.241205.013/2024121200:user/release-keys
package: de.westnordost.streetcomplete.expert:6003, targetSdk 34
process: de.westnordost.streetcomplete.expert
processUptime: 875 + 206 ms
installer: dev.imranr.obtainium
java.lang.NumberFormatException: Expected a hexadecimal digit at index 0, but was -
at kotlin.text.HexExtensionsKt.throwInvalidDigitAt(HexExtensions.kt:1247)
at kotlin.text.HexExtensionsKt.parseByteAt(HexExtensions.kt:1213)
at kotlin.text.HexExtensionsKt.hexToByteArrayShortByteSeparatorNoPrefixAndSuffix(HexExtensions.kt:444)
at kotlin.text.HexExtensionsKt.hexToByteArrayNoLineAndGroupSeparator(HexExtensions.kt:421)
at kotlin.text.HexExtensionsKt.hexToByteArray(HexExtensions.kt:407)
at kotlin.text.HexExtensionsKt.hexToByteArray(HexExtensions.kt:367)
at de.westnordost.streetcomplete.util.ktx.ColorKt.toRGB(Color.kt:48)
at de.westnordost.streetcomplete.screens.main.map.components.StyleableOverlayMapComponent.getDarkenedColor(StyleableOverlayMapComponent.kt:385)
at de.westnordost.streetcomplete.screens.main.map.components.StyleableOverlayMapComponent.toFeatures(StyleableOverlayMapComponent.kt:334)
at de.westnordost.streetcomplete.screens.main.map.components.StyleableOverlayMapComponent.set(StyleableOverlayMapComponent.kt:226)
at de.westnordost.streetcomplete.screens.main.map.components.StyleableOverlayMapComponent$set$1.invokeSuspend(StyleableOverlayMapComponent.kt:0)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:832)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@ae81b19, Dispatchers.Default]
Testing this moved me to a crash loop again, yeah.
Weird thing: this bug must have existed since implementing the "randomized" (hash-based) colors for custom overlays. Apparently it's really rare that a string's hashcode is negative.
Ok, somehow managed it out of it.
Switching custom overlays works.
Switching custom overlays works.
Great, so I'll close this as fixed!