Tried loading an 87MB DDS Array file and the export program buffers then crashes. I tested a 43MB and it didn’t crash but all the 87MB ones crashed.
Hi @brooen22, thanks for reporting this bug! Could you send me one of the DDS files that crashes (either via DM or via email at nbickford@nvidia.com) so I can test it out? One of my goals is that the exporter should ideally never crash.
Thanks!
–Neil
I can confirm that @brooen22’s DDS file crashes the Exporter – thanks for finding this bug! Here’s a quick summary of what’s going on:
- When the Exporter loads a file, it internally loads it into a texture atlas. Array elements are arranged vertically.
- This DDS file has 32 elements, and mip 0 has a size of 2048x2048x1. 2048x2048x1 is fine, so the DDS importer accepts it.
- This means that the atlas has a height of 65536 pixels.
- That’s larger than the maximum height of a texture NVTT supports, which is 65535 pixels, so image allocation fails.
- But the Exporter didn’t check whether image allocation succeeded, so it tries to access a null image, and crashes.
I’ll try to fix this or at least return an error message. Thank you again for reporting this!