Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
ctestard

Junior Member
Registered:
Posts: 20
Reply with quote  #1 
Hi,

I have been experiencing a bug with xglflip for a long time on my touchscreen (Elo Touch) task using ML 1.2.58 but dating back to earlier v.1.1 versions. I'm using Matlab 2013b 32-bit.

The error (log below) always follows a touch to the touchscreen, but would occur only about once or twice a week (14 testing sessions/week). 

Please let me know if you have experienced similar errors and/or found a fix.

Thanks
-Sebastien

***********************************************************************

<<<*** MonkeyLogic ***>>> Timing File Execution Error

Error using xglmex

The fullscreen device has lost focus and may not be presented

 

Error in xglflip (line 12)

xglmex (19, rhs1);

 

Error in mlvideo (line 88)

        xglflip(devicenum);

 

Error in audio_pavlov_star_VD_runtime>toggleobject (line 467)

    mlvideo('flip', ScreenData.Device);

 

Error in audio_pavlov_star_VD_runtime (line 120)

toggleobject(go_sound)

 

Error in monkeylogic (line 1132)

        TrialData = feval(timingfile, TaskObject, ScreenInfo, DaqInfo, MLConfig.EyeTransform, MLConfig.JoyTransform, BehavioralCodes, TrialRecord, trialtype);

 

Error in mlmenu (line 2323)

                monkeylogic(condfile, datafile, testflag);

**********************************************************************
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #2 
Thanks for letting us know. 

This XGL problem typically occurs if clicking somewhere outside the touchscreen display... maybe somehow the subject can click inappropriately causing this crash. In the long run I'd like to make it possible to run XGL and use the mouse simultaneously, but this will require a lot of work I think. So in the mean time we should simply try to catch this unusual condition.
0
ctestard

Junior Member
Registered:
Posts: 20
Reply with quote  #3 
Hey Ryklin,

I tried to debug this issue.

Really the subject doesn't need to touch outside of the screen. The subject can simply click on the top edge of the screen, which would make the bar of the xgl window appear, and then another click there will trigger the error. For some reason, my monkeys like touching the edge of the screen, which triggers this error a bit too often now.

I tried catching this error as you suggested. I went into ml.video.m and added this:

case 'flip',

devicenum = varargin{1};
try
   xglflip(devicenum);
catch
   i=2; %subject screen
   xglinit;
   m=xglcurrentmode(i);
   xglinitdevice(i,m,2);
end

This basically reinitializes the xgl window after a crash. The reinitialization works but then there is conflict with the video buffer, which leads to another crash.

Anyway, do you have any better idea how to catch this error?

p.s. I also tried making the xgl window bigger so the bar would be outside the screen, which didn't work.

Thanks!

0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #4 
Place cardboard around your touch screen bezel to prevent any contact there.
0
stremblay

Member
Registered:
Posts: 65
Reply with quote  #5 
Hi Ryklin,

Unfortunately this solution would not work with monkeys; the cardboard wouldn't last more than 10 seconds before it's ripped into shreds.

Can you think of another way to catch this error in ML? 

It is really all the four borders of the XGL window that can be clicked on to cause this crash. We are currently experiencing 2 to 4 crashes per session with one of our monkeys.

Any help is welcome,

Thank you.
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #6 
I was just trying to think of a temporary solution until we can solve it permanently in the software... this is top priority of course!
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #7 
Those who experience the problem described in this thread,

Try the xgl binary attached below and see if it remedies the situation. Overwrite the contents of the zip file onto the xgl directory of your MonkeyLogic.

 
Attached Files
zip xgl.zip (58.56 KB, 13 views)

0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #8 
This patch seems to mitigate the issue. Lets see what stremblay reports back.
0
stremblay

Member
Registered:
Posts: 65
Reply with quote  #9 
Hi Jaewon,

The new xgl toolbox seems to work fine so far! Thanks so much. I'll let you guys know if any issue arises.

I'm happy to say that this was the last bug I was facing using Monkeylogic with a touchscreen on monkeys. 

Best,
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #10 
new release has been posted.

https://github.com/ryklin/MonkeyLogic_stable/releases/tag/1.2.85
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.