qhyccd-lzr / QHYCCD_Linux_New

This repository contains a new (2017+) QHYCCD's Ubuntu Linux 64 and ARM V8 (Raspberry PI3, Odroid XU4) deliveries.
8 stars 3 forks source link

`ReleaseQHYCCDResource` does not stop CamManagerThread #15

Closed tail-feather closed 4 years ago

tail-feather commented 4 years ago

I'm having trouble with the QHYCCD driver (indigo_ccd_qhy2) crashing on INDIGO. This seems to be happening on the QHYCCD SDK side.

Calling ReleaseQHYCCDResource and waiting for about 5 seconds, I noticed that the log of CamManagerThread was still being output.

Since INDIGO runs the driver in an independent process, it kills the process when it unload the driver. If the thread hasn't been JOINed by the time the process ends, an exception should be raised.

23:07:43.257676 indigo_server: indigo_ccd_qhy2: 'QHY5III290C #0206' detached
23:07:43.257886 indigo_server: indigo_ccd_qhy2: 'QHY5III290C Guider #0206' detached
23:07:43.257994 indigo_server: indigo_ccd_qhy2[indigo_ccd_qhy2:1794]: ReleaseQHYCCDResource() called and 5sec sleeping...
QHYCCD|QHYCCD.CPP|CamManagerThread| numdev = 1
QHYCCD|QHYCCD.CPP|LibusbIsQHYCCD|vid = 1618 pid = 291
QHYCCD|QHYCCD.CPP|CheckLIBUSB|CheckLIBUSB ndev=8
QHYCCD|QHYCCD.CPP|CamManagerThread| numdev = 1
QHYCCD|QHYCCD.CPP|LibusbIsQHYCCD|vid = 1618 pid = 291
QHYCCD|QHYCCD.CPP|CheckLIBUSB|CheckLIBUSB ndev=8
QHYCCD|QHYCCD.CPP|CamManagerThread| numdev = 1
QHYCCD|QHYCCD.CPP|LibusbIsQHYCCD|vid = 1618 pid = 291
QHYCCD|QHYCCD.CPP|CheckLIBUSB|CheckLIBUSB ndev=8
QHYCCD|QHYCCD.CPP|CamManagerThread| numdev = 1
QHYCCD|QHYCCD.CPP|LibusbIsQHYCCD|vid = 1618 pid = 291
QHYCCD|QHYCCD.CPP|CheckLIBUSB|CheckLIBUSB ndev=8
QHYCCD|QHYCCD.CPP|CamManagerThread| numdev = 1
QHYCCD|QHYCCD.CPP|LibusbIsQHYCCD|vid = 1618 pid = 291
QHYCCD|QHYCCD.CPP|CheckLIBUSB|CheckLIBUSB ndev=8
23:07:48.258761 indigo_server: Driver indigo_ccd_qhy2 unloaded
// crashed here!
23:07:50.854472 indigo_server: INDIGO server 2.0-121 built on Apr 23 2020 20:54:37
23:07:50.854629 indigo_server: Resource /mng.html (1989, text/html) added
23:07:50.854680 indigo_server: Resource /mng.png (7867, image/png) added
23:07:50.854709 indigo_server: Resource /ctrl.html (1448, text/html) added
23:07:50.854796 indigo_server: Resource /ctrl.png (10561, image/png) added
23:07:50.854826 indigo_server: Resource /indigo.js (1956, text/javascript) added
23:07:50.854845 indigo_server: Resource /components.js (5449, text/javascript) added
23:07:50.854861 indigo_server: Resource /indigo.css (791, text/css) added

P.S. If SetQHYCCDAutoDetectCamera(false); is set before calling InitQHYCCDResource, the INDIGO will not crash.

tail-feather commented 4 years ago

Oops, I noticed that SetQHYCCDAutoDetectCamera doesn't exist in the SDK here. I'm sorry if I'm in the wrong place.

qhyccd-lzr commented 4 years ago

Hello,

this repository is very, very obsolete and not used anymore. Please use drivers from qhyccd.com.

Fast Download Address:

https://www.qhyccd.com/html/test_version/ (https://www.qhyccd.com/html/test_version/)

Best regards

苗永强

---------- Původní e-mail ---------- Od: tail-feather notifications@github.com Komu: qhyccd-lzr/QHYCCD_Linux_New QHYCCD_Linux_New@noreply.github.com Datum: 23. 4. 2020 16:48:18 Předmět: Re: [qhyccd-lzr/QHYCCD_Linux_New] ReleaseQHYCCDResource does not stop CamManagerThread (#15) "

Oops, I noticed that SetQHYCCDAutoDetectCamera doesn't exist in the SDK here. I'm sorry if I'm in the wrong place.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/qhyccd-lzr/QHYCCD_Linux_New/issues/15#issuecomment-618438563) , or unsubscribe (https://github.com/notifications/unsubscribe-auth/ABHY2VGP4J52ETZLYSCED4LROBIKXANCNFSM4MPDGG2A) . "

tail-feather commented 4 years ago

Oh... I got it. Thank you!