Psychophysics Toolbox Matlab on Ubuntu Installation - matlab

I am trying to run code in Matlab that uses the Psychtoolbox and OpenGL. The commands that throw the error described below are:
PsychJavaTrouble
AssertOpenGL
Here are my specs:
OS: Ubuntu 14.04 LTS, 64bit
Processor: Intel Core i5-2450M CPT # 2.50GHz x 4
Graphics: Intel Sandybridge Mobile
Matlab Version: Matlab 64-Bit (Version 3.0.11 - Build date: Apr 6 2014)
Psychophysics version installed: 3
Installation methodology:
1. sudo apt-get install psychtoolbox in Terminal
2. updated it via UpdatePsychToolbox command in Matlab console
Here is the error message:
PsychJavaTrouble: Will now try to add the PsychJava folder to Matlabs dynamic
classpath...
Warning: "/home/lillian/Desktop/Matlab/Mona_Lisa/Psychtoolbox/PsychJava" is already
specified on static java path.
> In javaclasspath>local_validate_dynamic_path at 285
In javaclasspath>local_javapath at 182
In javaclasspath at 119
In javaaddpath at 71
In PsychJavaTrouble at 86
In ReverseCorrelationFaces at 2
PsychJavaTrouble: Added PsychJava folder to dynamic class path. Psychtoolbox Java
commands should work now!
PTB-INFO: Display ':0' : X-Screen 0 : Assigning primary output as 0 with RandR-CRTC
0 and GPU-CRTC 0.
PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 64-Bit (Version
3.0.11 - Build date: Apr 6 2014).
PTB-INFO: No low-level controllable GPU on screenId 0. Beamposition timestamping and
other special functions disabled.
PTB-INFO: Failed to enable realtime-scheduling [Operation not permitted]!
PTB-DEBUG:PsychOSGetSwapCompletionTimestamp: Invalid return values ust = 0, msc = 0
from call with success return code (sbc = 304)! Failing with rc = -2.
PTB-DEBUG:PsychOSGetSwapCompletionTimestamp: This likely means a driver bug or
malfunction, or that timestamping support has been disabled by the user in the
driver!
PTB-INFO: OpenGL-Renderer is Intel Open Source Technology Center :: Mesa DRI
Intel(R) Sandybridge Mobile :: 3.0 Mesa 10.1.3
PTB-INFO: VBL startline = 768 , VBL Endline = -1
PTB-INFO: Will try to use OS-Builtin OpenML sync control support for accurate Flip
timestamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.685075 ms [59.933804
Hz]. (297 valid samples taken, stddev=0.310528 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.646968 ms
[60.070999 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to
worry.
WARNING: Couldn't compute a reliable estimate of monitor refresh interval! Trouble
with VBL syncing?!?
----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! ----
One or more internal checks (see Warnings above) indicate that synchronization
of Psychtoolbox to the vertical retrace (VBL) is not working on your setup.
This will seriously impair proper stimulus presentation and stimulus presentation
timing!
Please read 'help SyncTrouble' for information about how to solve or work-around the
problem.
You can force Psychtoolbox to continue, despite the severe problems, by adding the
command
Screen('Preference', 'SkipSyncTests', 1); at the top of your script, if you really
know what you are doing.
Error using Screen
See error message printed above.
Error in ReverseCorrelationFaces (line 81)
window=Screen('OpenWindow', windowNum);
What am I missing? A package? Is my hardware not okay? I can't figure this error out.

So.. buried deep inside the DownloadPsychtoolbox.m file found here (see installation instructions here), is the instruction that apparently Psychtoolbox requires a special SDK. Super annoying. I will never use this toolbox again because it's so much drama to use. But this is what was missing that was causing the Screen call to fail
Missing SDK download link:
http://docs.gstreamer.com/display/GstSDK/Installing+on+Windows

Related

No library found for processing.io error error when running Processing code in raspberrypi

I am trying to run a Sketch program using Processing 4.0. The code is from FreeNove raspberrypi kit.
I am getting this error
No library found for processing.io
No library found for processing.io
No library found for processing.io
Libraries must be installed in a folder named 'libraries' inside the sketchbook folder (see the Preferences window).
The package “processing.io” does not exist. You might be missing a library.
The code is snippt which seem to include processing.io is
/*****************************************************
* Filename : Sketch_09_1_1_Motor
* Description : Control speed and direction of the motor
* auther : www.freenove.com
* modification: 2016/08/22
*****************************************************/
import processing.io.*;
int motorPin1 = 17; //connect to the L293D
int motorPin2 = 27;
int enablePin = 22;
final int borderSize = 45; //border size
Strange, normally Processing ARM should ship with the processing.io library.
If the install method the Freenove manual provides (curl https://processing.org/download/install-arm.sh | sudo sh) doesn't work,
I recommend trying the official Download page and selecting the Raspberry PI CPU architecture that fits (32 or 64 bit).
In the past I had success using the Processing 3 Raspberry PI Image (which has Processing preinstalled): this could be a backup plan if you have spare microSD card (or don't mind flashing over you're existing one).
Even though it's Processing 3, hopefully the same processing.io features you need will be available.

bladeRF simulink no device available error

I am connecting the bladeRF x115 to simulink with Matlab 2016a on a windows 10 PC.
I have followed the getting started guide on github:
www.nuand.com/bladeRF-doc/guides/bladeRF_windows_installer
Then I made a simple code as in the picture shown below:
I can simulate it only one time because when I tried to simulate it again I got the following error:
MATLAB System block 'testlinking/MATLAB System' error occurred when invoking 'setupImpl' method of 'bladeRF_Simulink'. The error was thrown from '
'C:\Program Files\bladeRF\matlab\bladeRF.m' at line 116
'C:\Program Files\bladeRF\matlab\bladeRF.m' at line 398
'C:\Program Files\bladeRF\matlab\bladeRF_Simulink.m' at line 364'.
Caused by:
libbladeRF error (-7) in bladeRF_open(): No devices available
Component:Simulink | Category:Block error
The reason for this error is because the led 2 is still blinking(device is in use). But it continues blinking even though I have closed matlab and simulink, and I don't know why?
Have a look at:
https://www.mathworks.com/matlabcentral/fileexchange/74591-communications-toolbox-support-package-for-bladerf-2-0?s_tid=mwa_osa_a
„Communications Toolbox Support Package for BladeRF 2.0“
Download the zip-file and navigate matlab to the directory bladerf.
This worked for me. The simulink block releases the bladerf-board so the Simulinkmodel can be stopped and restarted without problems/errors.
Your device is available with bladeRF cli?
Check:
bladeRF> info
Board: Nuand bladeRF 2.0 (bladerf2)
Serial #: 20f99xxxx
VCTCXO DAC calibration: 0x1de9
FPGA size: 301 KLE
FPGA loaded: yes
Flash size: 128 Mbit
USB bus: 2
USB address: 3
USB speed: SuperSpeed
Backend: libusb
Instance: 0
If is available close the bladerf cli and MATLAB. Open only MATLAB and check again.

kernel - postgres segfault error 15 in libc-2.19.so

Yesterday we had crash of PostgreSQL 9.5.14 running on Debian 8 (Linux xxxxxx 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64 GNU/Linux) - Segmentation fault. Database closed all connections and reinitialized itself staying ~1 minute in recovery mode.
PostgreSQL log:
2018-10-xx xx:xx:xx UTC [580-2] LOG: server process (PID 16461) was
terminated by signal 11: Segmentation fault
kern.log:
Oct xx xx:xx:xx xxxxxxxx kernel: [117977.301353] postgres[16461]:
segfault at 7efd3237db90 ip 00007efd3237db90 sp 00007ffd26826678 error
15 in libc-2.19.so[7efd322a2000+1a1000]
According to libc documentation (https://support.novell.com/docs/Tids/Solutions/10100304.html) error code 15 means:
NX_EDEADLK 15 resource deadlock would occur - which does not tell me much.
Could you tell me please if we can do something to avoid this problem in the future? Because this server is of course production one.
All packages are up to date currently. Upgrade of PG is unfortunately not the option. Server runs on Google Compute Engine.
error code 15 means: NX_EDEADLK 15
No, it doesn't mean that. This answer explains how to interpret 15 here.
It's bits 0, 1, 2, 3 set => protection fault, write access, user mode, use of reserved bit. Most likely your postgress process attempted to write to some wild pointer.
if we can do something to avoid this problem in the future?
The only thing you can do is find the bug and fix it, or upgrade to a release of postgress where that bug is already fixed (and hope that no new ones were introduced).
To understand where the bug might be, you should check whether a core dump was produced (if not, do enable them). If you have the core, use gdb /path/to/postgress /path/to/core, and then where GDB command. That will give you crash stack trace, which may allow you to find similar bug reports.

openocd **Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED**

I am trying to setup a eclipse development environment to work with stm32f303 nucleo 32 board.
http://www.st.com/en/evaluation-tools/nucleo-f303k8.html
So far, the all the tools seems to be correctly installed and working: I have succefully compiled and started openocd debugger for stm32f4 discovery and when I connect stm32f303 nucleo 32 board and start openocd, the led on the board indicates that it is connected. (I have flashed the board.)
The thing is openocd get lost when I do step by step debugging and this seems related to the message openocd gives me when started (look for bold line):
Open On-Chip Debugger 0.9.0 (2015-05-19-12:09)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
**Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED**
Info : STLINK v2 JTAG v27 API v2 SWIM v15 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.239293
Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
Does someone know how to fix usb driver in that case, or it is possible that something else cause the problem?
In case you experience this issue on Linux, you have to configure udev rules to work with the device. Find the 99-openocd.rules included with the source distribution of openOCD under Contributions. Connect your ST-Link USB-device and run 'lsusb' from a terminal, it will list something like this:
Bus 004 Device 009: ID 0483:3748 STMicroelectronics ST-LINK/V2
Notice the value behind ID, you want to check the 99-openocd.rules to see if there is a matching entry supporting the device, in the above case it's this one:
# STLink v2
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="664", GROUP="plugdev"
Copy this file to your /etc/udev/rules.d configuration directory and reboot your machine. Then try debugging again.
The OpenOCD distribution includes some libusb drivers, and recommends to run the zadig.exe tool to activate them. This will solve your problem.
http://zadig.akeo.ie/
As #silverdr mentioned in the comments, disconnecting the device and reconnecting it worked for me.

mscorjit overlaps mscoree when using windbg

Loading Dump File [C:\Crash_Mode__Date_12-05-2009__Time_15-54-2727\PID-4056__CCNET.EXE__1st_chance_Process_Shut_Down__full_13d0_2009-12-06_00-33-14-734_0fd8.dmp]
User Mini Dump File with Full Memory: Only application data is available
Comment: '1st_chance_Process_Shut_Down_exception_in_CCNET.EXE_running_on_TEST218'
Symbol search path is: srvE:\symbolshttp://msdl.microsoft.com/download/symbols
Executable search path is:
Windows Server 2003 Version 3790 (Service Pack 2) MP (2 procs) Free x64
Product: Server, suite: Enterprise TerminalServer SingleUserTS
Machine Name:
Debug session time: Sun Dec 6 00:33:14.000 2009 (GMT+8)
System Uptime: 32 days 12:43:52.414
Process Uptime: 0 days 8:44:37.000
..........................WARNING: mscorjit overlaps mscoree
..............................WARNING: wldap32 overlaps dnsapi
..........WARNING: rasapi32 overlaps dnsapi
...WARNING: tapi32 overlaps rasapi32
.WARNING: rtutils overlaps rasman
..............WARNING: setupapi overlaps winsta
....wow64cpu!CpupSyscallStub+0x9:
00000000`78b842d9 c3 ret
why this happen?
Not related to CLR, instead it's 32-on-64 as described here http://www.dumpanalysis.org/blog/index.php/2007/09/11/crash-dump-analysis-patterns-part-26/ -- in short use the following:
.load wow64exts
.effmach x86
With those, kb and !analyze -v will give better results.
I hadve seen the same thing latly, I do not know for sure but it's probably some WOW64 artifact or possibly due to some more aggressive anti-exploitation techniques. At leat on Win32, even though the load address of a DLL may be different on occasion, if a DLL is mapped in antother process (like ntdll/kernel32) when your process start's if it is statically linking these DLL's also, it would always load at the same address until the next reboot.
It seems probable that more recent CLR exe's are able to remap various module's per-execution, I know that this is an issue on MSVC10 and Windows7 but perhaps it's been ported to additonal platforms for CLR applications.