Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"flushMode = 1" leads to crash in Eyelink EDF transfer #98

Open
hyunwoogu opened this issue Apr 15, 2024 · 0 comments
Open

"flushMode = 1" leads to crash in Eyelink EDF transfer #98

hyunwoogu opened this issue Apr 15, 2024 · 0 comments

Comments

@hyunwoogu
Copy link

System information

MGL(Master branch), macOS 14.2, MATLAB R2023b, Eyelink1000


Code to reproduce the issue

function myscreen = minimal
myscreen = initScreen();
task{1}.seglen = [1];
[task{1} myscreen] = initTask(task{1},myscreen,@stimStartSegmentCallback,@stimDrawStimulusCallback);
myscreen = eyeCalibDisp(myscreen);

% Main display loop
phaseNum = 1;
while (phaseNum <= length(task)) && ~myscreen.userHitEsc
  % update the task
  [task myscreen phaseNum] = updateTask(task,myscreen,phaseNum);
  myscreen = tickScreen(myscreen,task);
end
myscreen = endTask(myscreen,task);

function [task myscreen] = stimStartSegmentCallback(task, myscreen)
myscreen.flushMode = 1;

function [task myscreen] = stimDrawStimulusCallback(task, myscreen)

The above code normally works with the EyeLink calibration routines, except that when the experiment ends (endTask), the EDF file is not saved, with the following error message that breaks MGL.

(saveStimData) Changed output file to 240415_stim01
Saving ~/data/240415_stim01...done.
Failed to transfer file 24041501.edf.  transfer aborted .(mglPrivateEyelinkEDFGetFile) eyelink_core:Failed to transfer file 24041501.edf.  transfer aborted .
Unexpected unknown exception from MEX file..

Error in mglEyelinkCallbackSaveData (line 30)
mglPrivateEyelinkEDFGetFile(sprintf('%s.edf', myscreen.eyetracker.datafilename));

Error in saveStimData (line 161)
    [task, myscreen] = feval(myscreen.eyetracker.callback.saveEyeData,task,myscreen);

Error in endTask (line 29)
myscreen = saveStimData(myscreen,task);

Error in search (line 86)
myscreen = endTask(myscreen,task);
 
30  mglPrivateEyelinkEDFGetFile(sprintf('%s.edf', myscreen.eyetracker.datafilename));

Attempts to address the issue

It seems that the myscreen.flushMode = 1 interacts with the eyelink routine. When I changed it to myscreen.flushMode = 0, the EDF transfer works fine and it saves the file in the experiment computer disk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant