-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Model import crashes the Unity Editor #52
Comments
@seyfeb Thanks for reporting! I can reproduce the issue. I tried to view this file in two alternative glTF viewers and they also threw errors. Looking at the KTX file (via Where does this file come from? I presume it's an attachment of an older GH thread, right? Is there a link to its context? |
Nevermind, I figured it's from here. Don't use this asset. It was created during development of KTX-Software and is probably outdated. |
This is a known Unity issue. Use gltfpack's |
Good to know it’s a different issue. While having the other one I thought it might be related... So the only thing that remains here is the question how to avoid the crash at all (even for malformed data)! Btw, thanks for the work you put into these open-source libraries! |
@seyfeb You're right about crashes are not a reasonable reaction to corrupt data. Since the assertion is inside the third party code, I forwarded the request in a discussion. Let's see what their answer is. |
@atteneder how come you are using a debug version of libktx in Unity? The encoders, especially ETC1S, are much slower when compiled in debug mode. |
@MarkCallow That's a great question! I assumed asserts are active in release builds as well, but that's not true. Turns out my macOS build was misconfigured. After re-building the lib, libktx returns a proper error and does not crash anymore. Thanks for pointing it out! |
When importing a glTF model in Unity using glTFast and the KtxUnity package the Unity editor crashes. This is observed when KtxUnity is added via the file system (either the current main branch or the commit tagged 2.0.1. If I add the package via git URL glTFast claims that the KtxUnity package is not even available (see the issue in the glTFast repo atteneder/glTFast#381).
Expected behavior
The model is imported correctly. Addtitionally, a model import should never crash the editor or a runtime application, even for completely broken models.
OS: macOS
Unity editor version: 2021.2.19f1
KtxUnity version: main / 2.0.1
Test model: https://github.com/KhronosGroup/glTF/files/4132437/Avocado.zip
package.json
editor.log
The text was updated successfully, but these errors were encountered: