Back to the main page.

Bug 2580 - bug with preprocessing, abort is undefined

Status CLOSED INVALID
Reported 2014-05-14 21:56:00 +0200
Modified 2014-07-15 17:25:10 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: Other
Operating System: Linux
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2478http://bugzilla.fcdonders.nl/show_bug.cgi?id=2643

Ayelet N. Landau - 2014-05-14 21:56:53 +0200

every call for ft_preprocessing give the following error: ??? Undefined function or variable 'abort'. Error in ==> ft_preprocessing at 163 if abort this doesn't occur with an earlier version that I have stashed aside. ft_version: this is FieldTrip, version r9530 (svn). ft_preprocessing seems to have been modified today. This might be related. looking forward for the fix! Ayelet


Arjen Stolk - 2014-05-14 22:18:56 +0200

Thanks for reporting, Ayelet. It seems this 'bug' may have been introduced with revision 9520: https://code.google.com/p/fieldtrip/source/detail?r=9520 https://code.google.com/p/fieldtrip/source/diff?spec=svn9520&r=9520&format=side&path=/trunk/ft_preprocessing.m Any idea on a quick fix, Robert?


Robert Oostenveld - 2014-05-14 23:25:36 +0200

(In reply to Arjen Stolk from comment #1) it will indeed be related to my change of today related to bug #2478. However, I don't understand why "abort" would not exist. The boolean variable is created here https://code.google.com/p/fieldtrip/source/diff?spec=svn9520&r=9520&format=side&path=/trunk/utilities/private/ft_preamble_init.m which is in the same revision. @Ayelet, could you check your copy of ft_preamble_init? Could you set a breakpoint in ft_preamble_init and see what goes on?


Robert Oostenveld - 2014-05-15 16:33:54 +0200

I got this message from Irina -------------------- On 15 May 2014, at 15:45, Irina Simanova wrote: My master student Yuliya came across this error message when trying to create plots with sourceplot. Undefined function or variable 'abort'. Error in ft_sourceplot (line 191) if abort It happened yesterday for the first time, and since then she could not work with this function. -------------------- I.e. same problem. I have asked for details.


Arjen Stolk - 2014-05-15 20:19:16 +0200

Seems indeed that change is throwing errors in some cases - weird. Hope those details will tell us more.


Robert Oostenveld - 2014-05-16 09:44:08 +0200

On 15 May 2014, at 20:41, Yuliya Berezutskaya <yuliya.berezutskaya@xxx> wrote: Thank you for your reply. I added utilities/private/ to the path, it works now. -------- Hmm, that does not make complete sense. You cannot (technically) add private directories to the path, see http://fieldtrip.fcdonders.nl/faq/matlab_does_not_see_the_functions_in_the_private_directory You can add utilities to the path, which ft_defaults would ensure to be the case in each high-level FT function. Your reply suggests that the order of setting the paths might be involved in the problem. I’ll see whether I can reproduce it.


Robert Oostenveld - 2014-05-16 09:50:26 +0200

(In reply to Robert Oostenveld from comment #5) Starting from a completely empty path, and adding only the main fieldtrip folder, I cannot reproduce the problem. The ft_defaults does its work properly and sets up the path such that ft_preamble_init can be found I wonder whether it is a problem due to updating the fieldtrip code on disk without restarting matlab. In that case I could imagine that the change in ft_preamble_init would not be noticed by matlab and that hence the "abort" variable not being set. If this were the case, it would potentially only happen once around the update of the code on disk @Ayelet, are you still able to reproduce the problem?


Ayelet N. Landau - 2014-05-16 12:58:32 +0200

Hi All, I am still able to reproduce the problem. I also tried restarting matlab, clearing my path, leaving only the main ft folder in -- running ft_defaults. the problem persists. As for breaking at ft_preamble_init: when I step into this function - it actually does very little the first line: if nargin==0 is false do it jumps right out of it. here is the conditional that is ft_preamble_help in title, but ft_preamble_init in file name - just in case: if nargin==0 stack = dbstack('-completenames'); % stack(1) is this script % stack(2) is the calling ft_postamble function % stack(3) is the main FieldTrip function that we are interested in stack = stack(3); help(stack.name); % throw the error as if it happened in the original function msg.message = 'This function requires one or multiple input arguments, please refer to the documentation above'; msg.identifier = ''; msg.stack = stack; error(msg); end looking forward to a work around! best, Ayelet


Robert Oostenveld - 2014-05-16 18:37:08 +0200

(In reply to Ayelet N. Landau from comment #7) Hi Ayelet, It seems to me that you have an old ft_preamble_init.m, since in the change involving abort I also fixed the function name and help. Can you compare it with https://code.google.com/p/fieldtrip/source/browse/trunk/utilities/private/ft_preamble_init.m The important difference is that there is a second section wher the abort variable is set.


Ayelet N. Landau - 2014-05-16 23:12:11 +0200

Hi Robert, our file is not the right one. here is the ID % $Id: ft_preamble_init.m 8241 2013-06-12 13:38:54Z jorhor $ and here is the function pasted: if nargin==0 stack = dbstack('-completenames'); % stack(1) is this script % stack(2) is the calling ft_postamble function % stack(3) is the main FieldTrip function that we are interested in stack = stack(3); help(stack.name); % throw the error as if it happened in the original function msg.message = 'This function requires one or multiple input arguments, please refer to the documentation above'; msg.identifier = ''; msg.stack = stack; error(msg); end how do I go about repairing this situation? I am using the fieldtrip version sitting on the cluster /opt/fieldtrip at this point - you might know better than I would what the protocol for updates of this version is. Let me know how you think I should address this. Ayelet


Robert Oostenveld - 2014-05-17 17:42:05 +0200

(In reply to Ayelet N. Landau from comment #9) Hi Ayelet, Good to hear that it is not some magical difference between MATLAB versions, but just a n update problem. When and where did you get the fieldtrip version from that you are using? Is someone else in charge of updating it, i.e. is it on a network share? If so, please discuss with that person. Otherwise just get the latest version (zip file) from our FTP server. Robert


Robert Oostenveld - 2014-07-09 12:36:10 +0200

there is no indication that the problem has even been in fieldtrip, rather it was a corrupt fieldtrip installation on the end-users' disks.


Robert Oostenveld - 2014-07-15 17:25:10 +0200

Closed several bugs that were recently resolved. If it is closed in error, please reopen.