fix: crashes, vanishing PDFs, PDF export OOM; capture crash details (1.3.3) - #33
Merged
Merged
Conversation
Vanishing PDFs (App Store review, 1.3.2): notes stored absolute file:// URIs that embed the app container path, which iOS changes on updates, reinstalls and iCloud restores. The live canvas then loaded a missing PDF: annotations stayed, the PDF disappeared. The catalog now derives each note's pdfUri from its id (and persists the healed value once), and note bodies re-root inserted-image paths under the current documents folder. PDF export out of memory (Hermes OOM crash group, 1.3.1/1.3.2): every page raster was held as base64 in JS, regex-escaped and concatenated into one HTML string. Export now renders and prints 8 pages per pass and merges the pass PDFs natively (Core Graphics on iOS, PdfRenderer on Android). Base64 data URIs are no longer escaped (they cannot contain HTML-special characters). Crash capture (JS fatal crash group, 1.0-1.3.2; App Store logs drop the JS message): a global JS error hook records the error synchronously before the app terminates, a root ErrorBoundary turns render errors into a recovery screen, and the next launch offers to share the report. Nothing is sent automatically. Strings are localized in all 12 locales. Unknown deep links and Open-In file URLs now open the library instead of expo-router's Unmatched Route page.
mobile-ink 0.3.5/0.3.6 fix the selection crashes (Delete after Undo, CALayer NaN toolbar frame on pooled page reload). Localized release notes for all 13 store locales.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
App Store reviews on 1.3.2 report crashes "during work" and a PDF that "disappeared... annotations are still there". Xcode Organizer has 27 crash logs (1.0–1.3.2, all iPad, all SIGABRT), symbolicated with the official React Native and Hermes 0.81.5 dSYMs. They fall into four groups, each addressed here.
CALayerInvalidGeometry: position contains NaNinupdateSelectionToolbarFrameclear()kept a stale selection, so bounds were±FLT_MAX.CGRect.widthpassed the guard andmidXbecame NaN. Reproduced with the shipped engine and a realCALayer.std::length_error)size_tunderflow inreserve. The same bug deleted unselected strokes.escapeHtml, andconcatinbuildHtml.performVoidMethodInvocation→RCTFatal)Intl, Open-In URL routing.ErrorBoundarygives a recovery screen, and the next launch offers Share (never sent automatically).pdfUri/ image URIs were absolute and embedded the app container UUID, which iOS changes on updates, reinstalls and iCloud restores. Observed the container change 4 times in one simulator session.pdfUrifrom the note id and persists the healed value once. Note bodies re-root inserted-image paths.+native-intentmapsfile:/content:to/, and+not-foundredirects.Verification
npm run typecheckpasses.PDFUtilsModule.ktcompiles with Kotlin 2.1.20 against SDK 36 and React Native 0.81.5. Not run on a device or emulator.Known trade-off
On Android, exports longer than 8 pages are merged by rasterizing pages at 2x, because Android has no vector PDF merge API. Text boxes in those exports aren't selectable, and the merge isn't device-tested. iOS keeps vector pages. Android ships from source only.
Release
1.3.3 (16) with mobile-ink 0.3.6 and localized release notes in all 13 store locales.