bugGNU Octave - Bugs: bug #39552, quiver/quiver3 ignores scale with...

 
 

bug #39552: quiver/quiver3 ignores scale with only one point to plot

Submitter:  None
Submitted:  Mon 22 Jul 2013 07:34:49 PM UTC
   
 
Category:  Plotting Severity:  2 - Minor
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Alex Burka Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  9.1.0
Planned Release:  9.1.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 09 Aug 2023 08:44:34 PM UTC, comment #29: 

no reported concerns since april.  closing report.

Nicholas Jankowski <nrjank>
Group Member
Thu 20 Apr 2023 08:56:55 PM UTC, comment #28: 

made those tweaks, split it into two separate tests, added a couple simple input validation BISTs, and pushed as:
https://hg.savannah.gnu.org/hgweb/octave/rev/31f7f5359ba2

i may add a few more input validation tests, but since the function immediately calls that may require a little reworking of the front end of the code if i want to catch the invalid input before it generates/overwrites any figures.

Nicholas Jankowski <nrjank>
Group Member
Thu 20 Apr 2023 04:31:31 PM UTC, comment #27: 

Either looks good to me.
Only changes maybe:
- Store the result of `get (h, "children")` in a variable and index into that instead of calling `get` repeatedly.
- Instead of `.` indexing into the result of a "bare" `get (h)` (like `get (h).xdata`), get just the required property with `get (h, 'xdata')`. That will likely require a lot less computational effort...

Markus Mützel <mmuetzel>
Group administrator
Thu 20 Apr 2023 03:42:56 PM UTC, comment #26: 

(minus the redundant numpts assignment)

Nicholas Jankowski <nrjank>
Group Member
Thu 20 Apr 2023 03:41:26 PM UTC, comment #25: 

i saw the same, but this seems to work:


%!test <*39552> # Check arrow length and scale factor adjustment.
%! hf = figure ("visible", "off");
%! hax = gca ();
%! unwind_protect
%!   [x,y] = meshgrid (1:2);
%!   u = [0 1; 2 3];
%!   v = [1 2; 3 4];
%!   numpts = numel (x);
%!   sf = 0.5;
%!
%!   ## Check single arrow.
%!   h = quiver (hax, x(4), y(4), u(4), v(4), 1);
%!   child = find (cellfun ( ...
%!                  @numel, {get(get (h, "children")).xdata}) == 3);
%!   xendpoint = get (get (h, "children")(child), "xdata")(2);
%!   assert (xendpoint, x(4) + u(4), eps);
%!   h = quiver (hax, x(4), y(4), u(4), v(4), sf);
%!   child = find (cellfun( ...
%!                  @numel, {get(get (h, "children")).xdata}) == 3);
%!   xendpoint = get (get (h, "children")(child), "xdata")(2);
%!   assert (xendpoint, x(4) + sf*u(4), eps);
%!
%!   ## Check multiple arrows.
%!   numpts = 4;
%!   h = quiver (hax, x, y, u, v, 1);
%!   child = find (cellfun ( ...
%!                  @numel, {get(get (h, "children")).xdata}) == 3*numpts);
%!   xendpoint1 = get (get (h, "children")(child), "xdata")(5);
%!   assert (xendpoint1, x(2) + (sqrt(2)/10)*u(2), eps);
%!   xendpoint2 = get (get (h, "children")(child), "xdata")(11);
%!   assert (xendpoint2, x(4) + (sqrt(2)/10)*u(4), eps);
%!   h = quiver (hax, x, y, u, v, sf);
%!   child = find (cellfun ( ...
%!                  @numel, {get(get (h, "children")).xdata}) == 3*numpts);
%!   xendpoint1 = get (get (h, "children")(child), "xdata")(5);
%!   assert (xendpoint1, x(2) + sf*(sqrt(2)/10)*u(2), eps);
%!   xendpoint2 = get (get (h, "children")(child), "xdata")(11);
%!   assert (xendpoint2, x(4) + sf*(sqrt(2)/10)*u(4), eps);
%!
%! unwind_protect_cleanup
%!   close (hf);
%! end_unwind_protect


If you think that's too needlessly complicated, I could push the comment #14 version, along with a comment in `__quiver__` that changing the ordering will break BISTS in quiver.m and would need to be updated.  But since the test above works, and shouldn't be fragile to other changes, I think it should be okay to use.

Nicholas Jankowski <nrjank>
Group Member
Thu 20 Apr 2023 03:26:14 PM UTC, comment #24: 

Looking at the local function `update_data` of `__quiver__`, it is  relying on the order of the graphics objects in the hg group for updates anyway. So, you are probably fine to rely on it, too.
Sorry for the noise.

Markus Mützel <mmuetzel>
Group administrator
Thu 20 Apr 2023 03:04:45 PM UTC, comment #23: 

findobj wolud be good. should keep from making fragile tests. but i don't have a unique property to check yet. there are 3 children.  all 3 are type="line". 
(1) contains info about the origin of each arrow. just one xdata/ydata element for each arrow, linestyle=none
(2) contains info about the arrowhead line segments. three xdata/ydata elements for each arrow (end-center-end), linestyle = -
(3) contains info about the arrow body segment. two xdata/ydata elements for each arrow (base-tip), linestyle = -

so, should be able to find the one with the right number of xdata elements, then use that one. will play with it a bit.

Nicholas Jankowski <nrjank>
Group Member
Thu 20 Apr 2023 06:31:43 AM UTC, comment #22: 

Re comment #14:
I don't know how complicated it would be to identify the correct child, e.g., by "type" or "tag". If that is possible (e.g., using `findobj`), it might be better to use that instead of hard-coding a fix index in the test.

Markus Mützel <mmuetzel>
Group administrator
Wed 19 Apr 2023 11:14:45 PM UTC, comment #21: 

I did bisecting.


changeset:   31819:4db921b57ace
user:        Rik <rik@octave.org>
date:        Thu Feb 09 16:57:02 2023 -0800
summary:     Extend set() to process any combination of acceptable inputs.


broke it.

(31818:758de955caca was OK).

Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Wed 19 Apr 2023 09:34:58 PM UTC, comment #20: 

stripping out the last three inputParser commits didn't change anything with the segfault.  so it goes back further than that.  I'm not set up for stepping through/debugging compiled code, so can't step through to see what line in set is triggering a segfault .  I can maybe work on better input validation (any input validation) for quiver, but i think it's supposed to take any normal plotting name/value parameters, so a bit limited in restricting things there. but i'll give it a look.

