Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Stale metadata in the cache #70

Open
mdrlzy opened this issue Jul 4, 2023 · 0 comments
Open

Stale metadata in the cache #70

mdrlzy opened this issue Jul 4, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@mdrlzy
Copy link
Member

mdrlzy commented Jul 4, 2023

Right now we are not removing lost resource meta, which causes npe:

06-09 00:56:01.152 E/ACRA    (16329): ACRA caught a NullPointerException for space.taran.arknavigator
06-09 00:56:01.152 E/ACRA    (16329): java.lang.NullPointerException
06-09 00:56:01.152 E/ACRA    (16329): 	at space.taran.arklib.domain.preview.RootPreviewProcessor.initKnownResources(RootPreviewProcessor.kt:128)
06-09 00:56:01.152 E/ACRA    (16329): 	at space.taran.arklib.domain.preview.RootPreviewProcessor.access$initKnownResources(RootPreviewProcessor.kt:15)
06-09 00:56:01.152 E/ACRA    (16329): 	at space.taran.arklib.domain.preview.RootPreviewProcessor$init$2.invokeSuspend(RootPreviewProcessor.kt:44)
06-09 00:56:01.152 E/ACRA    (16329): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
06-09 00:56:01.152 E/ACRA    (16329): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
06-09 00:56:01.152 E/ACRA    (16329): 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
06-09 00:56:01.152 E/ACRA    (16329): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
06-09 00:56:01.152 E/ACRA    (16329): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
06-09 00:56:01.152 E/ACRA    (16329): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
06-09 00:56:01.152 E/ACRA    (16329): 	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@a414215, Dispatchers.Default]
    private suspend fun initKnownResources() {
        _busy.emit(true)
        metadata.state().forEach { (id, meta) ->
            val path = index.getPath(id)!!
            generate(id, path, meta)
        }
    ...
    }

RootPreviewProcessor takes meta, but there is no such id in index, because resource was deleted, but meta was not deleted
See ARK-Builders/arklib#40

@mdrlzy mdrlzy added the bug Something isn't working label Jul 4, 2023
@kirillt kirillt moved this to Todo in Development Oct 15, 2023
@kirillt kirillt changed the title Stale meta Stale metadata in the cache Nov 18, 2023
@kirillt kirillt added the good first issue Good for newcomers label Nov 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Archived in project
Development

No branches or pull requests

2 participants