[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59451] Function handles become invalid if pat
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed |
Date: |
Thu, 12 Nov 2020 10:16:22 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36 Edg/86.0.622.63 |
Update of bug #59451 (project octave):
Status: Need Info => Confirmed
Operating System: GNU/Linux => Any
Summary: Function handle loses reference to its target
function => Function handles become invalid if path to function is removed
_______________________________________________________
Follow-up Comment #2:
Following the steps you describe with Octave 6.0.92 on Windows, I see the
following:
>> cd ../tests
>> moxunit_runtests
warning: isdir is obsolete; use isfolder or dir_in_loadpath instead
suite: 99 tests
.............................ss..s.warning: findstr is obsolete; use strfind
instead
F........................
..sF..................warning: strmatch is obsolete; use strncmp or strcmp
instead
.................
--------------------------------------------------
skipped: resetting the warning state seems not to work (TODO: file a bug
report?)
skipped: <matlab.unittest.Test> class is not available
skipped: 'test_moxunit_runtests_basics' is very slow in Octave on Windows!
failure: invalid function handle, unable to find function for
@moxunit_set_path
test_moxunit_set_path>helper_test_with_subdir:30
(D:\SVN\Octave\MOxUnit-master\tests\test_moxunit_set_path.m)
test_moxunit_set_path>test_moxunit_set_path_root:9
(D:\SVN\Octave\MOxUnit-master\tests\test_moxunit_set_path.m)
skipped: 'test_different_args_subfunction' is very slow in Octave on Windows!
failure: elements are not equal
First input: 1x1 logical
0
Second input: 1x1 logical
1
assertEqual:70 (D:\SVN\Octave\MOxUnit-master\MOxUnit\assertEqual.m)
test_moxunit_util_platform_supports>test_moxunit_util_platform_supports_localfunctions_in_script:18
(D:\SVN\Octave\MOxUnit-master\tests\test_moxunit_util_platform_supports.m)
--------------------------------------------------
FAILED (passed=93, skipped=4, failure=2)
ans = 0
Looking at the first failing test, a simpler test to reproduce this error is
(using the GUI):
mkdir bug59451_func_handle_path
edit bug59451_func_handle_path/fun.m
addpath bug59451_func_handle_path
fh = @fun
rmpath bug59451_func_handle_path
fh(1,2)
The last line fails with the following error message in 6.0.92:
>> fh(1,2)
error: invalid function handle, unable to find function for @fun
The function handle could still be called in 5.2.0 after the path to the
function was removed.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59451>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59451] Function handle looses reference to its target function, JD, 2020/11/11
- [Octave-bug-tracker] [bug #59451] Function handle loses reference to its target function, Rik, 2020/11/12
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed,
Markus Mützel <=
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, Rik, 2020/11/12
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, Rik, 2020/11/12
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, John W. Eaton, 2020/11/12
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, John W. Eaton, 2020/11/12
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, John W. Eaton, 2020/11/12
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, Markus Mützel, 2020/11/13
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, John W. Eaton, 2020/11/13
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, John W. Eaton, 2020/11/13
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, John W. Eaton, 2020/11/13
- [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed, John W. Eaton, 2020/11/13