Skip to content

Read the AcDs data blob reference records from the blob01 pages#1156

Open
ilCosmico wants to merge 1 commit into
DomCR:masterfrom
ilCosmico:fix/acds-blob01-read
Open

Read the AcDs data blob reference records from the blob01 pages#1156
ilCosmico wants to merge 1 commit into
DomCR:masterfrom
ilCosmico:fix/acds-blob01-read

Conversation

@ilCosmico

Copy link
Copy Markdown
Contributor

In the AcDs data section a record whose payload does not fit in the data segment is stored as a data blob reference: the size field carries the fixed marker 0xBB106BB1, followed by the total size and the list of pages, and each page lives in a blob01 file segment addressed through the segment index. The reader did not know the marker, validated the record as a plain inline payload, failed, and dropped it. The owning entity came back with no ACIS payload.

I hit this on a 2013 file where one solid out of 89 carried a ~407 KB payload: that one entity was skipped while everything else loaded fine.

The fix keeps the segment index offsets around while reading the directories, recognizes the marker during record validation, and assembles the payload from the blob01 pages. Each page declares its own start offset, so the stream order does not matter. A synthetic two-page test covers the reassembly.

@ilCosmico
ilCosmico force-pushed the fix/acds-blob01-read branch from 43e8a1e to 0962893 Compare July 20, 2026 10:05
@DomCR

DomCR commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Hi @ilCosmico,

This PR collides with:

which I'm reviewing for the Prototype1b implementation. Do we need this one if the other gets approved?

@ilCosmico

Copy link
Copy Markdown
Contributor Author

Thanks @DomCR. Agreed that #1154 is the better base for the section itself: parsing the whole Prototype1b into DataStorage, with the blob01 pages reassembled, covers more than the incremental reader.

One catch before we close #1156, though. #1154 also drops the per-entity wiring that #1139/#1146 added.
In DwgReader the foreach (ModelerGeometry entity ...) entity.AcisData = payload loop is replaced by just storing document.DataStorage, so the parsed ACIS payload ends up on the document but never reaches ModelerGeometry.AcisData, which is where downstream code reads the SAB stream for 3DSOLID/REGION/BODY and the surface entities on 2013+ files. It's silent rather than a crash, so a load test wouldn't catch it.

So the two are really complementary: #1154 parses the section, but something still has to hand the ACIS blobs from DataStorage back to ModelerGeometry.AcisData. Happy to close #1156 once that's back in, or I can rebase it to do exactly that on top of your DataStorage instead of the old reader. Whichever you'd rather.

#1155 is separate (different files), so it's unaffected either way.

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