Skip to content

Read every page of a multi-page blob in the Prototype1b section - #1305

Merged
DomCR merged 1 commit into
DomCR:masterfrom
ilCosmico:fix/prototype1b-blob-pages
Oct 15, 2026
Merged

DomCR merged 1 commit into
DomCR:masterfrom
ilCosmico:fix/prototype1b-blob-pages

Conversation

@ilCosmico

Copy link
Copy Markdown
Contributor

DwgPrototype1bReader.readDataFields reads the (segment index, size) pair of a blob page, jumps to that blob01 segment and reads its data, but it never moves back. From the second page on, the next pair is read from inside the data of the previous page, the segment index is garbage and the read throws an ArgumentOutOfRangeException. The exception stops the whole section, so every ModelerGeometry in the drawing ends up without AcisData.

It happens as soon as one ACIS payload needs more than one blob page, a little over 2 MB in the files I tried. I hit it on a 2013 DWG with a solid stored in 7 pages, and I could reproduce it with a single extruded polygon with a lot of sides.

The loop now saves the position after the pair and goes back to it once the page is read. With the fix the payloads match the ones from the obsolete DataStorage reader, on that drawing and on the other 2013+ DWG files with solids I have.

@DomCR DomCR added bug Something isn't working minor Updates the minor version on merge. labels Oct 15, 2026
@DomCR DomCR added minor Updates the minor version on merge. and removed minor Updates the minor version on merge. labels Oct 15, 2026
@DomCR
DomCR merged commit 25de68c into DomCR:master Oct 15, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working minor Updates the minor version on merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants