Skip to content

GalleryAdults: Fix app crash#13346

Merged
AwkwardPeak7 merged 1 commit intokeiyoushi:mainfrom
cuong-tran:galleryadults
Feb 14, 2026
Merged

GalleryAdults: Fix app crash#13346
AwkwardPeak7 merged 1 commit intokeiyoushi:mainfrom
cuong-tran:galleryadults

Conversation

@cuong-tran
Copy link
Contributor

Fetch pages sequentially to avoid concurrent modification of the list

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String eu.kanade.tachiyomi.multisrc.galleryadults.Genre.getName()' on a null object reference

Checklist:

  • Updated extVersionCode value in build.gradle for individual extensions
  • Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions
  • Referenced all related issues in the PR body (e.g. "Closes #xyz")
  • Added the isNsfw = true flag in build.gradle when appropriate
  • Have not changed source names
  • Have explicitly kept the id if a source's name or language were changed
  • Have tested the modifications by compiling and running the extension through Android Studio
  • Have removed web_hi_res_512.png when adding a new extension

Fetch pages sequentially to avoid concurrent modification of the list

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String eu.kanade.tachiyomi.multisrc.galleryadults.Genre.getName()' on a null object reference
Copilot AI review requested due to automatic review settings February 13, 2026 06:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an app crash caused by a NullPointerException when attempting to access Genre names. The root cause was concurrent modification of the tags list during parallel page fetching. The fix changes tag fetching from concurrent to sequential execution to prevent race conditions.

Changes:

  • Replaced concurrent tag fetching (using runBlocking, Job, and joinAll) with sequential fetching using forEach
  • Added proper resource cleanup with .use { } for HTTP response handling
  • Improved exception handling with finally block to ensure tagsFetchAttempt is always incremented
  • Applied code style improvements (expression body functions, formatting)
  • Incremented baseVersionCode from 5 to 6

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib-multisrc/galleryadults/src/eu/kanade/tachiyomi/multisrc/galleryadults/GalleryAdults.kt Fixed concurrent modification bug by switching to sequential tag fetching; added proper resource cleanup; applied code style improvements
lib-multisrc/galleryadults/build.gradle.kts Incremented baseVersionCode to 6 to reflect the bug fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AwkwardPeak7 AwkwardPeak7 merged commit bf527db into keiyoushi:main Feb 14, 2026
7 of 8 checks passed
@cuong-tran cuong-tran deleted the galleryadults branch February 14, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants