-
Notifications
You must be signed in to change notification settings - Fork 984
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
Potential Regression. Calling EncodeMeshToDracoBuffer causes Bus Error. #998
Comments
It might be worth mentioning that the input model is in fact invalid, because it contains an accessor that contains |
A normal error would be fine and expected. But causing a bus error (since 1.3.6) and the fact that listening to such termination signal (SIGBUS) makes everything hang is worth some concern--regardless of whether the model is perfectly valid or not. But yeah, as javagl mentioned it does contain NaN. Simply replacing them with 0 makes the problem go away. Any chance we can handle this issue in draco directly? |
Related: On some platforms this error surfaces an "memory access out of bounds" (included here in case others are searching for that term). Unfortunately my hunch would be that this error occurs before the data ever reaches the Draco codebase, somewhere in the WASM API and/or generated bindings. A nicer handling of the error may be difficult. Tools like glTF Validator can catch the invalid data before processing a glTF file. |
Seems similar indeed. For now yeah, gltf Validator seems the best option. Even created KhronosGroup/glTF-Validator#205 specifically for this. Could also be a side effect or related to #629 as mentioned above. |
Morning!
This week someone uploaded a specific gltf that seems to cause a bus error when going through
EncodeMeshToDracoBuffer
(using gltf-pipeline -- CesiumGS/gltf-pipeline#608). The specific line is https://github.com/CesiumGS/gltf-pipeline/blob/901c94f360d60382dfbc8612c12130bc4992f10c/lib/compressDracoMeshes.js#L264 .What's even worse is that listening to such signal (process.on('SIGBUS', ...) ) causes the whole process to hang -- still don't know why.
Here's some minimal js code that reproduces the issue. Remove the process.on('SIGBUS'...) to see the node process crash and show the bus error.
Running the above script with
node --report-signal=SIGBUS --report-on-signal test.js
also makes it hang (and doesn't create a stack trace). Same for cpu profiling, etc -- they all get hanged.If I use draco 1.3.6, before the flags NODEJS_CATCH_EXIT and NODEJS_CATCH_REJECTION are disabled, I get the error below instead (rather than bus error). Could it be a side-effect of #629 ?
broken.gltf.zip
The text was updated successfully, but these errors were encountered: