[open] Mantra on Ubuntu 12.10
Sorry, I realize that Mantra was tested with Ubuntu 10.10 and that I probably should have installed that version. I am currently running Ubuntu 12.10. Unfortunately, once I try to define an object, the webcam preview appears for less than a second and the program crashes and shuts down. Better to install Ubuntu 10.10? or does anyone know if there is a quick fix? Thanks!
ps. this is the error I see in the terminal: Fatal Python error: (pygame parachute) Segmentation Fault
Aborted (core dumped)

Comments
Hi Wieske,
I have encountered this issue as well with recent versions of Ubuntu. As far as I can tell, it's a memory error somewhere in the video4linux libraries, or maybe in the webcam specific drivers. I did not experience this problem with all webcams, so you could try using a different camera (if possible). Downgrading to Ubuntu 10.10 is also an option. With Ubuntu 10.10, I have never encountered this issue, even though I tested quite a few different cameras at the time.
Anyway, I'll definitely look into this when I have time. Because it's not good that users should downgrade to an ancient version of Ubuntu, of course.
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
I just tried it myself on Ubuntu 12.04.1 and indeed: segmentation fault. It happens with both of the cameras that I tried.
I'm still not sure what exactly triggers the error, but it has to do with monitoring of the webcam output (i.e. showing the webcam on the screen). For example, the script works fine, and tracking an object works fine as well, as long as you do not simultaneously monitor the tracking output. But defining an object is a serious problem, because it requires monitoring of the webcam for obvious reasons.
What you could do is the following:
valgrind qtmantraThis will be really slow, but should allow you to define the objects.
Possible? Yes. Convenient? No...
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks for the information and advice! I'll look into the options today and see what will work best.
By the way, congratulations! Hope you had a good day last Thursday!
Ciao ciao
turns out that the valgrind debugger does not slow it down enough for me here. it crashes the same... also get one other error that I am not sure I had before... see below.
I am having troubles installing 10.10 and finding the right dependencies, but I'll keep trying...
Hi Wieske,
I traced the memory error down and found that (for me) it occurs only under the following conditions: The GUI (the window with the buttons, etc.) is started and the webcam is monitored. Therefore, I made a small script that first starts the object definition phase and then goes on to recording, without starting the GUI. The best way to try it is to download the code snapshot from GitHub:
Next, extract and install, like you probably did before. And run
./mantrascript.pyFor me, this works fine, and is probably an acceptable and reasonably user-friendly way to run the experiment. You can change some configuration options, such as the resolution, in the script itself. The script could also serve as the basis for a fully customized script, of course.
A real fix would be much better, but I'm not sure whether that's feasible, as this issue appears not to be in Mantra itself, but in the underlying libraries.
Please let me know how this goes!
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Works! Great! Very cool. Thanks for your help Sebastiaan!
ps. that other error was because I thought i may have found a solution with another dependency I downloaded- I don't really know what I was doing- but that wasn't actually the case. Upon deleting that update, the error disappeared too...
Just one other thing... When trying to make this mantrascript.py work directly in OpenSesame, the mouse is not visible in the window where you can define the object and Open Sesame crashes after Enter. If I run the mantrascript via the terminal, I get the same message Frouke reported in her comment (Failed to connect to the Mantra server...etc. ). I am pretty sure I am recording for the recording.tsv file stores samples and I have matched the server in Mantra_connect 40007 in OpenSesame with the one terminal reports (40007).
Any ideas?
Do I understand correctly that you have copy-pasted mantrascript.py into an OpenSesame inline_script item? If so, that's would indeed cause trouble. The way to go would be to:
So in this construction mantrascript.py is the server, and OpenSesame is the client. They can run on the same computer, that's no problem, but they are separate programs.
Does that answer your question?
Cheers!
Check out SigmundAI.eu for our OpenSesame AI assistant!
Partly. Thanks! I understand now the idea of the server and the client (should not try to put the server in client... ).
Though, when I run it via the terminal, the problem is that OpenSesame does not connect to the Mantra server. The terminal reports listening on 40007 and I have set the mantra_connect plug in to 40007, but I get the connection error...
Just to be sure, I tried it the following (which worked):
First, start mantrascript.py in a terminal. Define an object. Next, press Escape to go the tracking phase, and leave the window open, like this:
Next, open a simple test experiment in OpenSesame, such as this one:
Make sure that the port matches the port reported by Mantra (but it sounds like you did). Next, run the experiment, and you should be up and tracking!
If you try the steps above, does it still not work? If not, do you see any errors in the terminal, or in the OpenSesame debug window?
Check out SigmundAI.eu for our OpenSesame AI assistant!