so two issues so far: 
1) invalid input to set is triggering a new segfault where it used to error. 

2) one error is being reported as occurring at the wrong place.  I think I recall this coming up before but not sure what bug # it might be under.

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 09:24:57 PM UTC, comment #19: 

yes, i see you were already on the inputParser issue.

I can trigger a segfault on dev as well, even if I strip out my changeset.  so, it doesn't seem my >= that did it.

on 8.2.0 (on windows):

>> quiver(1,2,3,4,5) #no error, expected plot with one big arrow

>> close all

>> quiver(1,2,3,4,5,6) #same plot produced but with error
error: set: invalid number of arguments
error: called from
    __quiver__ at line 335 column 10
    quiver at line 92 column 10

>> close all

>> quiver(1,2,3,4,5,6,7)  #same plot produced but with error
error: set: argument 0 must be a property name


there's no input validation on quiver, so it makes sense that nonsensical inputs for 6 and 7 will cause issues with set.

trying the same on dev (still rolled by from my patch below):

>> quiver(1,2,3,4,5) #no error, expected plot with one big arrow
clo
>> quiver(1,2,3,4,5,6) #figure produced before segfault
fatal: caught signal Segmentation fault -- stopping myself
Segmentation fault (core dumped)

>> quiver(1,2,3,4,5,6,7) #error, expected plot with one big arrow
fatal: caught signal Segmentation fault -- stopping myself
Segmentation fault (core dumped)


both 6 and 7 input cases, the error happens on the final call to set:

quiver line 102:

  unwind_protect_cleanup
    if (! isempty (oldfig))
      set (0, "currentfigure", oldfig);
    endif
  end_unwind_protect


i'm not sure why the 6 input case is reporting the error inside __quiver__, when i stepped through the last successful set call  was in _quiver_ at 335, but no error and it finished __quiver_ and stepped back up to quiver to hit line above. error occured on that call to set.

What would make previous errors segfault on dev? Does set use inputparser?  i'll try stripping out rik's changes and see if the segfault repeats.

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 09:02:43 PM UTC, comment #18: 

I'm guessing that discussion should happen on bug #64050

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 09:02:21 PM UTC, comment #17: 

Those are for sure InputParser related. I am more concern about coredump in quiver.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Wed 19 Apr 2023 08:59:46 PM UTC, comment #16: 

that might be right. I did a reclone and am still seeing 87 test failures, most on odeXX tests.  so not related to this.

e.g.,:

