-
-
Notifications
You must be signed in to change notification settings - Fork 365
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 #5241
Comments
Displaying the downloaded area sometime triggers crashes on startup. I think there also is a different one leading to crashes in the same line I tried a few things to fix it, but since the error is rather elusive, it takes a while to notice that a fix attempt is actually not working. |
Regardless of this reported crash: Multi-threaded access to shared resources must always be inside
More discussion and examples of what can go wrong are in the JLS section Memory model; from a quick google, Kotlin appears not to change all this (seems just an unreadable syntactic sugar around the same JVM?) so if that code is multithreaded, that should be synchronized right away. As a general rule, it's These and other common mistakes are covered in the well-known book |
Synchronization alone does not solve this problem as it only prevents concurrent accesses. If a MapData is disposed in one thread, other threads must still check that the data isn't disposed before calling any function on it when it's their turn to access the MapData. However, this is not currently supported by tangram. For details, see #2879. |
I managed to reproduce the crash by starting SC completely zoomed out with location off. Opening the undo history zooms to the position of the last edit and triggers the crash (a slow phone and a debug APK might help). Using |
Yes, you're right. In this case it's probably the following line disposing the MapData of a previous Line 18 in c2d325e
I thought that the problem may be related to some Android lifecycle changes where the entire tangram MapController is disposed of. |
I assume that could still trigger the crash, but more rarely and (presumably) only while the app is being closed. |
Possibly fixed by #5269 |
It's a while I did not use StreetComplete. I opened it, it was at a very low zoom (showed Europe, Africa, part of America) and I zoomed a bit around South Egypt. The app crashed.
Versions:
StreetComplete 53.3 from F-droid on Android 7.1
The text was updated successfully, but these errors were encountered: