[FieldTrip] Peer module thinks it has too little memory

Kyle Hird kyle.hird+fieldtrip at gmail.com
Mon Jul 22 18:54:38 CEST 2013

I've investigated my issue a bit further and found a couple of things
that may be of use for anyone attempting to diagnose the problem.

I mentioned previously that the instance of MATLAB which is running
peerslave segfaults when it receives a job if I compile the toolbox on
my system.  On inspection of the stack trace, I find memprofile twice-
the only file from FieldTrip to show up at all.  So I run memprofile
directly from the private directory with a couple of different
options.  With 'info', it appears to correctly measure memory usage-
approximately 110MB (the distributed binary reported an
unrealistically high number).  However, when set up to repeatedly
sample using 'on' and 'off', memprofile segfaults when 'off' is given,
and returns an almost-identical stack trace as when peerslave was run.
 If 'off' is given to memprofile without first having given 'on', the
error does not occur.  Other ways to trigger the segfault are, once
setting memprofile('on'), to give MATLAB the commands 'exit' or 'clear

I added some mexPrintf statements to try and pinpoint what instruction
is causing the segfault.  Based on this, the block of code beginning

    else if (strcasecmp(command, "off")==0)

completes execution correctly.  However, nothing in exitFun appears to
be executed, not even a print statement I put on the first line.  I'm
not sure what could cause this problem, but hopefully someone on the
list can make sense of this.

Thanks for your consideration
Kyle Hird

More information about the fieldtrip mailing list