!!!!! test failed
argument 'Mass' matches more than one Parameter: 'Mass', 'MassSingular'.
***** testif HAVE_SUNDIALS
 opt = odeset ("MStateDependence", "none",
               "Mass", sparse ([1, 0, 0; 0, 1, 0; 0, 0, 0]),
               "Jacobian", @jacfundense);
 [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
 assert ([t(end), y(end,:)], frefrob, 1e-3);



odeset uses inputParser, so that would make sense.

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 08:04:46 PM UTC, comment #15: 

I do not see crash on 8.2.1, but I do on dev head. I wonder
if this is related (got exposed by) to bug #64050 (inputParser changes). We need to add @rik to this

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Wed 19 Apr 2023 07:26:57 PM UTC, comment #14: 

planning to push the following test to quiver if I can confirm I didn't break something else:


%!test <*39552> # Check arrow length and scale factor adjustment.
%! hf = figure ("visible", "off");
%! hax = gca ();
%! unwind_protect
%!   [x,y] = meshgrid (1:2);
%!   u = [0 1; 2 3];
%!   v = [1 2; 3 4];
%!   sf = 0.5;
%!
%!   ## Check single arrow.
%!   h = quiver (hax, x(4), y(4), u(4), v(4), 1);
%!   xendpoint = get (get (h, "children")(3), "xdata")(2);
%!   assert (xendpoint, x(4) + u(4), eps);
%!   h = quiver (hax, x(4), y(4), u(4), v(4), sf);
%!   xendpoint = get (get (h, "children")(3), "xdata")(2);
%!   assert (xendpoint, x(4) + sf*u(4), eps);
%!
%!   ## Check multiple arrows.
%!   h = quiver (hax, x, y, u, v, 1);
%!   xendpoint1 = get (get (h, "children")(3), "xdata")(5);
%!   assert (xendpoint1, x(2) + (sqrt(2)/10)*u(2), eps);
%!   xendpoint2 = get (get (h, "children")(3), "xdata")(11);
%!   assert (xendpoint2, x(4) + (sqrt(2)/10)*u(4), eps);
%!   h = quiver (hax, x, y, u, v, sf);
%!   xendpoint1 = get (get (h, "children")(3), "xdata")(5);
%!   assert (xendpoint1, x(2) + sf*(sqrt(2)/10)*u(2), eps);
%!   xendpoint2 = get (get (h, "children")(3), "xdata")(11);
%!   assert (xendpoint2, x(4) + sf*(sqrt(2)/10)*u(4), eps);
%!
%! unwind_protect_cleanup
%!   close (hf);
%! end_unwind_protect
+verbatim+

there are probably a number of BISTs we could add to quiver like this since the line segments are fairly reliable check items, but  it is a bit of a chore to pull out the right pieces. The test does rely on child ordering, though, while the plot itself doesn't, which seems like something that could easily break down the road. I don't think it's worth the effort for me to have the test parse the children to figure out which one of the three might be the correct one to test, but it could be done.

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 07:22:06 PM UTC, comment #13: 


I'm trying to recreate your segfault, but after stripping out my last change I'm getting lots of strange build and test errors, so I recloned and am waiting on that rebuild.

In the meantime trying that command on unmodified 8.2.0 (i don't think there have been any quiver changes since then):

>> quiver(42,5,4,3,2,1)

error: set: invalid number of arguments
error: called from
    _quiver_ at line 335 column 10
    quiver at line 92 column 10

if I manually make the >= change and do a clear -f:

>> quiver(42,5,4,3,2,1)

error: set: invalid number of arguments
error: called from
    _quiver_ at line 335 column 10
    quiver at line 92 column 10

so... not sure why you're getting a segfault

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 05:17:19 PM UTC, comment #12: 

A simplified test is just

octave:1> quiver(42,5,4,3,2,1)
Downloading separate debug info for /usr/lib64/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so...
Downloading separate debug info for /lib64/libdrm.so.2...
Downloading separate debug info for /home/dima/.cache/debuginfod_client/64206cdfd15ba7d82a19b3886e3bdc0543cc51ff/debuginfo...

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcb7fe640 (LWP 434684)]
std::__atomic_base<long>::fetch_add (__m=std::memory_order_seq_cst, __i=1,
    this=0x8) at /usr/include/c++/11/bits/atomic_base.h:618
618              { return __atomic_fetch_add(&_M_i, __i, int(__m)); }


and backtrace:

(gdb) thread apply all bt

Thread 9 (Thread 0x7fffcaf94640 (LWP 434685) "QThread"):
#0  0x00007fffefc55b0a in __GI___sigtimedwait (set=set@entry=0x7ffff4669600 <async_signals>, info=info@entry=0x7fffcaf931c0, timeout=timeout@entry=0x0) at ../sysdeps/unix/sysv/linux/sigtimedwait.c:61
#1  0x00007fffefc5514c in __GI___sigwait (set=0x7ffff4669600 <async_signals>, sig=0x7fffcaf93284) at ../sysdeps/unix/sysv/linux/sigwait.c:28
#2  0x00007ffff43b8510 in signal_watcher(void*) (arg=0x7ffff7531585 <octave::generic_sig_handler(int)>) at ../liboctave/wrappers/cxx-signal-helpers.cc:179
#3  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#4  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 8 (Thread 0x7fffcb7fe640 (LWP 434684) "QThread"):
#0  std::__atomic_base<long>::fetch_add(long, std::memory_order) (__m=std::memory_order_seq_cst, __i=1, this=0x8) at /usr/include/c++/11/bits/atomic_base.h:618
#1  std::__atomic_base<long>::operator++(int) (this=0x8) at /usr/include/c++/11/bits/atomic_base.h:369
#2  0x00007ffff7b1e918 in octave::refcount<long>::operator++(int) (this=0x8) at ../liboctave/util/oct-refcount.h:60
#3  0x00007ffff7b7ca2e in octave_value::operator=(octave_value const&) (this=0x7fffb876ca38, a=...) at ../libinterp/octave-value/ov.h:389
--Type <RET> for more, q to quit, c to continue without paging--c
#4  0x00007ffff7b8e3d6 in std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m<octave_value const*, octave_value*>(octave_value const*, octave_value const*, octave_value*) (__first=0x7fffb8649d80, __last=0x7fffb8649d88, __result=0x7fffb876ca38) at /usr/include/c++/11/bits/stl_algobase.h:385
#5  0x00007ffff6d7061e in std::__copy_move_a2<false, octave_value const*, octave_value*>(octave_value const*, octave_value const*, octave_value*) (__first=0x7fffb8649d78, __last=0x7fffb8649d88, __result=0x7fffb876ca30) at /usr/include/c++/11/bits/stl_algobase.h:495
#6  0x00007ffff6d6cfef in std::__copy_move_a1<false, octave_value const*, octave_value*>(octave_value const*, octave_value const*, octave_value*) (__first=0x7fffb8649d78, __last=0x7fffb8649d88, __result=0x7fffb876ca30) at /usr/include/c++/11/bits/stl_algobase.h:522
#7  0x00007ffff6e07206 in std::__copy_move_a<false, __gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value*, std::vector<octave_value, std::allocator<octave_value> > > >(__gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value*, std::vector<octave_value, std::allocator<octave_value> > >) (__first={m_rep = 0x7fffb8473890}, __last={m_rep = 0x25}, __result={m_rep = 0x7fffb8473890}) at /usr/include/c++/11/bits/stl_algobase.h:529
#8  0x00007ffff6e049bb in std::copy<__gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value*, std::vector<octave_value, std::allocator<octave_value> > > >(__gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value*, std::vector<octave_value, std::allocator<octave_value> > >) (__first={m_rep = 0x7fffb8473890}, __last={m_rep = 0x25}, __result={m_rep = 0x7fffb8473890}) at /usr/include/c++/11/bits/stl_algobase.h:620
#9  0x00007ffff6e75deb in octave_value_list::slice(long, long, bool) const (this=0x7fffcb7f9e00, offset=1, len=2, tags=false) at ../libinterp/octave-value/ovl.h:140
#10 0x00007ffff7355e0e in octave::Fset(octave::interpreter&, octave_value_list const&, int) (interp=..., args=..., nargout=0) at ../libinterp/corefcn/graphics.cc:12281
#11 0x00007ffff6ffbf01 in octave::tree_evaluator::execute_builtin_function(octave_builtin&, int, octave_value_list const&) (this=0x7fffb800a748, builtin_function=..., nargout=0, args=...) at ../libinterp/parse-tree/pt-eval.cc:3367
#12 0x00007ffff6e546c3 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb80d96e0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-builtin.cc:49
#13 0x00007ffff6eb7c08 in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb80d96e0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-fcn.cc:57
#14 0x00007ffff701daf5 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) (this=0x7fffb87a8de0, tw=..., nargout=0) at ../libinterp/parse-tree/pt-idx.cc:427
#15 0x00007ffff702062f in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) (this=0x7fffb87a8de0, tw=..., nargout=0) at ../libinterp/parse-tree/pt-idx.h:104
#16 0x00007ffff6ffda0d in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3863
#17 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb87a9030, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#18 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#19 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb87a9070, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#20 0x00007ffff6ffd3ac in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3711
#21 0x00007ffff7007778 in octave::tree_if_command_list::accept(octave::tree_walker&) (this=0x7fffb87a9180, tw=...) at ../libinterp/parse-tree/pt-select.h:111
#22 0x00007ffff6ffd1f5 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) (this=0x7fffb800a748, cmd=...) at ../libinterp/parse-tree/pt-eval.cc:3689
#23 0x00007ffff7029022 in octave::tree_if_command::accept(octave::tree_walker&) (this=0x7fffb87a91b0, tw=...) at ../libinterp/parse-tree/pt-select.h:141
#24 0x00007ffff6ffd925 in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3838
#25 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb87a91f0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#26 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#27 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb875ec20, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#28 0x00007ffff6ffeb22 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) (this=0x7fffb800a748, cmd=...) at ../libinterp/parse-tree/pt-eval.cc:4208
#29 0x00007ffff701a364 in octave::tree_unwind_protect_command::accept(octave::tree_walker&) (this=0x7fffb87a9c50, tw=...) at ../libinterp/parse-tree/pt-except.h:142
#30 0x00007ffff6ffd925 in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3838
#31 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb87a9ca0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#32 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#33 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb8697730, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#34 0x00007ffff6ffcb2d in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) (this=0x7fffb800a748, user_function=..., nargout=1, xargs=...) at ../libinterp/parse-tree/pt-eval.cc:3587
#35 0x00007ffff6f13503 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb87a9e80, tw=..., nargout=1, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:495
#36 0x00007ffff6f1347c in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb87a9e80, tw=..., nargout=1, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:488
#37 0x00007ffff701daf5 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) (this=0x7fffb8230f90, tw=..., nargout=1) at ../libinterp/parse-tree/pt-idx.cc:427
#38 0x00007ffff702062f in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) (this=0x7fffb8230f90, tw=..., nargout=1) at ../libinterp/parse-tree/pt-idx.h:104
#39 0x00007ffff6fe5eec in octave::tree_simple_assignment::evaluate(octave::tree_evaluator&, int) (this=0x7fffb82310d0, tw=...) at ../libinterp/parse-tree/pt-assign.cc:101
#40 0x00007ffff6ffda0d in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3863
#41 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb8231110, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#42 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#43 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb8444910, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#44 0x00007ffff6ffeb22 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) (this=0x7fffb800a748, cmd=...) at ../libinterp/parse-tree/pt-eval.cc:4208
#45 0x00007ffff701a364 in octave::tree_unwind_protect_command::accept(octave::tree_walker&) (this=0x7fffb8311710, tw=...) at ../libinterp/parse-tree/pt-except.h:142
#46 0x00007ffff6ffd925 in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3838
#47 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb8230300, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#48 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#49 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb8491a50, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#50 0x00007ffff6ffcb2d in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) (this=0x7fffb800a748, user_function=..., nargout=0, xargs=...) at ../libinterp/parse-tree/pt-eval.cc:3587
#51 0x00007ffff6f13503 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb82768e0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:495
#52 0x00007ffff6f1347c in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb82768e0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:488
#53 0x00007ffff701daf5 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) (this=0x7fffb8232ee0, tw=..., nargout=0) at ../libinterp/parse-tree/pt-idx.cc:427
#54 0x00007ffff702062f in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) (this=0x7fffb8232ee0, tw=..., nargout=0) at ../libinterp/parse-tree/pt-idx.h:104
#55 0x00007ffff6ffda0d in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3863
#56 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb82560a0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#57 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#58 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb82ac2b0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#59 0x00007ffff6ff3054 in octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) (this=0x7fffb800a748, stmt_list=std::shared_ptr<class octave::tree_statement_list> (use count 2, weak count 0) = {...}, interactive=true) at ../libinterp/parse-tree/pt-eval.cc:985
#60 0x00007ffff6ff26ce in octave::tree_evaluator::repl() (this=0x7fffb800a748) at ../libinterp/parse-tree/pt-eval.cc:804
#61 0x00007ffff73cb041 in octave::interpreter::main_loop() (this=0x7fffb800a550) at ../libinterp/corefcn/interpreter.cc:1316
#62 0x00007ffff73c5a56 in octave::interpreter::execute() (this=0x7fffb800a550) at ../libinterp/corefcn/interpreter.cc:882
#63 0x00007ffff7bedff8 in octave::interpreter_qobject::execute() (this=0x70ca70) at ../libgui/src/interpreter-qobject.cc:87
#64 0x00007ffff7cfbb30 in octave::interpreter_qobject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x70ca70, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x8ffcf8) at libgui/src/moc-interpreter-qobject.cc:88
#65 0x00007ffff4ed1a99 in QObject::event(QEvent*) (this=0x70ca70, e=0x8ffcb0) at kernel/qobject.cpp:1314
#66 0x00007ffff5bae423 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x70ca70, e=0x8ffcb0) at kernel/qapplication.cpp:3637
#67 0x00007ffff7c6000d in octave::octave_qapplication::notify(QObject*, QEvent*) (this=0x4a6050, receiver=0x70ca70, ev=0x8ffcb0) at ../libgui/src/octave-qobject.cc:146
#68 0x00007ffff4ea7358 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x70ca70, event=0x8ffcb0) at kernel/qcoreapplication.cpp:1064
#69 0x00007ffff4eaa8b6 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x70de00) at kernel/qcoreapplication.cpp:1821
#70 0x00007ffff4ef8fa7 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x7fffb8012230) at kernel/qeventdispatcher_glib.cpp:277
#71 0x00007fffefb1ae2f in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#72 0x00007fffefb6f508 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#73 0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#74 0x00007ffff4ef8a48 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffb806cd30, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#75 0x00007ffff4ea5d62 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffcb7fd210, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#76 0x00007ffff4ce89ca in QThread::exec() (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#77 0x00007ffff4ce9bf9 in QThreadPrivate::start(void*) (arg=0x70cb00) at thread/qthread_unix.cpp:331
#78 0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#79 0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 6 (Thread 0x7fffcbfff640 (LWP 434681) "gdbus"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x7fffc4017d10, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb1a483 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#3  0x00007fffda61ee1a in gdbus_shared_thread_func.lto_priv () at /lib64/libgio-2.0.so.0
#4  0x00007fffefb49582 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#6  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7fffd8ca6640 (LWP 434680) "dconf worker"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x611b20, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007fffd94b43ed in dconf_gdbus_worker_thread (user_data=0x611a30) at ../gdbus/dconf-gdbus-thread.c:82
#4  0x00007fffefb49582 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#6  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7fffd94a7640 (LWP 434679) "gmain"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x60e3f0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007fffefb18641 in glib_worker_main () at /lib64/libglib-2.0.so.0
#4  0x00007fffefb49582 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#6  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7fffd9cf1640 (LWP 434677) "QDBusConnection"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x7fffcc013550, nfds=4, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff4ef8a48 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffcc000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007ffff4ea5d62 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffd9cf01e0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#5  0x00007ffff4ce89ca in QThread::exec() (this=this@entry=0x7fffdbaab060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007fffdba30b7b in QDBusConnectionManager::run() (this=0x7fffdbaab060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:179
#7  0x00007ffff4ce9bf9 in QThreadPrivate::start(void*) (arg=0x7fffdbaab060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:331
#8  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#9  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7fffdb97c640 (LWP 434647) "QXcbEventQueue"):
#0  0x00007fffefd4296f in __GI___poll (fds=fds@entry=0x7fffdb97b108, nfds=nfds@entry=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefa49f42 in poll (__timeout=-1, __nfds=1, __fds=0x7fffdb97b108) at /usr/include/bits/poll2.h:48
#2  _xcb_conn_wait (c=0x4bd000, vector=0x0, count=0x0, cond=<optimized out>) at /usr/src/debug/libxcb-1.13.1-9.el9.x86_64/src/xcb_conn.c:479
#3  0x00007fffefa4b90c in _xcb_conn_wait (count=0x0, vector=0x0, cond=0x4bd040, c=0x4bd000) at /usr/src/debug/libxcb-1.13.1-9.el9.x86_64/src/xcb_conn.c:445
#4  xcb_wait_for_event (c=0x4bd000) at /usr/src/debug/libxcb-1.13.1-9.el9.x86_64/src/xcb_in.c:697
#5  0x00007fffdbb1a3f7 in QXcbEventQueue::run() (this=0x4ae4d0) at qxcbeventqueue.cpp:228
#6  0x00007ffff4ce9bf9 in QThreadPrivate::start(void*) (arg=0x4ae4d0) at thread/qthread_unix.cpp:331
#7  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#8  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7fffeebef300 (LWP 434591) "lt-octave-gui"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x8bca30, nfds=5, timeout=29857) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff4ef8a48 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5ed7e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007ffff4ea5d62 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffc1c0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#5  0x00007ffff4eae294 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007ffff7c6194c in octave::base_qobject::exec() (this=0x7fffffffc280) at ../libgui/src/octave-qobject.cc:421
#7  0x00007ffff7c76303 in octave::qt_application::execute() (this=0x7fffffffc3d0) at ../libgui/src/qt-application.cc:102
#8  0x0000000000402767 in main(int, char**) (argc=8, argv=0x7fffffffc7d8) at ../src/main-gui.cc:150
(gdb)


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Wed 19 Apr 2023 05:09:37 PM UTC, comment #11: 

replace 'on' with 'off'.  just had it that way so i could see what's happening and make sure there arent any orphaned handles.

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 05:08:06 PM UTC, comment #10: 

saw that.  you're replacing the figure handle with an axes handle i think.

the following test seems to work, based on axes.m:

%!test <*39552> # Check arrow length and scale factor adjustment.
%! hf = figure ("visible", "on");
 unwind_protect
%!   [x,y] = meshgrid (1:2:20);
%!   u = sin (2*pi*x/10);
%!   v = sin (2*pi*y/10);
%!   hax = quiver (x(4,4), y(4,4), u(4,4), v(4,4), 1);
%!   xendpoint = get (get (hax, "children")(3), "xdata")(2);
%!   assert (xendpoint, x(4,4) + u(4,4), eps);
%!   hax = quiver (x(4,4), y(4,4), u(4,4), v(4,4), 0.5);
%!   xendpoint = get (get (hax, "children")(3), "xdata")(2);
%!   assert (xendpoint, x(4,4) + 0.5*u(4,4), eps);
%! unwind_protect_cleanup
%!   close (hf);
%! end_unwind_protect


making a simpler test to check multiple arrow scaling too.

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 04:56:40 PM UTC, comment #9: 

I know it is a wrong code but it crashes octave (that should not happen):


$ cat tcrash.m
h = figure('visible', 'off')
#h = figure()
[x,y] = meshgrid (1:2:20);
u = sin (2*pi*x/10);
v = sin (2*pi*y/10);
quiver (h, x(4,4), y(4,4), u(4,4), v(4,4), 1);


Here is back trace:

h = 1

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcb7fe640 (LWP 431245)]
std::__atomic_base<long>::fetch_add (__m=std::memory_order_seq_cst, __i=1, this=0x8) at /usr/include/c++/11/bits/atomic_base.h:618
618              { return __atomic_fetch_add(&_M_i, __i, int(__m)); }
Missing separate debuginfos, use: dnf debuginfo-install libblkid-2.37.4-10.el9.x86_64 libjpeg-turbo-2.0.90-6.el9.x86_64 libmount-2.37.4-10.el9.x86_64 qt5-qtwebengine-5.15.8-5.el9.next.x86_64
(gdb) thread apply all bt

