Home Forums Software Development [bug] Tobii.Interaction.GazePointDataStream.GazePoint sometimes has no effect


Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #12471
    Roman Kuksin

    This happens when there is some CPU load just after the call to GazePoint.
    A minimal example:

    public static void Main(string[] args)
    var host = new Host();
    var eye_position_stream = host.Streams.CreateEyePositionStream();
    var head_pose_stream = host.Streams.CreateHeadPoseStream();
    var gazePointDataStream = host.Streams.CreateGazePointDataStream();
    gazePointDataStream.GazePoint((gazePointX, gazePointY, _) => {

    eye_position_stream.EyePosition((Tobii.Interaction.EyePositionData eye_position_data) => { });
    head_pose_stream.HeadPose((double unused, Tobii.Interaction.Vector3 head_position, Tobii.Interaction.Vector3 head_direction) => { });

    var start_time = DateTime.Now;
    while((DateTime.Now – start_time).TotalSeconds < 5)
    // cpu load
    for (int i = 0; i < 10000; i++) ;

    // There was no GazePoint data for 5 seconds.

    It is not very different from the official sample https://developer.tobii.com/consumer-eye-trackers/core-sdk/getting-started/
    This application should quit when it gets the first GazePoint. The problem is sometimes it doesn’t quit at all.

    This bug is flaky. On my machine, it reproduces once per 30 launches. To make the reproduction easier, I wrote an additional app that runs this example infinitely.

    To reproduce the problem you need a machine with installed Tobii Eye Tracker 4C

    Reproduction steps:
    1) Download archive: https://drive.google.com/open?id=1eXV6jAyqZGQ73eJOgvYCzxsCmwxKs0Fc
    2) Extract
    3) Open tobii_bug_repro.sln in Visual Studio 2019
    4) Select ‘Release’ configuration (it doesn’t reproduce in ‘Debug’)
    5) Build all
    6) Run <extraction directory>\bin\Release\run_exe_forever.exe
    7) Stay in front of the Eye Tracker until you see REPRODUCED

    It is important to stay in front of the eye tracker so it can track your eyes.
    You may think that 1 bug per 30 launches is not a big deal, but the problem may be more severe in different applications on different computers. E.G. my project https://github.com/Romex91/EyeTrackingMouse suffers from this bug every other launch on my laptop.

    Please take a look.
    Thank you

    Grant [Tobii]

    Hi @romext, thank you for bringing this to our attention. Your bug report has been created and sent to the developer for investigation.

    Apologies for any inconvenience caused during your project development, hopefully we can provide a resolution in the near future. Best Wishes.

    Roman Kuksin

    No inconvenience to my project, because it is easy to work around this bug by calling GazePoint again if it doesn’t work for the first time.
    But other projects may suffer from it if they don’t implement the workaround. This bug doesn’t reproduce when the VS debugger is attached, so it may be easy to overlook=(

    Anyway, thank you for creating the bug report!

    Grant [Tobii]

    Great, thanks for your understanding.. Hopefully, can be squished in the near future. 🙂

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