Home Forums Software Development Multiple SDK inits/uninits

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1965
    Andrii Antsut
    Participant

    When I try to call txInitializeEyeX again after successfully shutting it down with txUninitializeEyeX (which returns TX_RESULT_OK), I get an APIException thrown. Why does it happen? I really need a runtime option to fully disable everything related to eye tracking and re-enable it at any time.

    #1970
    Andrii Antsut
    Participant

    Update: re-tested with the new SDK (wasn’t aware of the recent update). Second txInitializeEyeX actually “fails” with TX_RESULT_EYEXALREADYINITIALIZED, although a previous txUninitializeEyeX was successful. Everything else seems to work afterwards (as far as I can tell right now).

    Also, the exceptions which previously confused me seem to be correctly caught by the API itself (I was debugging with breaking on every exception), so that was a false alarm.

    Still, looks like something isn’t being cleaned up properly on uninitialize.

    #1974
    Jenny [Tobii]
    Participant

    Hm, this sounds like a bug. We’ll try and reproduce it.

    #1977
    Jenny [Tobii]
    Participant

    Hi Andrii,

    We managed to reproduce the problem, and there is a bug.

    But, it only appears under the circumstance that there are EyeX interaction objects that have not been cleaned up correctly in the client application before uninitializing EyeX. That is, when there are TX_HANDLE objects that have not been released using txReleaseObject (or TX_CONTEXTHANDLE not released by txReleaseContext).

    So, you most likely have objects that are leaking in your application!

    You can check this by checking the return value from
    txShutdownContext(hContext, TX_CLEANUPTIMEOUT_DEFAULT, TX_FALSE);

    If it returns TX_RESULT_OBJECTLEAKAGE then there are objects leaking. Then, please make sure you are using txReleaseObject for all TX_HANDLEs you are setting up. (See the MinimalGazeDataStream sample for an example how to do this.)

    Our EyeX Engine team will fix the bug so that it will not be possible to end up in the inconsistent state you saw, even when objects have not been cleaned up correctly by the client application.

    #1979
    Andrii Antsut
    Participant

    Thanks for the info. It turns out that I really forgot to release some handles in event handlers. Works fine now.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.