Thread 9 (Thread 0x7fffcaf94640 (LWP 431246) "QThread"):
#0  0x00007fffefc55b0a in __GI___sigtimedwait (set=set@entry=0x7ffff4669600 <async_signals>, info=info@entry=0x7fffcaf931c0, timeout=timeout@entry=0x0) at ../sysdeps/unix/sysv/linux/sigtimedwait.c:61
#1  0x00007fffefc5514c in __GI___sigwait (set=0x7ffff4669600 <async_signals>, sig=0x7fffcaf93284) at ../sysdeps/unix/sysv/linux/sigwait.c:28
#2  0x00007ffff43b8510 in signal_watcher(void*) (arg=0x7ffff7531585 <octave::generic_sig_handler(int)>) at ../liboctave/wrappers/cxx-signal-helpers.cc:179
#3  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#4  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 8 (Thread 0x7fffcb7fe640 (LWP 431245) "QThread"):
#0  std::__atomic_base<long>::fetch_add(long, std::memory_order) (__m=std::memory_order_seq_cst, __i=1, this=0x8) at /usr/include/c++/11/bits/atomic_base.h:618
#1  std::__atomic_base<long>::operator++(int) (this=0x8) at /usr/include/c++/11/bits/atomic_base.h:369
#2  0x00007ffff7b1e918 in octave::refcount<long>::operator++(int) (this=0x8) at ../liboctave/util/oct-refcount.h:60
#3  0x00007ffff7b7ca2e in octave_value::operator=(octave_value const&) (this=0x7fffb87eb298, a=...) at ../libinterp/octave-value/ov.h:389
#4  0x00007ffff7b8e3d6 in std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m<octave_value const*, octave_value*>(octave_value const*, octave_value const*, octave_value*) (__first=0x7fffb88458f0, __last=0x7fffb88458f8, __result=0x7fffb87eb298) at /usr/include/c++/11/bits/stl_algobase.h:385
#5  0x00007ffff6d7061e in std::__copy_move_a2<false, octave_value const*, octave_value*>(octave_value const*, octave_value const*, octave_value*) (__first=0x7fffb88458e8, __last=0x7fffb88458f8, __result=0x7fffb87eb290) at /usr/include/c++/11/bits/stl_algobase.h:495
#6  0x00007ffff6d6cfef in std::__copy_move_a1<false, octave_value const*, octave_value*>(octave_value const*, octave_value const*, octave_value*) (__first=0x7fffb88458e8, __last=0x7fffb88458f8, __result=0x7fffb87eb290) at /usr/include/c++/11/bits/stl_algobase.h:522
#7  0x00007ffff6e07206 in std::__copy_move_a<false, __gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value*, std::vector<octave_value, std::allocator<octave_value> > > >(__gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value*, std::vector<octave_value, std::allocator<octave_value> > >) (__first={m_rep = 0x7fffb82567a0}, __last={m_rep = 0x35}, __result={m_rep = 0x7fffb82567a0}) at /usr/include/c++/11/bits/stl_algobase.h:529
#8  0x00007ffff6e049bb in std::copy<__gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value*, std::vector<octave_value, std::allocator<octave_value> > > >(__gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value const*, std::vector<octave_value, std::allocator<octave_value> > >, __gnu_cxx::__normal_iterator<octave_value*, std::vector<octave_value, std::allocator<octave_value> > >) (__first={m_rep = 0x7fffb82567a0}, __last={m_rep = 0x35}, __result={m_rep = 0x7fffb82567a0}) at /usr/include/c++/11/bits/stl_algobase.h:620
#9  0x00007ffff6e75deb in octave_value_list::slice(long, long, bool) const (this=0x7fffcb7f97c0, offset=1, len=2, tags=false) at ../libinterp/octave-value/ovl.h:140
#10 0x00007ffff7355e0e in octave::Fset(octave::interpreter&, octave_value_list const&, int) (interp=..., args=..., nargout=0) at ../libinterp/corefcn/graphics.cc:12281
#11 0x00007ffff6ffbf01 in octave::tree_evaluator::execute_builtin_function(octave_builtin&, int, octave_value_list const&) (this=0x7fffb800a748, builtin_function=..., nargout=0, args=...) at ../libinterp/parse-tree/pt-eval.cc:3367
#12 0x00007ffff6e546c3 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb80d96d0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-builtin.cc:49
#13 0x00007ffff6eb7c08 in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb80d96d0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-fcn.cc:57
#14 0x00007ffff701daf5 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) (this=0x7fffb87e2160, tw=..., nargout=0) at ../libinterp/parse-tree/pt-idx.cc:427
#15 0x00007ffff702062f in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) (this=0x7fffb87e2160, tw=..., nargout=0) at ../libinterp/parse-tree/pt-idx.h:104
#16 0x00007ffff6ffda0d in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3863
#17 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb87e23b0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#18 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#19 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb87e23f0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#20 0x00007ffff6ffd3ac in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3711
#21 0x00007ffff7007778 in octave::tree_if_command_list::accept(octave::tree_walker&) (this=0x7fffb87e2500, tw=...) at ../libinterp/parse-tree/pt-select.h:111
#22 0x00007ffff6ffd1f5 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) (this=0x7fffb800a748, cmd=...) at ../libinterp/parse-tree/pt-eval.cc:3689
#23 0x00007ffff7029022 in octave::tree_if_command::accept(octave::tree_walker&) (this=0x7fffb87e2530, tw=...) at ../libinterp/parse-tree/pt-select.h:141
--Type <RET> for more, q to quit, c to continue without paging--c
#24 0x00007ffff6ffd925 in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3838
#25 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb87e2570, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#26 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#27 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb8798250, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#28 0x00007ffff6ffeb22 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) (this=0x7fffb800a748, cmd=...) at ../libinterp/parse-tree/pt-eval.cc:4208
#29 0x00007ffff701a364 in octave::tree_unwind_protect_command::accept(octave::tree_walker&) (this=0x7fffb87e2fd0, tw=...) at ../libinterp/parse-tree/pt-except.h:142
#30 0x00007ffff6ffd925 in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3838
#31 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb87e3020, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#32 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#33 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb85e8f30, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#34 0x00007ffff6ffcb2d in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) (this=0x7fffb800a748, user_function=..., nargout=1, xargs=...) at ../libinterp/parse-tree/pt-eval.cc:3587
#35 0x00007ffff6f13503 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb87e3200, tw=..., nargout=1, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:495
#36 0x00007ffff6f1347c in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb87e3200, tw=..., nargout=1, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:488
#37 0x00007ffff701daf5 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) (this=0x7fffb85f7700, tw=..., nargout=1) at ../libinterp/parse-tree/pt-idx.cc:427
#38 0x00007ffff702062f in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) (this=0x7fffb85f7700, tw=..., nargout=1) at ../libinterp/parse-tree/pt-idx.h:104
#39 0x00007ffff6fe5eec in octave::tree_simple_assignment::evaluate(octave::tree_evaluator&, int) (this=0x7fffb85db4d0, tw=...) at ../libinterp/parse-tree/pt-assign.cc:101
#40 0x00007ffff6ffda0d in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3863
#41 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb85db370, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#42 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#43 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb85b33e0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#44 0x00007ffff6ffeb22 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) (this=0x7fffb800a748, cmd=...) at ../libinterp/parse-tree/pt-eval.cc:4208
#45 0x00007ffff701a364 in octave::tree_unwind_protect_command::accept(octave::tree_walker&) (this=0x7fffb85cb950, tw=...) at ../libinterp/parse-tree/pt-except.h:142
#46 0x00007ffff6ffd925 in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3838
#47 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb85d3cf0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#48 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#49 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb85f2d20, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#50 0x00007ffff6ffcb2d in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) (this=0x7fffb800a748, user_function=..., nargout=0, xargs=...) at ../libinterp/parse-tree/pt-eval.cc:3587
#51 0x00007ffff6f13503 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb85f3e00, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:495
#52 0x00007ffff6f1347c in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb85f3e00, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:488
#53 0x00007ffff701daf5 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) (this=0x7fffb82a1140, tw=..., nargout=0) at ../libinterp/parse-tree/pt-idx.cc:427
#54 0x00007ffff702062f in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) (this=0x7fffb82a1140, tw=..., nargout=0) at ../libinterp/parse-tree/pt-idx.h:104
#55 0x00007ffff6ffda0d in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3863
#56 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb82a1280, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#57 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#58 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb848aca0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#59 0x00007ffff6ffc29c in octave::tree_evaluator::execute_user_script(octave_user_script&, int, octave_value_list const&) (this=0x7fffb800a748, user_script=..., nargout=0, args=...) at ../libinterp/parse-tree/pt-eval.cc:3441
#60 0x00007ffff6f11d91 in octave_user_script::execute(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb8248cc0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:196
#61 0x00007ffff6f11d24 in octave_user_script::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffb8248cc0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-usr-fcn.cc:189
#62 0x00007ffff701b2a9 in octave::tree_identifier::evaluate_n(octave::tree_evaluator&, int) (this=0x7fffb8458940, tw=..., nargout=0) at ../libinterp/parse-tree/pt-id.cc:129
#63 0x00007ffff701bb5f in octave::tree_identifier::evaluate(octave::tree_evaluator&, int) (this=0x7fffb8458940, tw=..., nargout=0) at ../libinterp/parse-tree/pt-id.h:94
#64 0x00007ffff6ffda0d in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7fffb800a748, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3863
#65 0x00007ffff702a3da in octave::tree_statement::accept(octave::tree_walker&) (this=0x7fffb8477640, tw=...) at ../libinterp/parse-tree/pt-stmt.h:120
#66 0x00007ffff6ffdee7 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7fffb800a748, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3948
#67 0x00007ffff6e042a8 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7fffb8237cf0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:193
#68 0x00007ffff6ff3054 in octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) (this=0x7fffb800a748, stmt_list=std::shared_ptr<class octave::tree_statement_list> (use count 2, weak count 0) = {...}, interactive=true) at ../libinterp/parse-tree/pt-eval.cc:985
#69 0x00007ffff6ff26ce in octave::tree_evaluator::repl() (this=0x7fffb800a748) at ../libinterp/parse-tree/pt-eval.cc:804
#70 0x00007ffff73cb041 in octave::interpreter::main_loop() (this=0x7fffb800a550) at ../libinterp/corefcn/interpreter.cc:1316
#71 0x00007ffff73c5a56 in octave::interpreter::execute() (this=0x7fffb800a550) at ../libinterp/corefcn/interpreter.cc:882
#72 0x00007ffff7bedff8 in octave::interpreter_qobject::execute() (this=0x6dc240) at ../libgui/src/interpreter-qobject.cc:87
#73 0x00007ffff7cfbb30 in octave::interpreter_qobject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x6dc240, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x996e08) at libgui/src/moc-interpreter-qobject.cc:88
#74 0x00007ffff4ed1a99 in QObject::event(QEvent*) (this=0x6dc240, e=0x996dc0) at kernel/qobject.cpp:1314
#75 0x00007ffff5bae423 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x6dc240, e=0x996dc0) at kernel/qapplication.cpp:3637
#76 0x00007ffff7c6000d in octave::octave_qapplication::notify(QObject*, QEvent*) (this=0x4a6050, receiver=0x6dc240, ev=0x996dc0) at ../libgui/src/octave-qobject.cc:146
#77 0x00007ffff4ea7358 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x6dc240, event=0x996dc0) at kernel/qcoreapplication.cpp:1064
#78 0x00007ffff4eaa8b6 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x716950) at kernel/qcoreapplication.cpp:1821
#79 0x00007ffff4ef8fa7 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x7fffb8012230) at kernel/qeventdispatcher_glib.cpp:277
#80 0x00007fffefb1ae2f in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#81 0x00007fffefb6f508 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#82 0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#83 0x00007ffff4ef8a48 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffb806cd30, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#84 0x00007ffff4ea5d62 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffcb7fd210, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#85 0x00007ffff4ce89ca in QThread::exec() (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#86 0x00007ffff4ce9bf9 in QThreadPrivate::start(void*) (arg=0x716ad0) at thread/qthread_unix.cpp:331
#87 0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#88 0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 6 (Thread 0x7fffcbfff640 (LWP 431239) "gdbus"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x7fffc4017d10, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb1a483 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#3  0x00007fffda61ee1a in gdbus_shared_thread_func.lto_priv () at /lib64/libgio-2.0.so.0
#4  0x00007fffefb49582 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#6  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7fffd8ca6640 (LWP 431238) "dconf worker"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x610940, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007fffd94b43ed in dconf_gdbus_worker_thread (user_data=0x610850) at ../gdbus/dconf-gdbus-thread.c:82
#4  0x00007fffefb49582 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#6  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7fffd94a7640 (LWP 431237) "gmain"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x60d210, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007fffefb18641 in glib_worker_main () at /lib64/libglib-2.0.so.0
#4  0x00007fffefb49582 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#6  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7fffd9cf1640 (LWP 431232) "QDBusConnection"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x7fffcc013610, nfds=4, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff4ef8a48 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffcc000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007ffff4ea5d62 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffd9cf01e0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#5  0x00007ffff4ce89ca in QThread::exec() (this=this@entry=0x7fffdbaab060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007fffdba30b7b in QDBusConnectionManager::run() (this=0x7fffdbaab060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:179
#7  0x00007ffff4ce9bf9 in QThreadPrivate::start(void*) (arg=0x7fffdbaab060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:331
#8  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#9  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7fffdb97c640 (LWP 431215) "QXcbEventQueue"):
#0  0x00007fffefd4296f in __GI___poll (fds=fds@entry=0x7fffdb97b108, nfds=nfds@entry=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefa49f42 in poll (__timeout=-1, __nfds=1, __fds=0x7fffdb97b108) at /usr/include/bits/poll2.h:48
#2  _xcb_conn_wait (c=0x4bd000, vector=0x0, count=0x0, cond=<optimized out>) at /usr/src/debug/libxcb-1.13.1-9.el9.x86_64/src/xcb_conn.c:479
#3  0x00007fffefa4b90c in _xcb_conn_wait (count=0x0, vector=0x0, cond=0x4bd040, c=0x4bd000) at /usr/src/debug/libxcb-1.13.1-9.el9.x86_64/src/xcb_conn.c:445
#4  xcb_wait_for_event (c=0x4bd000) at /usr/src/debug/libxcb-1.13.1-9.el9.x86_64/src/xcb_in.c:697
#5  0x00007fffdbb1a3f7 in QXcbEventQueue::run() (this=0x4ae4d0) at qxcbeventqueue.cpp:228
#6  0x00007ffff4ce9bf9 in QThreadPrivate::start(void*) (arg=0x4ae4d0) at thread/qthread_unix.cpp:331
#7  0x00007fffefc9f832 in start_thread (arg=<optimized out>) at pthread_create.c:443
#8  0x00007fffefc3f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7fffeebef300 (LWP 431135) "lt-octave-gui"):
#0  0x00007fffefd4296f in __GI___poll (fds=0x8ba8e0, nfds=5, timeout=6851) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffefb6f49c in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#2  0x00007fffefb185f3 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff4ef8a48 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5ed610, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007ffff4ea5d62 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffc190, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#5  0x00007ffff4eae294 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007ffff7c6194c in octave::base_qobject::exec() (this=0x7fffffffc250) at ../libgui/src/octave-qobject.cc:421
#7  0x00007ffff7c76303 in octave::qt_application::execute() (this=0x7fffffffc3a0) at ../libgui/src/qt-application.cc:102
#8  0x0000000000402767 in main(int, char**) (argc=8, argv=0x7fffffffc7a8) at ../src/main-gui.cc:150
(gdb)

