sandrofigo / VoxReader

A C# library to read .vox files created with MagicaVoxel
MIT License
62 stars 3 forks source link

KeyNotFoundException when parsing specific .vox files #8

Closed rbxrootx closed 1 year ago

rbxrootx commented 1 year ago

KeyNotFoundException when parsing specific .vox files I am experiencing a KeyNotFoundException when attempting to parse certain .vox files. The error message is:

System.Collections.Generic.KeyNotFoundException: 'The given key was not present in the dictionary.'

I have tried parsing several .vox files and have found that some of them work as expected, while others do not. I have not been able to identify any specific pattern or cause for the files that are causing this exception to be thrown.

I have attached a .zip of the vox file below, when parsing this file you will be presented with the error above:

Example.zip

Any help or guidance on this issue would be greatly appreciated. Thank you!

sandrofigo commented 1 year ago

Thank you for bringing this up! If I try to read the provided file I get the error The given key 'IMAP' was not present in the dictionary. It seems like I forgot to parse 'IMAP' chunks 😅

I will push a bug fix version as soon as possible.

sandrofigo commented 1 year ago

@rbxrootx this should be fixed with v2.1.2