Closed yGifoom closed 1 week ago
Issue was solved by instantiating the cam object in run method. We were creating the object in a process and running it in another, which I believe is a known issue
Check also this possible solution to have the camera centralized and just move the images to subprocesses https://github.com/basler/pypylon/issues/513#issuecomment-1346405311
Describe what you want to implement and what the issue & the steps to reproduce it are:
Company is located in Italy. We were working on a computer vision pipeline, were each process is a separate class which inherits from multiprocess, all forked from a parent process. Only one said process uses the camera, the rest just process the data.
Whenever we tried to call self.cam.Close(), after having having initialized the device, that process would end up in a deadlock and freeze. We tried to replicate the behaviour and got the same results in this simplified script:
Expected output
actual output
[program doesn't output anything]
When running on a simple sequential program or with a multiprocess implementation without classes the output is as expected:
Is your camera operational in Basler pylon viewer on your platform
Yes
Hardware setup & camera model(s) used
Operating system is Ubuntu 22.04, processor is X86_64, ram 8 Gb. Camera model is Basler ace 2 R a2A5320-23ucBAS, Connection is with USB
Runtime information: