Back to the main page.

Bug 1619 - ft_prepare_sourcemodel crash

Status CLOSED FIXED
Reported 2012-07-31 14:38:00 +0200
Modified 2019-08-10 11:55:38 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Jan-Mathijs Schoffelen - 2012-07-31 14:38:40 +0200

when inputting a cfg without a vol-structure. The function crashes upon execution of ft_fetch_vol. However, some methods do not require a vol to be present in the input. I now circumvented this with a try-catch, also for the ft_fetch_sens call later on. Verify whether this is OK for you.


Jörn M. Horschig - 2012-07-31 15:19:57 +0200

that's fine - it's the same as in ft_prepare_headmodel. we could modify ft_fetch_XXX such that it returns an empty structure, though I prefer the try-catch statement (so that users get an appropriate error message for functions that do need sens or vol). what do you think?


Jan-Mathijs Schoffelen - 2012-07-31 15:28:19 +0200

I agree. Probably the cleaner solution then would be to check whether the particular method in ft_prepare_sourcemodel actually needs a vol/sens. For now I can very well live with the try catch solution, and rely on the subsequent code to catch the error when the vol/sens is actually needed


Robert Oostenveld - 2019-08-10 11:51:41 +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 https://github.com/fieldtrip/fieldtrip/issues.


Robert Oostenveld - 2019-08-10 11:55:38 +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 https://github.com/fieldtrip/fieldtrip/issues.