3drepo / 3drepobouncer

A C++ library providing 3D Repo Scene Graph definition, repository management logic and manipulation logic. It is is essentially the refactored 3DRepoCore and (parts of) 3DRepoGUI
GNU Affero General Public License v3.0
29 stars 13 forks source link

Revit model import crash #647

Closed carmenfan closed 9 months ago

carmenfan commented 11 months ago

Description

Quite often we get a rvt model processing that crashes during ODA trying to read the file.

It would be good to get to the bottom of it - whether we can solve it, or we can understand what is causing it so we can let users know what to avoid.

Steps to replicate

try to upload a problematic model

Current Behaviour

crashes with a log that looks abit like this: image

Expected Behaviour

should process as expected.

Files

https://asitesol.sharepoint.com/:u:/s/3DRepoTeamFolder/EY60pXGxn_BHnyMqTssTH6IB-p0qsTfR9pkDB9gRYPfcqg?e=4hZ8UK

sebjf commented 9 months ago

The crash comes from an unhandled exception working out the Uvs.

The way the UVs are computed in the newer versions of ODA is via an OdGdiMapper object. There is no documentation about this; our code is based on the Kernel SDK ColladaExportView.cpp.

The mapper object was being used when it was null.

The fix is to add additional checks before using the mapper, and if one is not available, not to write the UVs.