bugGNU Octave - Bugs: bug #37918, invalid error "undefined near...

 
 

bug #37918: invalid error "undefined near line"

Submitter:  None
Submitted:  Thu 13 Dec 2012 09:11:46 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Yuval Lifshitz Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.2
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 16 Dec 2012 09:24:10 AM UTC, comment #4: 

thanks. sent to the list.

(file #27105)

Anonymous
Fri 14 Dec 2012 01:52:09 PM UTC, comment #3: 

Please take this to the help list.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Fri 14 Dec 2012 08:39:12 AM UTC, comment #2: 

because of the flakiness of the problem it is hard to reduce to simpler code. my files are attached in tgz file (attachment failed last time...). to execute it I run:

octave min_estimation.m

i would look deeper to see if there is a branch in which the variable is not defined, although it does not look like that.
regardless, since i re-run octave everytime i don't see how anything could be lest in the environment. also, in line 1 of min_estimation.m i call "clear all".
when the problem occurs, it persists in every run, until i change something in the file (anything, even an extra space somewhere).

Anonymous
Thu 13 Dec 2012 09:23:57 PM UTC, comment #1: 

Can you please consult with the help list (help@octave.org) before deciding that this is a bug? And if you do discover a bug, please reduce it to a minimal example? And, of course, share the code that you think is producing this bug.

I am tentatively marking this bug as "invalid", since I suspect the problem is that you are defining the variable in a different code branch and the definition actually remains the second time you run the code since you are not clearing the workspace. It is difficult to know without even being able to see the code, however. If a bug actually exists, we can reopen this.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Thu 13 Dec 2012 09:11:46 PM UTC, original submission:  

got the following error code:

yuval@yuval-Lenovo-G580:~/dev/economics/rania$ octave min_estimation.m
GNU Octave, version 3.6.2
Copyright (C) 2012 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

warning: function /usr/share/octave/packages/statistics-1.1.3/fstat.m shadows a core library function
loading file: init_parameters.txt
22:54:40: loading files...
loading file: husbands.out
loading file: wives.out
loading moments files: wage_moments.txt, marr_fer_moments.txt, general_moments.txt
22:54:40: initializing random shocks...
22:55:05: now running (test) parameters...
error: `ability_w_index' undefined near line 547 column 85
error: evaluating argument list element number 6
error: called from:
error:   /home/yuval/dev/economics/rania/estimation_f.m at line 546, column 7
error:   /home/yuval/dev/economics/rania/minestimation_test.m at line 5, column 6
error:   /home/yuval/dev/economics/rania/min_estimation.m at line 39, column 11

the variable that is reported to be undefined, is actually defined in line 363 of estimation_f.m
also note that by doing a small unrelated change to the file (for example adding an empty line) the problem goes away

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #27105:  rania1.tgz added by None (81KiB - application/x-compressed-tar)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-12-16 None Attached File- Added rania1.tgz, #27105
    2012-12-13 jordigh StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code