$ hg id
29671873411a tip @


Loooks ok with 8.2.1:

octave:1> tcrash
h = 1
error: set: invalid number of arguments
error: called from
    __quiver__ at line 335 column 10
    quiver at line 92 column 10
    tcrash at line 6 column 1
octave:2> version -hgid
ans = 1824e0ee4088
octave:3>




Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Wed 19 Apr 2023 04:44:18 PM UTC, comment #8: 


> but i have to remember how we decided to best silence plots in BISTs.


You could probably use the same logic as in one of the tests in `light.m`.

Markus Mützel <mmuetzel>
Group administrator
Wed 19 Apr 2023 04:12:20 PM UTC, comment #7: 

ok, plan to add the following BIST:


%!test <*39552>
%! [x,y] = meshgrid (1:2:20);
%! u = sin (2*pi*x/10);
%! v = sin (2*pi*y/10);
%! ## Single arrow, check arrow length and scale factor adjustment
%! h = quiver (x(4,4), y(4,4), u(4,4), v(4,4), 1);
%! axis ([0, 20, 0, 20]);
%! xendpoint1 = get (get (h, "children")(3), "xdata")(2);
%! assert (xendpoint1, x(4,4) + u(4,4), eps);
%! h = quiver (x(4,4), y(4,4), u(4,4), v(4,4), 0.5);
%! axis ([0, 20, 0, 20]);
%! xendpoint2 = get (get (h, "children")(3), "xdata")(2);
%! assert (xendpoint2, x(4,4) + 0.5*u(4,4), eps);

