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

Don't hide out-of-memory during FBX import #4801

Merged
merged 1 commit into from Nov 18, 2022

Conversation

jakrams
Copy link

@jakrams jakrams commented Nov 18, 2022

If an out-of-memory exception is thrown during model import, it is usually trickled up by assimp and we can determine that it is the reason for failure. However, this particular code path in the FBX importer would just blindly swallow all exceptions and simply ignore a part of the mesh. That lead to issues where parts of a mesh or the entire model were skipped and assimp reported successful import.

I'm generally not that happy that code just catches exceptions and claims it's all fine, even though it doesn't even try to figure out what kind of exception this was. IMO this is very fragile.
Though more specifically, an out-of-memory situation should always be treated as a serious error, since it is unlikely that the following code will be able to continue.

Copy link
Member

@kimkulling kimkulling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I guess this will help a lot of people. Thanks!

@kimkulling kimkulling merged commit 6392dbf into assimp:master Nov 18, 2022
@kimkulling
Copy link
Member

Merged, thanks a lot for your contribution.

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

Successfully merging this pull request may close these issues.

None yet

3 participants