bugGNU Octave - Bugs: bug #46350, Random errors with eval / function...

 
 

bug #46350: Random errors with eval / function / clear

Submitter:  Julien Bect <jbect>
Submitted:  Sat 31 Oct 2015 06:53:41 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 16 Aug 2018 10:54:30 AM UTC, comment #3: 

Hi Rik,

I just tried to reproduce the problem using the code snippet in my original post, with Octave's default branch and STK 2.3.4.

Apparently it is no longer a problem.

As far as I am concerned, you can close the report.

@++
Julien

Julien Bect <jbect>
Wed 15 Aug 2018 11:43:56 PM UTC, comment #2: 

This report is from 2015.  Is this still a problem?

Rik <rik5>
Group administrator
Sun 01 Nov 2015 08:03:12 AM UTC, comment #1: 

The original problem is failing test in the stk package.

See discussion here: http://octave.1599824.n4.nabble.com/problem-with-failing-unit-test-in-stk-any-ideas-td4673218.html


Julien Bect <jbect>
Sat 31 Oct 2015 06:53:41 PM UTC, original submission:  

Consider the following code:


eval (["function __test__ ()\n" ...
   "HOMOSCEDASTIC_NOISE = true;" ...
   "stk_example_kb09;" ...
   "endfunction"]);  __test__

clear __test__

eval (["function __test__ ()\n" ...
   "HOMOSCEDASTIC_NOISE = false;" ...
   "stk_example_kb09;" ...
   "endfunction"]);  __test__


Loading the stk package and running this code (in a script) several times in a row results in errors of the type:


error: 'HOMOSCEDASTIC_NOISE' undefined near line 60 column 4
error: called from
    stk_example_kb09 at line 60 column 1
    __test__ at line 2 column 29
    toto at line 11 column 18


The variable the triggers the error changes from time (it can be 'HOMOSCEDASTIC_NOISE' undefined near line 60 column 4, 'NOISE_STD_FUNC' undefined near line 77 column 13, 'zi' undefined near line 78 column 6...).

Once in a while it doesn't fail.

Removing the 'clear' statement in the middle seems to solve the issue, although I don't understand why.


Julien Bect <jbect>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jbect (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-16 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code