microg / microg/GmsCore

microG is crashed when viewing location setting (inside microG settings)

Open
#1,995 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

📍 Location bug
Dominant language
Java
Stars
14.6k
Forks
3.2k
Avg merge
12d 11h
Merged PRs (30d)
4

Description

Describe the bug
microG is crashed when viewing location setting (inside microG settings).

System
microG Service Core 0.2.28.231657-28 (a749fe4)
Android Version: 7.1.2
Custom ROM: LineageOS 14.1

Additional context

[ 07-27 17:33:47.854  1199: 1199 E/AndroidRuntime ]
FATAL EXCEPTION: main
Process: com.google.android.gms:ui, PID: 1199
java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/user/0/com.google.android.gms/databases/geoapps.db
	at android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55)
	at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1160)
	at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1036)
	at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1242)
	at org.microg.gms.location.manager.LocationAppsDatabase.listAppsByAccessTime(LocationAppsDatabase.kt:72)
	at org.microg.gms.location.manager.LocationAppsDatabase.listAppsByAccessTime$default(LocationAppsDatabase.kt:70)
	at org.microg.gms.location.ui.LocationPreferencesFragment$updateContent$1$1.invokeSuspend(LocationPreferencesFragment.kt:117)
	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:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading LocationAppsDatabase.kt around line 72 and LocationPreferencesFragment.kt around line 117, then reproduce the crash by opening the location settings in microG. Trace the geoapps.db lifecycle and verify that viewing the location settings no longer raises the reported SQLiteDatabase exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
databases, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.