bugGNU Octave - Bugs: bug #61627, [octave forge] (statistics):...

 
 

bug #61627: [octave forge] (statistics): dendrogram test displays figure window even with visibility off

Submitted by:  Nicholas Jankowski <nrjank>
Submitted on:  Mon 06 Dec 2021 02:53:20 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Nicholas Jankowski Open/Closed:  Closed
Release:  other Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Fri 14 Jan 2022 09:52:40 PM UTC, comment #7: 

I could check that no figure pops up during tests anymore.

Closing report as fixed.

Pantxo Diribarne <pantxo>
Project Member
Wed 08 Dec 2021 06:08:51 PM UTC, comment #6: 

i pushed the following change
https://sourceforge.net/p/octave/statistics/ci/c95d345becf9d53c98df587ccc51fce6ad1302cb/

switching line 236 from hd = figure (gcf); --> hd = gcf (); as suggested in comment #5.   verified that all tests still pass, no figs pop up, and all demos still work. 

Marking Ready for Test.

Nicholas Jankowski <nrjank>
Project Member
Tue 07 Dec 2021 04:18:59 PM UTC, comment #5: 

The problem is the following construct in dendrogram:

set (0, "defaultfigurevisible", "off");
hf = figure (gcf);

Here `gcf` returns a handle to an invisible figure that is passed to the `figure` function. The latter operation makes the figure visible and gives it keyboard focus, this is the expected behavior.

Replacing `hd = figure (gcf)` by `hd = gcf ()` should do the trick.

Pantxo Diribarne <pantxo>
Project Member
Mon 06 Dec 2021 11:24:20 PM UTC, comment #4: 

on my windows system the fig window appears every time i run the tests. it only comes up with the one in the separate test block mentioned below, not any of the other tests.  if i comment out that test, none of the others create a figure window.

Nicholas Jankowski <nrjank>
Project Member
Mon 06 Dec 2021 07:16:49 PM UTC, comment #3: 

Actually, for me with Octave 6.2.0, Linux, and qt graphics, `test dendrogram' does brings up a window, but only the first time I run it in a session, not subsequent times. I don't know why that is.

Nir Krakauer <nir_krakauer>
Mon 06 Dec 2021 05:45:21 PM UTC, comment #2: 

for me in windows ( 7.0.1 (hg id: bbf1293bd255)), it does, but only with the qt toolkit. if i switch to fltk or gnuplot, i don't get the plot window. if i switch back to qt, i do.

Nicholas Jankowski <nrjank>
Project Member
Mon 06 Dec 2021 03:52:18 PM UTC, comment #1: 

For me in Linux, `test dendrogram' doesn't open any plot window.

Nir Krakauer <nir_krakauer>
Mon 06 Dec 2021 02:53:20 PM UTC, original submission:  

noticed in the recent statistics package release (1.4.3) that when running the test suite dendrogram flashes a figure window.  this was suppressed in other functions by capturing the DefaultFigureVisible setting, turning it off before the test, then restoring the original value after the test. the following test, however, displays despite this being done:

##%!test
%! set (0, "DefaultFigureVisible", "off");
%! fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*")
%! set (0, "DefaultFigureVisible", visibility_setting);

is it something about the Orientation setting call that causes the figure window to popup? Is there a better way to suppress figure display during tests?

Nicholas Jankowski <nrjank>
Project Member

 

(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 pantxo (Posted a comment)
  • -email is unavailable- added by nir_krakauer (Posted a comment)
  • -email is unavailable- added by nrjank (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-14 pantxo StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2021-12-08 nrjank StatusNone => Ready For Test
        Release6.4.0 => other
        Operating SystemMicrosoft Windows => Any

    Back to the top


    Powered by Savane 3.7