Skip to content

Conversation

@Angrevol
Copy link
Contributor

@Angrevol Angrevol commented Aug 5, 2025

Fixes #368

Fixes a segmentation fault that occurs when using "Set as Cover" from the reader context menu on downloaded chapters.
The crash , caused by GPU memory overflow, happens in RenderThread and affects both physical devices and Android emulator.

  • Modified setCustomCoverToCache() to analyze image dimensions before decode
  • Added calculateInSampleSize() helper to downsample large images

Fixes null2264#368

Prevent segmentation fault by applying size constraints during bitmap decode instead of after.
Large downloaded chapter images were causing GPU memory overflow before size validation.

- Add pre-decode size check using inJustDecodeBounds
- Implement calculateInSampleSize to downsample large images during decode
@null2264 null2264 merged commit 731cf68 into null2264:master Aug 6, 2025
1 check passed
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.

App Crashes When Setting Cover

2 participants