Closed tmplt closed 6 years ago
Trying to catch the exception where it is thrown leads instead to another backtrace, this one all in library code. I'll see if I can re-create this and submit an issue to pybind11.
For now, this isn't a big problem, but we don't want uncatched exceptions in release code.
The easiest way to debug this is probably to write a dead simple cli and remove code piece-wise until either the offending code is found or the bug is fixed.
The issue has been localized to a dummy frontend. Next up is investigating how much we can strip before the error disappears — and if it persists, submit an issue upstream.
The unit-test does not crash on my NixOS system.
The unit-test does not crash on another Arch Linux system.
Mayhap interesting observation: this issue can be reproduced on the offending system if bookwyrm is compiled in a pure Nix environment, event though ldd src/bookwyrm
only yield libraries from the Nix store.
This issue must be tested on more systems before I'm comfortable with closing this.
This issue is now reproducable on my NixOS system by just quitting the TUI while items are being added. Can some times be reproduced via
$ src/bookwyrm -t 'some title' <<< q
àla #50.
An issue has been created upstream at https://github.com/pybind/pybind11/issues/1358.
Sometimes when terminating, an
std::runtime_error
is thrown from the a Python thread. This is because of commit ac409a99313fd27ace37db51a10525d9724ce191 where the threads are all detached - instead of having to wait on them.Pybind11's Gitter chat confirmed that this is a known problem with multithreading.
I'll see if I can find a way to catch this exception.