Got a panic from an "unwrap". But where's the "unwrap" in the source code?
03:47:21 [ERROR] =========> Panic called `Option::unwrap()` on a `None` value at file /home/john/.cargo/git/checkouts/rend3-hp-02d0af34d7a82ce7/1450746/rend3/src/managers/object.rs, line 136 in thread main.
Backtrace:
libcommon::common::commonutils::catch_panic::{{closure}}
at /home/john/projects/sl/SL-test-viewer/libcommon/src/common/commonutils.rs:389:25
rend3::managers::object::ObjectManager::add
rend3::renderer::eval::evaluate_instructions
at /home/john/.cargo/git/checkouts/rend3-hp-02d0af34d7a82ce7/1450746/rend3/src/renderer/eval.rs:72:21
rend3::renderer::Renderer::evaluate_instructions
at /home/john/.cargo/git/checkouts/rend3-hp-02d0af34d7a82ce7/1450746/rend3/src/renderer/mod.rs:422:9
<sharpview::AppUi as rend3_framework::App>::handle_redraw
at /home/john/projects/sl/SL-test-viewer/sharpview/src/main.rs:718:31
Source is in rend3-hp/rend3/src/managers/object.rs at trunk · John-Nagle/rend3-hp · GitHub
and there's no "unwrap" near there. The line mentioned in the panic is
let mesh = &mesh_manager_guard[**mesh];
which lacks an "unwrap". There's no .unwrap() in the entire function.
But at that point the code is dropping a lock. It's a parking_lot lock. I've looked for an unwrap which might be implicitly called by an inlined function But I don't see an unwrap anywhere in the parking_lot code drop sequence.
Suggestions on how to debug this?
Notes:
- Not my code, fork of another project no longer being maintained. But the original fails sometimes, too.
- Failure rate is once per hours of usage.
- This is "release" mode with the debug info, not "debug" mode. Debug mode is too slow.