Home Forums Software Development Access violation

Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #18798
    Aleksandr Tumanyan
    Participant

    Hello,
    Tobii Eyetracker 4C,
    the sample from Stream Engine:

    #include <tobii.h>
    #include <tobii_streams.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <assert.h>
    #include <string.h>
    //#pragma warning(disable : 4996) 
    
    void gaze_point_callback(tobii_gaze_point_t const* gaze_point, void* user_data)
    {
        if (gaze_point->validity == TOBII_VALIDITY_VALID)
            printf("Gaze point: %f, %f\n",
                gaze_point->position_xy[0],
                gaze_point->position_xy[1]);
    }
    
    static void url_receiver(char const* url, void* user_data)
    {
        char* buffer = (char*)user_data;
        if (*buffer != '\0') return; // only keep first value
    
        if (strlen(url) < 256)
            //printf(strlen(url))
            strcpy(buffer, url);
    }
    
    int main()
    {
        tobii_api_t* api;
        tobii_error_t error = tobii_api_create(&api, NULL, NULL);
        assert(error == TOBII_ERROR_NO_ERROR);
    
        char url[256] = { 0 };
        error = tobii_enumerate_local_device_urls(api, url_receiver, url);
        assert(error == TOBII_ERROR_NO_ERROR && *url != '\0');
    
        tobii_device_t* device;
       <strong> error = tobii_device_create(api, url, TOBII_FIELD_OF_USE_INTERACTIVE, &device);</strong>
        assert(error == TOBII_ERROR_NO_ERROR);
    
        error = tobii_gaze_point_subscribe(device, gaze_point_callback, 0);
        assert(error == TOBII_ERROR_NO_ERROR);
    
        int is_running = 1000; // in this sample, exit after some iterations
        while (--is_running > 0)
        {
            error = tobii_wait_for_callbacks(1, &device);
            assert(error == TOBII_ERROR_NO_ERROR || error == TOBII_ERROR_TIMED_OUT);
    
            error = tobii_device_process_callbacks(device);
            assert(error == TOBII_ERROR_NO_ERROR);
        }
    
        error = tobii_gaze_point_unsubscribe(device);
        assert(error == TOBII_ERROR_NO_ERROR);
    
        error = tobii_device_destroy(device);
        assert(error == TOBII_ERROR_NO_ERROR);
    
        error = tobii_api_destroy(api);
        assert(error == TOBII_ERROR_NO_ERROR);
        return 0;
    }

    error on bold stroke:

    tobii_device_t* device;
    error = tobii_device_create(api, url, TOBII_FIELD_OF_USE_INTERACTIVE, &device);
    assert(error == TOBII_ERROR_NO_ERROR);

    Необработанное исключение по адресу 0x6CC93CE5 (tobii_stream_engine.dll) в Project5.exe: 0xC0000005: нарушение прав доступа при записи по адресу 0x00000001.

    Scan
    scanerr

    How do I fix this error?

    Best regards,
    Aleksandr

    #18807
    Grant [Tobii]
    Keymaster

    Hi @aleksandrtumanyan, sorry to hear about your issues. Issues related to the error code 0xC0000005 typically refer to corrupt system files (or faulty RAM)

    Firstly, you can try redownloading the stream engine components and if that doesn’t work, try running the Windows System File Checker (SFC) tool via the Command Prompt:

    sfc /scannow

    Might also be worth running a RAM test tool to check for any potential memory problems. Please go through this and let us know how you get on. Best Wishes.

    #18809
    Aleksandr Tumanyan
    Participant

    Hi Grant, Thank’s
    test sfc – OK
    test RAM – OK
    The error persists.
    What else can I do?

    Best regards,
    Aleksandr

    #18810
    Grant [Tobii]
    Keymaster

    Hi @aleksandrtumanyan, sorry to hear that. Is it possible for you to test this on another system? It seems like is quite likely to be related to your specific setup..hopefully we can pin down the source. Thanks.

    #18811
    Aleksandr Tumanyan
    Participant

    Hi, Grant,
    What is the sequence of tobii activation? Insert usb and that’s it?
    Do I need to run the standard
    Tobii_Eye_Tracking_Core_v2.16.5.156_x86
    program before starting my C-program? Or should this program be disabled?

    Best regards,
    Aleksandr

    #18813
    Grant [Tobii]
    Keymaster

    Hi @aleksandrtumanyan, yes you will need to have the Tobii Core Software installed, a user profile created and a calibration successfully run. Can you confirm that the eye trackers works normally with the Core Software? ie Mouse warp interaction, etc?

    #18815
    Aleksandr Tumanyan
    Participant

    Hi Grant, yes, eye tracker works normally with the Core Software.

    #18822
    Grant [Tobii]
    Keymaster

    Hi @aleksandrtumanyan, after consulting with the developers, we have been unable to identify the source of the error. At this stage, could you try to package the project that may be try to run it on our own system please? Out of curiosity, do you get the same issue if you try to run the c# sample?

    #18823
    Aleksandr Tumanyan
    Participant

    Hi Grant, I’ll need some time ..
    It is unstable, now it gives an error here

    char url[256] = { 0 };
    error = tobii_enumerate_local_device_urls(api, url_receiver, url);
    assert(error == TOBII_ERROR_NO_ERROR && *url != ‘\0’);

    Assertion failed: …
    Completed with code 3

    #18824
    Aleksandr Tumanyan
    Participant

    Hi, Grant, everything works on another machine, I will look for the difference ..

    #18826
    Grant [Tobii]
    Keymaster

    HI Alex, thanks for the update, good to know.. keep us in the loop as to how you get on. Best wishes.

    #21721
    DavidDang
    Participant

    Hi,Grant
    I meet the same problem on my linux computer,while the EyetrackerManager can detect the device.

    char url[256] = { 0 };
    error = tobii_enumerate_local_device_urls(api, url_receiver, url);
    assert(error == TOBII_ERROR_NO_ERROR && *url != ‘\0’);

    Do you know why?

    #21728
    Grant [Tobii]
    Keymaster

    Hi @daviddang. do you have the relevant Linux drivers and configuration software installed?

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