Skip to content

Already closed openpage fix#1

Open
eVoloshchak wants to merge 3 commits into
Expensify:mainfrom
wildan-m:already-closed-openpage-fix
Open

Already closed openpage fix#1
eVoloshchak wants to merge 3 commits into
Expensify:mainfrom
wildan-m:already-closed-openpage-fix

Conversation

@eVoloshchak

@eVoloshchak eVoloshchak commented Jul 6, 2026

Copy link
Copy Markdown

Explanation of Change

Fixed Issues

$ Expensify/App#93839
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

wildan-m added 3 commits June 17, 2026 23:54
These were the only PdfDocument methods using an unconditional
check(!isClosed) instead of handleAlreadyClosed(), so a configured
AlreadyClosedBehavior.IGNORE never reached them. A render that lands on
a just-closed document threw IllegalStateException on the renderer
thread (PdfiumCore.renderPageBitmap -> openPage), which the barteksc
RenderingHandler does not catch, crashing the app. Now they route
through handleAlreadyClosed() like every sibling method and, when IGNORE
is set, return a page bound to the closed document so all further ops
no-op via the existing doc.isClosed guards.
@eVoloshchak

Copy link
Copy Markdown
Author

Coming from Expensify/App#94894
@wildan-m, could you please check if you're able to open a PR in this repo yourself?

Comment thread jitpack.yml

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@wildan-m, I suspect this isn't needed?

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