You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Afaict this code always results in a segfault when b.release() is called. Presumably somewhere in the plumbing of gpiod there's an assumption that there will only be one claim against a given gpiochip device, this cannot be guaranteed across multi-library Python projects.
Notably, simply omitting any cleanup - I had .release() in an atexit handler in the Blinkt! lib - fixes this, so perhaps we can just rely on the lines being implicitly released. Though again this may not be possible to guarantee in some cases.
Repro (given line and chip values are GPIO23 and GPIO24 on a Raspberry Pi 400, a Pi 5 would use /dev/gpiochip4):