====== Resolved issues ======
Check [[:mgl:resolved_isses|here]] for issues that have been resolved. Some issues may also be resolved in [[https://github.com/justingardner/mrTools/issues|issues]] on github.
====== Recompiling MGL ======
We (Apple developers) run the latest Mac OS (10.10.2 as of 3/27/2015) with the latest version of Matlab (8.5) or (Linux developers) Ubuntu 64-bit (Gutsy) and 32-bit (Feisty) with Matlab 7.4 and the binaries are created to run on these systems. As noted above, some older versions (notably Matlab 14.1) are not able to use these mex files and crash when you try to run mglOpen. If this happens, then all you need to do is [[mgl:gettingStarted#recompiling_mgl|recompile MGL]] using mglMake(1). You may also have to make sure that you [[:mgl:knownissues#problems_compiling|link]] to the correct version of the Mac OS X system frameworks.
====== License manager timing glitch ======
The Matlab license manager checks every 30 seconds for the license. This can
cause there to be an apparent frame glitch in your stimulus code, especially
if you are using a network license (on our machines it can take ~200 ms to
check for the license). The only known workaround to this is to run on a
machine that has a local copy of the license. You can check this for yourself
by seeing how long it takes to do screen refreshes:
mglOpen;
global MGL;
checkTime = 30*MGL.frameRate;
timeTaken = zeros(1,checkTime);
mglFlush;
for i = 1:checkTime
flushStart = mglGetSecs;
mglFlush;
timeTaken(i) = mglGetSecs(flushStart);
end
mglClose;
plot((1:checkTime)/MGL.frameRate,timeTaken);
zoom on;xlabel('seconds');ylabel('Frame refresh time (seconds)');
If you have the same problem, you should see one large spike in the time course like this:
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/
- You may no have to go into the "mexopts.sh" file in the mgl/mgllib directory to link to 10.5 instead of 10.6. Change the following lines appropriately to link to 10.5:
SDKROOT='/Developer/SDKs/MacOSX10.5.sdk'
MACOSX_DEPLOYMENT_TARGET='10.5'
In later SDKs, (e.g. SDK=10.13), you can also compile MGL using clang rather than the default c compiler, by:
- setting the optf in mglMake (e.g. line 209, as of 7/20/20): optf = sprintf('-f %s',fullfile(fileparts(which('mglOpen')),'clang_maci64.xml'));
- and changing the clang_maci64.xml file to find the 10.13 sdk (e.g. line 120 and 136):
====== SVN problems ======
If you have problems updating with SVN because you have changed files, you might be running into file or tree conflicts. See [[grupub:svn|here]] for more info.
I have run into some unresolvable conflicts with the following error:
svn: GET of '/svn/mgl/!svn/bc/946/trunk/mgllib/mglEyelink/mglPrivateEyelinkReadEDF.c': Could not read response body: connection was closed by server (http://gru.brain.riken.jp)
You may try to svn checkout the whole repository again (remember to make a copy of your current repository and then copy back the files you have changed). It seems that this can be caused by Apache timing out for long updates, but that doesn't seem to be the reason why we are getting that (we have set out timeout very long and this happens for single files and always at the same place in certain revisions). I suspect that it is some problem with the Mac Apache svn/PHP module, but have not been able to figure it out. A workaround is to use svn+ssh for accessing the repository, but this is only for developers who have an account on our server gru.brain.riken.jp (email to justin if you think you need this). Also, if someone knows what the problem is and can provide a fix, let us know.
====== Function not supported on Linux ======
Note that only version 1.5 supports linux, version 2.0 and beyond do not have linux support at the moment (actually could be supported with a little bit of work, if someone is interested in putting in the effort).
The list of funcitons not supported yet on linux for version 1.5 are:
* mglText
* mglTextDraw
* mglPlaySound
* mglInstallSound
* mglDescribeDisplays
* mglSwitchDisplay
* mglListener
If you want to use text under the linux operating system, you can use
mglStrokeText.
Here is a more recent update from Jonas about the Linux version:
I am in the process of upgrading the Linux version of MGL to run under Ubuntu (64-bit and 32-bit) with NVIDIA and ATI graphics cards. Although the upgrade is still incomplete, most functions work equally well under Linux at this stage. Some differences that will remain between the platforms are listed below.
* no support for font-based text - this needs to be upgraded, I started looking into using FreeType for this which is widely available and would be easy to implement in the same texture-based way that the Mac code relies on. Care must be taken to ensure that the code is maximally portable across platforms, so it may be that some Mac-specific idiosyncracies need to be modified
* note that the stroke text works perfectly under Linux, so unless you are very enamoured with a specific font this is a perfectly usable workaround (though some symbols, eg %, are missing currently)
* some differences in the way you specify special keys, but this is generally to Linux' advantage - eg you can use ESC, BACKSPACE etc as names (relies on the XKeySymDef.h or sth like that)
* timing is in general more accurate on Linux, since the clock rate is much higher on modern systems (100-500Hz vs 60Hz on the Mac)
* no parallel port interface yet so you can't use Justin's code for calibration
* no sound - need to decide on a standard to use that is most widely available
* the syncing with OpenGL is idiosyncratic and depends on the graphics card. I have implemented this to use both the SGI video sync extension and the environment variable (both NVIDIA and ATI provide this option). The former is not supported by all OpenGL cards (though most modern ones) and can interact with the environment variable option, so I will make the latter the default, with an option to use the SGI extension when compiling only.
For the time being, only NVIDIA and ATI cards will be supported (because I only have access to those two machines).
* setting screen size and resolution requires the XRandR extension, which is supported on recent X distributions (Xorg 7.0 and later). Older X servers (eg Apple's X11) won't work.
* you need to reuse the X display or you run into memory problems, and the code for doing this needs to be checked for consistency. This is similar to the Mac window situation and relates to the uneasy relationship between Matlab and X. When you open a window, the MGL global variable will contain a window and display pointer that is used on subsequent calls; care must be taken not to clear the MGL variable between calls (once you do so, running MGL is likely to crash Matlab, even if you run clear all, which correctly closes the display).