this passes, but i have to remember how we decided to best silence plots in BISTs.


Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 03:47:24 PM UTC, comment #6: 

ok, it looks like the handle children 2 and 3 have different xdata and ydata that might be able to be checked if I can determine what the correct values should be.  child 2 seems to be the arrow head (two line segments, 3 points), child three the arrow body (one segment 2 points).  in child 3 the second point is the one adjusted by scaling.

will try to come up with something for this case. are things like child handle ordering generally consistent?

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 03:31:07 PM UTC, comment #5: 

Yes it would. generally has been troublesome for plot functions that only output a handle.

in this case, i'm not sure what I'd check to verify. the main handles returned look unchanged before and after the patch. checking children handles now.

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 03:05:55 PM UTC, comment #4: 

Would it make sense to add a BIST for that to make sure that it doesn't inadvertently regress in a future change?

Markus Mützel <mmuetzel>
Group administrator
Wed 19 Apr 2023 02:49:13 PM UTC, comment #3: 

(demos appear unaffected by the change)

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Apr 2023 02:39:18 PM UTC, comment #2: 

this behavior is still present in 8.2.0 using mike's comment #1 test case. (single arrow size unchanged despite setting scaling factors of 1.0 and 0.5). 

Code base has changed since 2013 I believe moving the comment #0 suggestion to line 152.  changing


