Back to the main page.

Bug 3269 - OCTAVE: fixname crashes with empty string input

Status CLOSED FIXED
Reported 2017-03-13 11:43:00 +0100
Modified 2019-08-10 12:41:29 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

nno - 2017-03-13 11:43:31 +0100

When using ft_prepare_layout when it is called through a function handle, it crashes in Octave because utilities/private/fixname.m cannot handle empty string input. This seems to be due to Octave setting elements in dbstack to the empty string when calling a function. Catching the case of an empty string seems to fix the issue; I will send a PR shortly. To replicate: - % install CoSMoMVPA (see cosmomvpa.org) - cd tests - run moxunit_runtests test_meeg_layout_collection.m Travis report: https://s3.amazonaws.com/archive.travis-ci.org/jobs/210322645/log.txt Stack trace: failure: A(I): index out of bounds; value 1 out of bound 0 fixname:45 (/home/travis/build/nno/fieldtrip/utilities/private/fixname.m) ft_warning>fieldnameFromStack:227 (/home/travis/build/nno/fieldtrip/utilities/ft_warning.m) ft_warning:149 (/home/travis/build/nno/fieldtrip/utilities/ft_warning.m) ft_postamble_history:44 (/home/travis/build/nno/fieldtrip/utilities/private/ft_postamble_history.m) ft_prepare_layout:949 (/home/travis/build/nno/fieldtrip/ft_prepare_layout.m) ft_postamble:86 (/home/travis/build/nno/fieldtrip/utilities/ft_postamble.m) ft_prepare_layout:949 (/home/travis/build/nno/fieldtrip/ft_prepare_layout.m) test_meeg_layout_collection>test_fieldtrip_correspondence:42 (/home/travis/build/nno/CoSMoMVPA/tests/test_meeg_layout_collection.m)


nno - 2017-03-13 11:48:43 +0100

(In reply to nno from comment #0) Proposed fix at https://github.com/fieldtrip/fieldtrip/pull/370


Robert Oostenveld - 2017-08-23 15:21:27 +0200

this has been solved through the PR


Robert Oostenveld - 2019-08-10 12:35:16 +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 on https://github.com/fieldtrip/fieldtrip/issues.


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