Open volcoma opened 1 month ago
Since that library seems unsupported may i suggest https://github.com/simdjson/simdjson as a faster and safer alternative
@volcoma Please provide
hi it is basically any big model with animations. The one i am testing with is the Dancing Troll glb from the 3D Viewer app which comes with Windows 11 installed. There you can find a library of animated models and export them to glb. The file is 30mb so i cant attach it here. Basically with max optimizations i get the crashes every time, but when i lower the optimization levels a bit for when building assimp seems to not crash any more. Note the only thing i am changing is how i build the assimp library and nothing more
In my cmake file.
if(MSVC)
#Currently assimp crashes in full release build
# Remove the /O2 optimization flag from the default Release flags
string(REPLACE "/O2" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REPLACE "/O2" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
# Set lower optimization level for Release mode (for MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O1") # Optimize for size (lower optimization than /O2)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O1")
endif()
add_subdirectory( assimp )
...I tracked the causing commit to the one that updated rapidjson.
Please provide full url for that commit so others may understand exactly where you are referring to
There you can find a library of animated models and export them to glb.
Could the process of exporting to glb be contributing to the issue? Are you able to demonstrate the problem with a simple 3D model that is already available and doesn't require any additional processing?
... with max optimizations i get the crashes every time, but when i lower the optimization levels a bit for when building assimp seems to not crash any more.
It sounds like you think that the level of optimization is affecting rapidjson? Please attach logs of exactly where rapidjson is crashing.
After pulling latest version i tried to reproduce it and i couldn't, after that i tried again without lowering the optimzation levels and worked fine. Maybe it was a mistake on my end, some misbuild or something. You can close this i am sorry for wasting your time.
Still my suggestion on using simdjson remains as it is still actively supported and way faster, but requires a newer standard.
Describe the bug So i am getting crashes during gltf2 json parse when in release mode with latest msvc compiler. I tracked the causing commit to the one that updated rapidjson. I also tested with earlier version of rapidjson and didn't get any crashes. For now i have forked assimp and reverted the rapidjson to an earlier version but this should be fixed or reverted.
Platform (please complete the following information):