octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59661] classdef method call fails with "octav


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #59661] classdef method call fails with "octave_base_value::function_value(): wrong type argument '<unknown type>'"
Date: Sun, 13 Dec 2020 11:04:09 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.60

Update of bug #59661 (project octave):

                  Status:                    None => Confirmed              
        Operating System:               GNU/Linux => Any                    

    _______________________________________________________

Follow-up Comment #1:

Confirmed with Octave 6.1.0 on Windows 10 and with a build from the current
default branch on Ubuntu 20.10.

I set a breakpoint in `err_wrong_type_arg` where this error is thrown. The
start of the backtrace from that point is:

(gdb) bt
#0  0x00007ffff6905290 in err_wrong_type_arg(char const*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
> const&)@plt ()
    at
/home/osboxes/Documents/Repositories/Octave/octave-1/.build/libinterp/.libs/liboctinterp.so.8
#1  0x00007ffff6d96849 in octave_base_value::function_value(bool)
(this=0x7ffff7a0a5d0 <octave_value::nil_rep()::nr>, silent=false) at
../libinterp/octave-value/ov-base.cc:930
#2  0x00007ffff6efe065 in octave_value::function_value(bool) const
(this=0x7fffcd14a240, silent=false) at ../libinterp/octave-value/ov.cc:1775
#3  0x00007ffff6e14b9a in
octave::class_simple_fcn_handle::function_value(bool) (this=0x7fffcd14a1f0) at
../libinterp/octave-value/ov-fcn-handle.cc:439
#4  0x00007ffff6e1351d in octave_fcn_handle::function_value(bool)
(this=0x7fffcd147460) at ../libinterp/octave-value/ov-fcn-handle.h:264
#5  0x00007ffff6efe065 in octave_value::function_value(bool) const
(this=0x7fffdaff25d8, silent=false) at ../libinterp/octave-value/ov.cc:1775
#6  0x00007ffff709a503 in Fbsxfun(octave::interpreter&, octave_value_list
const&, int) (interp=..., args=...) at ../libinterp/corefcn/bsxfun.cc:371
#7  0x00007ffff6dae3c8 in octave_builtin::execute(octave::tree_evaluator&,
int, octave_value_list const&) (this=0x7fffccebf970, tw=..., nargout=1,
args=...) at ../libinterp/octave-value/ov-builtin.cc:65


I'm not sure if I got the picture correctly. But looking at the code, I think
the correct thing might happen if
`octave::class_simple_fcn_handle::function_value` would do the same as
`octave::simple_fcn_handle::function_value`.

With the attached patch the example in comment #0 works for me and all BISTs
still pass. I don't understand that part of the code well enough though to
estimate if this is the correct thing to do.

(file #50452)
    _______________________________________________________

Additional Item Attachment:

File name: bug59661_function_handle.patch Size:1 KB
   
<https://file.savannah.gnu.org/file/bug59661_function_handle.patch?file_id=50452>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59661>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]