Help debugging a Windows-only 0xc0000005 crash while decoding real-device HEIC files

Help debugging a Windows-only 0xc0000005 crash while decoding real-device HEIC files
Hi everyone, I maintain offpdf, an open-source, offline PDF toolkit built with Tauri and Rust. We are trying to support HEIC/HEIF-to-PDF conversion on Windows, but we have reached a native crash that we have not been able to explain yet. What we know: Two independent real-device HEIC files—one from an iPhone and one from an Android device—immediately terminate the packaged Windows 11 x64 application during import. Both crashes produce exception code 0xc0000005 at the same executable offset: 0x0000000000809d06. A synthetic HEIC/HEIF fixture successfully decodes and converts in the same Windows release workflow. The decode path uses one bounded decoder, limits compressed and decoded size, validates dimensions before allocation, uses a single decoder thread, and serializes image conversions. Rust tests, the Windows build, installation, startup smoke test, and Microsoft Defender scan all pass. The failure happens before a PDF is produced and appears to cross the Rust/native-library boundary. We are currently missing a symbolicated native stack trace and a shareable real-device fixture. The original test images contain personal metadata, so we will not publish them. We would especially appreciate guidance on: Capturing and symbolizing this kind of 0xc0000005 crash in a packaged Tauri/Rust application. Checking for ABI, codec-plugin, or runtime-library mismatches in the Windows HEIC decoder. Known differences in real-device HEIC files such as grids, orientation, auxiliary images, HDR or gain maps that synthetic fixtures may not exercise. Tracking issue and implementation details: github.com/McanKul/offpdf HEIC-to-PDF import crashes the application opened 08:41PM - 06 Aug 26 UTC McanKul bug priority: high ## Summary Importing a `.heic` image for conversion to PDF can cause OffPDF to …exit instead of completing the conversion or showing a recoverable error. HEIC and HEIF use the same decode path, so both formats should be covered by the fix. Support for these formats was introduced in #1. ## Steps to reproduce 1. Launch OffPDF. 2. Add a `.heic` image with the file picker or drag and drop. 3. Wait for the automatic image-to-PDF conversion. 4. The application exits during conversion. ## Expected behavior A valid HEIC image is converted to a one-page PDF and added to the workspace. If the file cannot be decoded or is too large, OffPDF should stay open and show a useful error. ## Details to capture - OffPDF version/build - OS and architecture - HEIC source/device - Image dimensions and bit depth - Single-file or batch import - Crash report or terminal output ## Acceptance criteria - [ ] Representative `.heic` and `.heif` files convert on the shipped Windows x64 and macOS arm64 builds. - [ ] Invalid, truncated, or unsupported files return an in-app error without terminating OffPDF. - [ ] Large images are rejected safely or converted without uncontrolled memory use. - [ ] Single-file and batch imports do not crash. - [ ] A regression test covers decode, JPEG conversion, and PDF creation. - [ ] Release smoke tests perform an actual HEIC conversion. We are happy to create a minimal standalone reproducer once we identify the most useful diagnostic path. Thanks for any pointers—and if our integration is wrong, we would genuinely like to understand and fix it properly.

Take Your Experience to the Next Level

New

Download our mobile app for a faster and better experience.

Comments

0
U

Join the discussion

Sign in to leave a comment

0:000:00