Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allocation failure on parsing of BLOSC compressed VDB data #33

Open
EmilioLaiso opened this issue Jun 9, 2023 · 3 comments
Open

Allocation failure on parsing of BLOSC compressed VDB data #33

EmilioLaiso opened this issue Jun 9, 2023 · 3 comments

Comments

@EmilioLaiso
Copy link
Contributor

EmilioLaiso commented Jun 9, 2023

The uncompressed and zip code paths are correctly loading, the BLOSC code path results in what looks like wrong data loading / interpretation.

let num_compressed_bytes = reader.read_i64::<LittleEndian>()?;
[src\reader.rs:141] num_compressed_bytes = -1143914305352105984

Example assets:
Uncompressed: fire from https://www.openvdb.org/download/
Zip: bunny_cloud from https://www.openvdb.org/download/
BLOSC: Tornado Looping from https://jangafx.com/software/embergen/download/free-vdb-animations/

@Jasper-Bekkers
Copy link
Member

Notice a few things:

So potentially, try reading an i32 here instead and see what happens?

@EmilioLaiso
Copy link
Contributor Author

Nice! Thank you for the pointers! :)
Need to check if I can find a BLOSC compressed asset in the OpenVdb page, to exclude the second option

@EmilioLaiso EmilioLaiso changed the title Allocation failure on loading of BLOSC compressed VDB data Allocation failure on parsing of BLOSC compressed VDB data Jun 12, 2023
@EmilioLaiso
Copy link
Contributor Author

EmilioLaiso commented Jun 12, 2023

Little update on this as I'm putting it on pause: reading 32 or 64 bits before reading num_compressed_bytes gets us out of this assert, but we end up failing further down the line probably due to the shifted reader pointer. Also, the asset requires MultiPass I/O so we cannot even validate it at the moment, making any attempt into solving this unverifiable.

Let's pick this up in the future (either after MultiPass I/O or when we have a BLOSC asset that doesn't require it, maybe we can make one in EmberGen) :)

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

No branches or pull requests

2 participants