if (len > 0 && autoscale && numel (u) > 1)


to


if (len > 0 && autoscale && numel (u) >= 1)


seems to fix the single quiver problem.

I can't find any other problem cases that this would trigger (where num vectors = 1 but it needs to skip the autoscale code for some reason) and quiver has no BISTs for checking that way.

Since I can't really test it well, and it's a really low priority issue that i doubt has high demand for faster rollout, pushed this simple bugfix to default as
https://hg.savannah.gnu.org/hgweb/octave/rev/29671873411a

Marking as Ready for Test.

Nicholas Jankowski <nrjank>
Group Member
Wed 16 Nov 2016 10:00:13 PM UTC, comment #1: 

Confirmed here, still present with the development version of Octave (4.3.0+) on Debian.

Here is a simple example showing that the arrow scaling factor does not work, and in fact the scale of a single arrow is blown out of proportion compared to how it is computed with a full field of arrows.

Derived from the demo of quiver:


[x,y] = meshgrid (1:2:20);
u = sin (2*pi*x/10); v = sin (2*pi*y/10);
quiver (x, y, u, v, 1); axis ([0, 20, 0, 20]);
quiver (x, y, u, v, .5); axis ([0, 20, 0, 20]);
## At this point, the scale factor works

subs = 3:7;
quiver (x(subs,subs), y(subs,subs), u(subs,subs), v(subs,subs), 1); axis ([0, 20, 0, 20]);
quiver (x(subs,subs), y(subs,subs), u(subs,subs), v(subs,subs), .5); axis ([0, 20, 0, 20]);
## Scaling still works for a subset of the original 100 arrows

