Back to the main page.
Bug 1480 - struct() crashes on config-object when this object contains a struct array with one of the fields being itself a struct
Status | CLOSED FIXED |
Reported | 2012-05-17 08:17:00 +0200 |
Modified | 2012-06-01 14:08:04 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P3 critical |
Assigned to: | Jan-Mathijs Schoffelen |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Jan-Mathijs Schoffelen - 2012-05-17 08:17:06 +0200
to reproduce: a.b(1).c.d = 1; a.b(1).c.e = 2; a.b(2).c.d = 3; a.b(2).c.e = 4; a = config(a); a2 = struct(a); This causes an obscure problem in ft_checkconfig (trackconfig = 'on') where one of the cfg fields is a structure like above -> this is the case when there is an mri in the input which is read in from dicom, having a field .hdr being a struct-array (1 for each slice), and some of the fields of these headers being structs themselves
Jan-Mathijs Schoffelen - 2012-05-17 08:28:34 +0200
found it: it probably suffices to add an extra for-loop. the problem occurs when the function recurs into itself, and when the input is then a 'config-array'.