Model import crashes the Unity Editor
See original GitHub issueWhen 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 https://github.com/atteneder/glTFast/issues/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
"com.atteneder.gltfast": "4.6.0",
"com.atteneder.ktx": "file:../mypackages/KtxUnity",
editor.log
Start importing Assets/Avocado/Avocado.gltf using Guid(a7299cc32fc4d43a3856f49f0bc3efcf) Importer(-1,00000000000000000000000000000000) Assertion failed: (colorModel == KHR_DF_MODEL_UASTC), function ktxTexture2_TranscodeBasis, file /Users/runner/work/KTX-Software-Unity/KTX-Software-Unity/KTX-Software/lib/basis_transcode.cpp, line 177.
Obtained 0 stack frames.
Launching bug reporter
Assertion failed: (colorModel == KHR_DF_MODEL_UASTC), function ktxTexture2_TranscodeBasis, file /Users/runner/work/KTX-Software-Unity/KTX-Software-Unity/KTX-Software/lib/basis_transcode.cpp, line 177.
Obtained 0 stack frames.
Launching bug reporter
Assertion failed: (colorModel == KHR_DF_MODEL_UASTC), function ktxTexture2_TranscodeBasis, file /Users/runner/work/KTX-Software-Unity/KTX-Software-Unity/KTX-Software/lib/basis_transcode.cpp, line 177.
Obtained 0 stack frames.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Unity crashing on asset import
I import unitypackage files either from my hard drive or downloaded from the asset store and randomly Unity crashes.
Read more >unity crashes whenever i try importing a certain package
unity crashes whenever i try importing a certain package ... I would check the Unity editor log files and see if there's a...
Read more >Crash when importing a specific FBX asset - Unity Issue Tracker
Open a new Unity project 2. Try to import the "crash_fbx. ... Actual result: Editor crashes when trying to import the FBX asset....
Read more >unity crashes after git reset with no hint on what is going on
As mentioned by @RetiredNinja and @PSGuy, the solution is to: git clean -fdx with Unity closed; Doing restore tests with another local repo ......
Read more >Unity Editor Crash Using OVRLipSync On MacOS
I have noticed however if we create a whole new Unity project (same Unity Editor version) and import the OVRLipSync package then run...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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!
@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.