ES-Alexander / pythonic-cv

Performant pythonic wrapper of unnecessarily painful opencv functionality
MIT License
41 stars 2 forks source link

Camera class segfaults on release, only in interactive mode #1

Closed ES-Alexander closed 3 years ago

ES-Alexander commented 4 years ago

All three camera classes work fine, but on release Camera segfaults if running in interactive mode. Seems to work fine if running as a script without interactive mode...

Possibly an issue in OpenCV, to do with grabbing while trying to release (this is the only unique possibility of Camera that doesn't occur in SlowCamera or LockedCamera)

ES-Alexander commented 4 years ago

Changed from Locks to Events for LockedCamera and VideoReader, and now LockedCamera also segfaults on release in interactive mode (but not VideoReader).

Tried adding an additional event and join on exit, but didn't seem to do anything so currently commented out.

Interesting to note that it's getting to the subsequent code before seg-faulting, so perhaps has to be something to do with the grabbing thread. Then again, would expect that to be handled by an explicit join, which didn't work, so not sure...

ES-Alexander commented 4 years ago

Re-added event and join on exit to avoid exceptions raised on release. This issue still stands.

ES-Alexander commented 3 years ago

Seems to have been resolved in v1.1.3 or v1.1.4.