Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #1 
Currently, if ML is running a trials, clicking anywhere outside the ML windows causes a crash. This is problematic for debugging code because I can't place any break points to trace. It's also annoying because to regain control of the keyboard requires that I restart matlab. Are their any fixes for this?

I'm guess this happens because ML uses XGL - which is a full screen directx library. I know when any DirectX full screen mode program loses its pointer to the surface (which is what happens when you click on another monitor), you need to recapture that surface. DirectX windowed mode doesn't have this problem. The advantage to fullscreen mode is that it's much faster (uses more hardware rendering). OpenGL doesn't concern us with these issues. I might be wrong. Also, is this why you disable the mouse/keyboard? This is all very problematic.
0
maloman

Junior Member
Registered:
Posts: 15
Reply with quote  #2 
I do not have this problem to be honest. Do you mean the crash happens when debugging or also in non debug mode ?

One more thing. OpenGL suffers from the same performance hits (especially with inconsistent flips) if not run in full screen.
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #3 
I'm not sure the difference between debug modes. Do you mean settings a breakpoint in matlab's code editor, or something having to do with the MLHELPER_OFF variable. 

Let me be more specific, after loading conditions and specifying a data file name, the run buttons enables. When I hit that Run button, monkey logic will then embed my timing file, initialize the behavioral data file, and startup the DAQ. Then it will initialize the video graphics which opens a black full screen window on my second monitor. Then an additional ML window appears, showing the time line, XY Plot with the eye position in real-time, and so on. I don't know what to call that latter window. When that window initializes, it has instructions such as Q to quit, space bar to start, and so on. If I start running trials, the stimulus appears and the gaze is plotted, and so on. The problem occurs after this point in time. If I click anywhere on my windows desktop, or on anything outside this latter window, ML will essentially crash. The video graphics window will minimize and the program will become unresponsive (because the mouse and keyboard are disabled). So, essentially, this makes it impossible to debug any code during this critical period in which trials are running. Is there a solution for that?
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #4 
Am I the only one who has this problem??? 
0
coxma

Junior Member
Registered:
Posts: 7
Reply with quote  #5 
In our setup, we do not have control of the mouse once the control window launches. It actually physically disapears. If I remember correctly, there are "cursor off" commands in ML, and I assume those functions control what I am describing. So, no, we do not have the issue you describe.

Sometimes when ML crashes, we regain control of the mouse but not the keyboard. We use a batch command to kill ML in these cases that we got from the Schmid lab group in Frankfurt. 


0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #6 
So what you're saying is that this doesn't happen to you because it's simply not possible for you to click outside of the control window. However, if your mouse was activated then presumably this would happen. I have changed some codes to allow my keyboard and mouse to remain active at all times even when the control window is launched. 

I don't understand how ML was programmed without use of the mouse and keyboard at all times.


0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #7 
BTW, the problem is not DirectX full screen, but specifically DirectX "Exclusive Mode"
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #8 
ML disables the mouse and keyboard intentionally during trials, to prevent the problem that you described. Search the following link with a keyword, "mouse".

http://www.brown.edu/Research/monkeylogic/recentchanges.html

I think it is annoying too. I am sure that there is a better way, but the previous developers had their own reasons for this, I guess.
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #9 
It would be nice to hear what the previous developers have to say on the subject! I'd like to know how they managed to get around this issue when debugging video.
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #10 
Here is a microsoft article referring to the disadvantages of full screen directx mode

https://msdn.microsoft.com/en-us/library/windows/desktop/Bb206358(v=VS.85).aspx

Notice the last sentence in the article.
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #11 
See discussion thread on MLHELPER_OFF
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.