Resolved [ST-402XME] Handle leaks under Win10

Discussion in 'Legacy Models - Community Support' started by Lyu ABE, Apr 22, 2020.

  1. Lyu ABE

    Lyu ABE Standard User

    Joined:
    Dec 7, 2016
    Messages:
    9
    Hello,

    we're still using the good old ST-402XME for our Antarctica exoplanet telescope "ASTEP-400" (currently in operation).

    We've been using Windows 7 for all our developments and operation but we switched to Windows 10 last year. Unfortunately I recently noticed a huge "handle" leak with driver DLL rev4.91 (or maybe older, like 4.73, not sure about that). When I start CCDOps (or my custom application) I can see the "handle count" in task manager increasing everytime the camera is polled for temperature (every second in CCDOps). I haven't checked that too deeply, but I beleive that everytime the SBIGUnivDrvCommand function is invoked, it allocates a new handle, but never releases it (I ended up with hundreds of thousands handles last time after more than one day operation!).

    Since my current investigations capabilities are current very limited (because of virus lockdown), and before making any irreversible tests directly in Antarctica (with remote access), I'd like to have confirmations that:
    1/ you can reproduce the problem (i.e. see the handle count increase) under Windows 10, running CCDOps?
    2/ if not, tell me which revision of the driver/SDK library works (4.99?), and if it's backward compatible with rev 4.91 or 4.73?

    Many thanks for your help.

    Best regards, Lyu ABE
     
  2. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    10,316
  3. Lyu ABE

    Lyu ABE Standard User

    Joined:
    Dec 7, 2016
    Messages:
    9
    Hello Doug,

    Actually, I performed the tests already (we're kind of a hurry, winter is coming fast over there ;) ), first with CCDOps and then with my acquisition software: problem solved with the r4.99 DLL! There is no more increase of handles.

    I did not recompile my code with the updated library though, but everything seems to run ok with the DLL.

    I suspect this handle increase was responsible of software crash and instabilities in the past weeks (and during last year operation too).

    But if you have more information on that (past) problem, I'd be glad to learn...

    Regards, Lyu
     
  4. Adam Robichaud

    Adam Robichaud Lead Developer Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    1,042
    Location:
    Ottawa
    Hi Lyu,

    Can you be a little more specific about what handles you were seeing leak? We were optimizing SBIGUDrv pretty intensely up until 4.99, so narrowing it down would help a bit...

    Cheers,
    -A
     
  5. Lyu ABE

    Lyu ABE Standard User

    Joined:
    Dec 7, 2016
    Messages:
    9
    Hello Adam,

    you probably know that you display the number of "handles" per application in the task manager (just add the column "handles"). As I said, I did not investigate deeply the problem, but I'm pretty sure that each time the SBIGUnivDrvCommand is called, the number of handles increased by one (I first saw it as totally correlated to the temperature poll function I had implemented, and all my C++ interface to the SBIG driver implements direct calls to the SBIGUnivDrvCommand). Then it was confirmed with using CCDOps: after camera detection and connection, I saw the number of CCDOps handles increase by one each time the tempearture was updated. This was my initial test.

    What makes me say that its the call to SBIGUnivDrvCommand (for all commands, not only temperature retrieval) is that when I logged the number of handles from my app, I had about 800 handles without the camera actually connected, and more than 1000 when it was. Then each time I launched an acquisition, the number of handles increased by several hundreds at each acquisition because when the exposure time reaches Texp - some_time, I poll contiunously the camera to be able to record the exact end-of-exposure time.

    I'm sorry if I cannot be more specific, but this problem seems to be completely resolved using the latest revision. If you want to reproduce it, just replace the SBIGUDrv.dll in the system folder (or wherever CCDOps goes look for it) by an earlier version, run CCDOps and look at the handle count. I just checked and the DLL version was 4.9.6.3 contrarily to what I've said earlier (see attachement).

    Lyu
     

    Attached Files:

Share This Page