Skip to content

Fix crashes in NovelInfoActivity due to lifecycle issues#173

Open
MewX wants to merge 1 commit into
masterfrom
fix-novel-info-activity-crashes-8659018325587298001
Open

Fix crashes in NovelInfoActivity due to lifecycle issues#173
MewX wants to merge 1 commit into
masterfrom
fix-novel-info-activity-crashes-8659018325587298001

Conversation

@MewX
Copy link
Copy Markdown
Owner

@MewX MewX commented Feb 7, 2026

This PR fixes three distinct crashes in NovelInfoActivity:

  1. IllegalStateException: FragmentManager has been destroyed: Caused by manually calling onResume() from onPostExecute. Replaced with a new updateUI() method.
  2. IllegalArgumentException in WindowManagerGlobal.findViewLocked: Caused by dismissing dialogs after the activity is destroyed. Added checks for isFinishing() and isDestroyed() and wrapped dismiss() calls in try-catch blocks.
  3. Similar IllegalArgumentException in AsyncRemoveBookFromCloud.

Testing:

  • Verified compilation with ./gradlew assembleAlphaDebug.
  • Validated code changes manually.

PR created automatically by Jules for task 8659018325587298001 started by @MewX

… dismissed dialogs

Refactored `NovelInfoActivity` to extract UI update logic from `onResume` into `updateUI`. Updated `AsyncUpdateCacheTask`, `AsyncDownloadVolumes`, and `AsyncRemoveBookFromCloud` `onPostExecute` methods to use `updateUI` instead of manually calling `onResume`. Added checks for `isFinishing()` and `isDestroyed()` to prevent UI updates on a destroyed activity. Guarded dialog dismissal with try-catch blocks to handle `IllegalArgumentException`.

Co-authored-by: MewX <5752560+MewX@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Base automatically changed from v1.26 to master February 20, 2026 22:09
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.

1 participant