Back to the main page.

Bug 1362 - vol structure does not contain a .mat field, which leads ft_prepare_leadfield to crash

Status CLOSED FIXED
Reported 2012-03-08 15:01:00 +0100
Modified 2012-04-11 16:48:38 +0200
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: Other
Operating System: Linux
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Anne Fransen - 2012-03-08 15:01:29 +0100

I ran the code on bilbo, a linux server. This has the release of the trunk from last night, and via svn i added at 14:40 todat the branches/surface folder. The same error occurs when instead of 'dipoli', 'openmeeg' is supplied to ft_prepare_headmodel. below you can find the exact code and the resulting errors and warnings. >>load newsurf newshape=bnd; clear bnd cfg=[]; cfg.method = 'dipoli'; vol=ft_prepare_headmodel(cfg,newshape); Your data and configuration allow for multiple sensor definitions. Warning: using gradiometers specified in the configuration\n > In fieldtrip/private/ft_fetch_sens at 105 In ft_prepare_headmodel at 155 Warning: No conductivity is declared, Assuming standard values\n > In ft_headmodel_bem_dipoli at 50 In ft_prepare_headmodel at 231 not using the isolated source approach using the executable "/LVmd2-1/annef/storage/common/matlab/fieldtrip/external/dipoli/dipoli.glnx86" Warning: your normals are outwards oriented\n > In ft_headmodel_bem_dipoli>checknormals at 220 In ft_headmodel_bem_dipoli at 153 In ft_prepare_headmodel at 231 flipping normals' direction /tmp/tp4e690484_99a8_403a_9d2c_2ec6fbdcf645.sh: line 3: /LVmd2-1/annef/storage/common/matlab/fieldtrip/external/dipoli/dipoli.glnx86: Permission denied Warning: an error ocurred while running dipoli > In ft_headmodel_bem_dipoli at 191 In ft_prepare_headmodel at 231 Error using ==> fread Invalid file identifier. Use fopen to generate a valid file identifier. Warning: File '/tmp/tp117239ac_270a_4cc9_a1c9_d38097cfc9be.ama' not found. > In ft_headmodel_bem_dipoli at 199 In ft_prepare_headmodel at 231 the call to "ft_prepare_headmodel" took 0 seconds and an estimated 0 MB >> point=[-6 1 4]; cfg = []; cfg.elec = elec; cfg.grid.pos = point; cfg.vol = vol; gridd = ft_prepare_leadfield(cfg); using headmodel specified in the configuration using electrodes specified in the configuration ??? Reference to non-existent field 'mat'. Error in ==> ft_prepare_vol_sens at 419 if size(vol.mat,1)~=size(vol.mat,2) && size(vol.mat,1)==length(sens.elecpos) Error in ==> prepare_headmodel at 74 [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ==> ft_prepare_leadfield at 138 [vol, sens, cfg] = prepare_headmodel(cfg, data);


Robert Oostenveld - 2012-03-08 16:25:11 +0100

The problem is in the dipoli executable not having the executable bit set. Consequently the file is not created or written and other problems follow... /LVmd2-1/annef/storage/common/matlab/fieldtrip/external/dipoli/dipoli.glnx86: Permission denied Warning: an error ocurred while running dipoli > In ft_headmodel_bem_dipoli at 191 In ft_prepare_headmodel at 231 Error using ==> fread Invalid file identifier. Use fopen to generate a valid file identifier. Warning: File '/tmp/tp117239ac_270a_4cc9_a1c9_d38097cfc9be.ama' not found. I have set the svn:executable property on all executables, see http://code.google.com/p/fieldtrip/source/detail?r=5411 and manzana> svn log -r 5411 ------------------------------------------------------------------------ r5411 | roboos | 2012-03-07 20:11:59 +0100 (Wed, 07 Mar 2012) | 2 lines enhancement - set the property svn:executable on all mex files and executables, this ensures that windows mex files work on a shared network filesystem and that executables can be started by double-clicking ------------------------------------------------------------------------


Robert Oostenveld - 2012-04-11 16:48:38 +0200

I cleaned up my bugzilla list by changing the status from resolved (either fixed or wontfix) into closed. If you don't agree, please reopen the bug. Robert