gltf-viewer crashed when loading a gltf file
Closed this issue · 5 comments
Did you solve this issue yet? I encountered the same error with gltf 1.0 and 2.0.
There is no glTF file attached here.
The gltf files I tried to load is from the sample models here. https://github.com/KhronosGroup/glTF-Sample-Models.
The error was stack overflow in RapidJson. BTW, I built gilt-viewer using windows visual studio 2019. Not sure if it's a environment issue.
I have no issues with those in MSVC.
Seems to be an issue with rapidjson's recursive parser causing a stack overflow. After a little digging I found this: Tencent/rapidjson#1027 (comment)
Following those instructions I added #define RAPIDJSON_PARSE_DEFAULT_FLAGS (kParseIterativeFlag)
right before the include in third_party/rapidjson_wrapper.hpp
, which fixed the issue for me.