Why is matlab's psychtoolbox failing to detect the Screen mexfile when running AssertOpenGL? - matlab

I've managed to install the psychtoolbox-3 from the NeuroDebian repository without any explicit errors, but running AssertOpenGL yields this very verbose error message.
My system specs are as follows: Intel-based PC with Ubuntu 12.04 LTS
I've tried adding ~/Documents/MATLAB and all it's subdirectories to the Matlab pathdef, as this is where I pointed the DownloadAdditionsForNeuroDebian function to. Similarly, I've tried adding /usr/share/octave/site/m/psychtoolbox-3/ and it's subdirectories to the matlab path as well.
The error seems to be originating from a failed call to Screen; according to the above error message, Screen can't be found. That having been said, I'm able to run Screen at the Matlab console, although I get this error:
>> Screen
In place of the expected mex file this placeholder file was executed:
Screen
This mex file seems to be missing or inaccessible on your Matlab path or it is dysfunctional:
Screen.*
Hmm. I cannot find the file on your Matlab path?!?
One reason could be that your Matlab path is wrong or not up to date
for the current Psychtoolbox. You may want to run SetupPsychtoolbox to
fix possible path problems.
??? Error using ==> AssertMex at 210
Missing or dysfunctional Psychtoolbox Mex file for this operating system. Read the help text above carefully!!
Error in ==> Screen at 161
AssertMex('Screen.m');
Running SetupPsychtoolbox yields an error that is very similar to the first one.
I tried installing the suggested packages, but they were all already installed -- nothing seems to work.
I have absolutely no idea where to go from here. Does anyone have any suggestions?

The SetupPsychtoolbox command seems to have a bug. What is happening for you (and for me, when I tried this) is that the folder containing Screen.mex is being placed at the bottom of the search path. Here's how to fix;
type "pathtool" at the Matlab commandline
find the PsychtoolboxAddons entry and move it to the top (for me this was /usr/share/psychtoolbox-3/PsychtoolboxAddons)
If you don't have a folder PsychtoolboxAddons you may need to follow the instructions at http://docs.psychtoolbox.org/DownloadAdditionsForNeuroDebian
Don't forget to move your personal Matlab directory to the top also (the SetupPsychtoolbox command moves your personal directory to be underneath it's directories, which is a bit mean).
Save the path. Don't ever run SetupPsychtoolbox again!
Good luck!

Related

Running an OpenCV program with Eclipse

I'm trying to run a simple example of OpenCV on Eclipse [which was perfectly buit and installed before (using CMake and MinGw), even libraries and all includes are in place !].
When building, I'm getting no errors or warning, all seems good, but when I try to run, I get a message as if the project had no Binaries, even if all binaries are there. I even specified the path to the ".exe" (run->run conf-> new launch-> browse ...etc.).
You can notice on the images attached that the project is built and the binaries are generated.
Notice: when I run an example of a (Hellow world) on the console ... it displays the messag without errors.
I read a lot on Internet before posting here, but I found nothing that matches to this case.
Thank you so much,
Error Capture
Build Capture
Regards

Commands fail - cannot load ntsdexts

I'm new to using WinDbg and am running into a problem. I've set the server for symbols and downloaded them, but I keep getting stuck when I try to run !htrace (or any other command actually). The error message I get is
Cannot load 'ntsdexts'
I get this on any command that starts with an exclamation point (i.e. !drivers, !heap, !htrace, etc.) which is making tracking down a handle leak a problem.
I'm using the srv*...* link direct to Microsoft for symbols.
The last line before I get the breakpoint is:
Module Load: C:\WINDOWS\SYSWOW64\VFRCORE.DLL (no symbols loaded)
From the comments:
Somehow I managed to get two different version of windbg installed and the one in the path is the wrong one. Put the dll file into the right place, ran from that specific directory and now it works.

Using MATLAB's diary function in an executable (MATLAB Application Compliler Toolbox)

I've created a code that will be run as an executable. However, the running of an executable has an error that doesn't exist in the MATLAB scripts. Trying to document this, I ran across the "diary" command which seems like an appropriate way of logging the error. Command: diary('LogFile.txt')
However, when running the compiled version, I immediately get a pop up error: LogFile.txt: Cannot open file: permission denied.
I'm getting a bit flummuxed as it appears to be having trouble writing to its own folder. Should I be trying to store to C:\Users, or is there some other glitch I'm running into?
Thanks a lot to 'Daniel' for his suggestion of getenv('appdata'). I would add that my path was ..\AppData\Roaming\ so I would suggest a way of viewing the location of the log file in your gui just to be sure you can find (or that others using your app can find it). Thanks!

DrRacket Contract Violation

I installed DrRacket so I can learn programming concepts using SICP. But for the past week or so, every time I launch DrRacket the console windows comes up with the following message:
fl-:contract violation
expected: flonum?
given: 0
argument position: 2nd
other arguments...:
2.0
I am not sure how I got here. I tried uninstalling and re-installing as 32-bit and 64-bit, restarting my laptop, searched forums for a possible fix. No luck. Just want to get back to my normal window where I can type in code. Thanks.
hope u found the answer. For my case, I found out that from a file I had been working on, and my computer shut down unexpectedly, there were three files associated with the initial file name - upon resuming Windows. The file extensions were .rkt (original), .bak and .1. I renamed the '.1' file as a second copy of the original and the 'contract violation' problem ended. It appeared the '.1' file was due to the laptop shutdown and was the auto-retrieve file.

GWT uploading a file to a unix path

I'm kinda puzzled how does a unix path looks like. I have followed an example to write a simple fileuploader using GWT. But the guide was written with Windows in mind. Say if I have C drive. In windows I would told the program to save the files to C:\save_here\
But in unix, I'm using ubuntu, there are no C drives or other drives with a single letter representation. So I wonder what do I write instead? I'm getting error 500 all the time now. And I can't figure out how the path should be.
The guide I've been following is found here
EDIT
It was not some problem duo to the path. Still need help though with fixing this problem. I basically followed the steps in the url I posted on this question.
unix paths start at a common root , denoted / and separates directories with a /
e.g. /home/starcom might be your home directory. So create a new directory, mkdir /home/starcom/uploaded and use that as the path. Or for testing you could perhaps just use /tmp
You can get more info here
When you get a 500 return code, that means the server encountered an error. This means that you should see an error message from the server somewhere. If you're running from Eclipse, you'll see the error on the Console tab. If you're running Tomcat, look for those logs.
You want to find the error message, since it'll probably explain what went wrong.