Unity3DTiles icon indicating copy to clipboard operation
Unity3DTiles copied to clipboard

Don't load mesh for invalid stream

Open parkerabercrombie opened this issue 6 years ago • 0 comments

If a B3DM file does not match expected format, the loader should not try to load it. We found this problem because out application did not correctly identify an a network error, and fed and xml document into the B3DM loader, which resulted in an out of memory exception trying to create a mesh out of garbage data.

The loader checks for valid data, but only logs a warning and continues: https://github.com/NASA-AMMOS/Unity3DTiles/blob/master/Assets/Unity3DTiles/B3DMLoader.cs#L59 I think desired behavior is to bail out on loading the tile if the data is not valid B3DM.

parkerabercrombie avatar Oct 30 '19 23:10 parkerabercrombie