Back to the main page.

Bug 2202 - ft_hastoolbox: crash when doing ft_hastoolbox('SPM8UP', 1) ...

Reported 2013-06-13 16:59:00 +0200
Modified 2019-08-10 12:03:52 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to:
Depends on:
See also:

Jan-Mathijs Schoffelen - 2013-06-13 16:59:44 +0200

... when no SPM is yet on the path. If I first do: ft_hastoolbox('SPM8', 1), followed by ft_hastoolbox('SPM8UP', 1) it works fine. Vladimir would you know an easy fix for this? I must say that I did not look to deep into the code myself yet.

Vladimir Litvak - 2013-06-13 17:12:03 +0200

Hi Jan-Mathijs, I think the problem is in the way that function is designed. It assumes that there is one-to-one mapping between some names that you check for and things that can be added to the path. What I wanted to do is to check for SPM8 or later, but there is no toolbox called SPM8UP so it crashes when it tries to add it. I'm open to your suggestions of how to implement it differently keeping in mind that in some cases it might be important to distinguish between different SPM versions and in some not. Vladimir

Vladimir Litvak - 2013-06-13 17:14:06 +0200

(In reply to comment #1) Actually this whole complication was mostly for the sake of FT users. From our perspective we can just test for SPM12 but I thought that there might be FT users who would like to use interpolated lead-fields with SPM8 in the path and there is no reason not to support that. Vladimir

Jan-Mathijs Schoffelen - 2013-06-13 20:02:01 +0200

OK, but the consequence is that it causes troubles for the FT-users.

Vladimir Litvak - 2013-06-13 22:53:48 +0200

(In reply to comment #3) I checked in a fix that should work for people with full installation of FT (i.e. with /external/spm8)

Vladimir Litvak - 2013-06-13 22:54:37 +0200

Should be OK now

Jan-Mathijs Schoffelen - 2013-06-14 07:00:14 +0200

Great! Thanks.

Robert Oostenveld - 2019-08-10 12:03:52 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on