subs = 4;
quiver (x(subs,subs), y(subs,subs), u(subs,subs), v(subs,subs), 1); axis ([0, 20, 0, 20]);
quiver (x(subs,subs), y(subs,subs), u(subs,subs), v(subs,subs), .5); axis ([0, 20, 0, 20]);
## Scaling now has no effect



Mike Miller <mtmiller>
Group Member
Mon 22 Jul 2013 07:34:49 PM UTC, original submission:  

The functions quiver and quiver3 take an optional scaling value "to use for the arrows of the field relative to the mesh spacing." However, if only one point is passed to quiver (or quiver3), this scaling factor is ignored. The bug is in /usr/local/share/octave/3.6.4/m/plot/private/__quiver__.m on line 108, where changing > to >= fixes the problem.

I am testing on OS X (octave installed with brew) and gnuplot plotting, but I think those are irrelevant for this bug.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28644:  __quiver__.m added by None (13KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by mtmiller (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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-08-09 nrjank StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 9.1.0
        Planned ReleaseNone 9.1.0
    2023-04-19 nrjank Carbon-Copy- Added rik5
    2023-04-19 nrjank StatusConfirmed Ready For Test
    2016-11-16 mtmiller Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNone Confirmed
        Release3.6.4 dev
        Operating SystemMac OS Any
    2013-07-22 None Attached File- Added _quiver_.m, #28644

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code