bugGNU Octave - Bugs: bug #65030, Column width in browser pane not...

 
 

bug #65030: Column width in browser pane not retained between restarts of Octave

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Wed 13 Dec 2023 08:11:52 PM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  3 - Low Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  10.1.0 (current default)
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 03 May 2024 05:39:17 PM UTC, comment #36: 

Maybe related: By chance I just tried to call _event_manager_show_preferences_ from the CLI in order to test something different and realized that nothing happened. Other widgets work fine when opened from Octave CLI.

Torsten Lilge <ttl>
Group Member
Fri 03 May 2024 03:17:30 PM UTC, comment #35: 

BTW, when running the test suite in Windows (AFAICS not on Linux) the column widths still get reset; it happens in debug.cc-tst. Perusing that file I see something like ' __event_manager_gui_preference__ ()' , could that explain something?
If yes, that doesn't look like a command that should be used by ordinary users.
Note that for Windows, Octave-10.0.0 is built with Qt5 due to Octave refusing to start when crossbuilt w. Qt6. I think I posted about that on Discourse. On Linux (Mageia-9) Octave runs with Qt5 as well, I'll try on Fedora-39 later (built w Qt6 there).

So all in all it isn't completely fixed yet, but I find it quite acceptable at this point.


Philip Nienhuis <philipnienhuis>
Group Member
Fri 03 May 2024 01:55:14 PM UTC, comment #34: 

As of cset http://hg.savannah.gnu.org/hgweb/octave/rev/1d0365c531a1 also columns in the workspace pane keep their widths, both on Linux and Windows.

Thank you very much Torsten for the fix.

Closing report.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 01 May 2024 08:46:08 PM UTC, comment #33: 

On Linux, column width in the file browser Octave is now immune to clicking the OK button in Preferences.
Crossbuilding for Windows will be an overnight job, tomorrow morning I'll report back about Windows.
But I think that it actually isn't required, I fully trust that it works fine now.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 01 May 2024 08:16:05 PM UTC, comment #32: 

The patch should work with all Qt versions.

Torsten Lilge <ttl>
Group Member
Wed 01 May 2024 07:26:16 PM UTC, comment #31: 

Thx I'll try the fix.
Is it dependent on the Qt version?

Philip Nienhuis <philipnienhuis>
Group Member
Wed 01 May 2024 07:06:14 PM UTC, comment #30: 

With cset http://hg.savannah.gnu.org/hgweb/octave/rev/0f2257136d9c I reorganized how the visibility of the columns are stored in the settings file. Previously they were stored in addition to the header state, which also includes the visibility of each column. Maybe there were some interference. In addition, the header state is saved before updating other settings and restored afterwards.

Hopefully, this fixes the remaining issue that you are seeing. If yes, I would update the workspace view accordingly.

Torsten Lilge <ttl>
Group Member
Mon 29 Apr 2024 07:25:29 PM UTC, comment #29: 


> I guess, the columns are also reset when clicking the button "Apply" of the dialog but not when canceling the dialog?

Correct

Philip Nienhuis <philipnienhuis>
Group Member
Mon 29 Apr 2024 06:10:16 PM UTC, comment #28: 

I guess, the columns are also reset when clicking the button "Apply" of the dialog but not when canceling the dialog?

Torsten Lilge <ttl>
Group Member
Mon 29 Apr 2024 02:18:48 PM UTC, comment #27: 

Reproducible on Windows as well

Philip Nienhuis <philipnienhuis>
Group Member
Mon 29 Apr 2024 02:07:30 PM UTC, comment #26: 

Reopening, at least for dev Octave.

Column widths reliably get reset each time I open the Preferences pane (edit | Preferences) and then click the OK button. I can see it happen.
For now reproducible on Linux, I'll test later on Windows.

Somehow, somewhere the user-set column widths get reset; apparently somewhere while setting up & displaying the GUI and/or (re-)applying settings. Hopefully this observation helps finding out the mechanism.

@ttl:
You wrote in comment #20 that you were not optimistic - well, you were right and we knew that.
Although for most situations this bug looked to be sufficiently fixed, a better solution is still needed. I suggest we'll leave this open with a low priority & low severity, OK?

status => In progress

Philip Nienhuis <philipnienhuis>
Group Member
Sun 14 Apr 2024 07:41:06 PM UTC, comment #25: 

Sorry Torsten I missed your latest post.

The column width is reset to pristine state.
But I can say that for most situations other than the test suite this bug is fixed.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 20 Mar 2024 09:51:29 PM UTC, comment #24: 

A reset of the column state while octave is running is weird as the restoreState() is only called in the constructor of the table view. This must have another cause, I assume. Is it reset to a random state or exactly to the one after the very first start of octave without already existing settings file.

Torsten Lilge <ttl>
Group Member
Wed 20 Mar 2024 07:37:04 AM UTC, comment #23: 

Thanks Torsten.
It works much better now.
It's one of those tiny cosmetic things that is easily overcome for us contributors and developers but that still might help to erode faith in Octave for ordinary users.

Yet it isn't completely fixed. During a __run_test_suite__ on my Windows box run I noted that somewhere during the 19000 or so tests the column widths got reset again. Heisenbug or nasal daemons come to mind :-)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 18 Mar 2024 07:51:21 PM UTC, comment #22: 

I have pushed cset http://hg.savannah.gnu.org/hgweb/octave/rev/bd8a946093d7 which should fix the issue for the file browser and the workspace view. The variable editor does not use restoreState (). Changing status to ready for test.

Torsten Lilge <ttl>
Group Member
Sun 17 Mar 2024 08:28:52 PM UTC, comment #21: 

@Torsten:
As far as the file browser goes your patch from comment #20 does fix the bug :-)
It should also be applied to the workspace widget (maybe also the variable editor? but I've never checked if column widths are reset there)

Philip Nienhuis <philipnienhuis>
Group Member
Sat 16 Mar 2024 08:22:31 AM UTC, comment #20: 

After a look into the documentation I would say that there is no change in functionality. The only hint I found in the internet so far is that restoreState() might not fully restore the header's state if called from the constructor, i.e., when the header might not be fully ready, see https://www.qtcentre.org/threads/26675-QTableView-saving-restoring-columns-widths . Maybe this only shows up for us in Qt 6.6.x for some timing reasons.

I have attached a patch with the provided solution although I am not very optimistic that this really is the solution.

(file #55845)

Torsten Lilge <ttl>
Group Member
Fri 15 Mar 2024 08:58:18 AM UTC, comment #19: 

Thanks.
I think we knew it was related to Qt -> 6.6.x

In mxe-octave, Qt is at 6.6.0 since 5 months ago and I've been seeing this issue since somewhere late last fall.

Next question: is it an upstream bug or an upstream change in functionality as of Qt 6.6.x?

Philip Nienhuis <philipnienhuis>
Group Member
Fri 15 Mar 2024 04:07:20 AM UTC, comment #18: 

Downgraded Qt6 on Fedora 6.6.2 --> 6.5.2
Rebuild octave.
Cannot reproduce the bug.
Upgraded Qt6 back to 6.6.2 -- bug is there.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 15 Mar 2024 03:48:07 AM UTC, comment #17: 

I confirm on Fedora 39 (Qt6.6.2). I cannot reproduce on Centos Stream 9 (Qt6.5.2).

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Thu 14 Mar 2024 04:23:56 PM UTC, comment #16: 

These days I see the reported behavior (not remembering column widths) also on Linux (Fedora 39).

Changing 'Operating System' accordingly.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 08 Mar 2024 05:47:24 AM UTC, comment #15: 

The connection messages are referring to QSciAPI, which is the QScintilla class handling the auto-completion.

Torsten Lilge <ttl>
Group Member
Thu 07 Mar 2024 09:49:32 PM UTC, comment #14: 

Autocompletion works fine.

Am I right that the number of "qt.core.qoject.connect ... signal not found" messages is twice the number of GUI panes?

AFAICS everyting in the GUI is working fine (w. Qt6), it's only the pane column widths that aren't retained (not only in file browser but also in workspace pane).

Philip Nienhuis <philipnienhuis>
Group Member
Thu 07 Mar 2024 08:55:08 PM UTC, comment #13: 

Thanks for testing. Unfortunately no new information for this bug.

The many shortcuts missing in the settings file are okay, they are only written to the settings file if the default keys were changed. What might be more problematic are the "signal not found" messages (which I do not get under Linux). Is the auto completion in the editor working as expected?

Torsten Lilge <ttl>
Group Member
Thu 07 Mar 2024 06:56:10 PM UTC, comment #12: 

Thanks for the hint.
That setting (entered in octave.vbs, I wouldn't know another way) gives loads of repeated messages about various keys not found in settings:

Key:  "editor_file:close_all"  not found in settings
Key:  "editor_file:close_other"  not found in settings
:
:
Key:  "main_news:release_notes"  not found in settings
Key:  "main_news:community_news"  not found in settings
GNU Octave, version 10.0.0
Copyright (C) 1993-2024 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-w64-mingw32".

Home page:            https://octave.org
Support resources:    https://octave.org/support
Improve Octave:       https://octave.org/get-involved

For changes from previous versions, type 'news'.

Key:  "main_file:new_figure"  not found in settings
Key:  "main_file:load_workspace"  not found in settings
:
:
Key:  "main_news:community_news"  not found in settings
Processing <HOME>/.octaverc
Key:  "main_file:new_figure"  not found in settings
Key:  "main_file:load_workspace"  not found in settings
:
:
Key:  "main_news:release_notes"  not found in settings
Key:  "main_news:community_news"  not found in settings
linear-algebra load time = 0.296875
windows load time = 0.562500
signal load time = 0.578125
io load time = 2.484375
mapping load time = 0.375000

Processing <HOME>/.octaverc complete
Total .octaverc processing time = 4.453125

>> qt.core.qobject.connect: QObject::disconnect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::connect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::disconnect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::connect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::disconnect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::connect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::disconnect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::connect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::disconnect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::connect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::disconnect: signal not found in QsciAPIs
qt.core.qobject.connect: QObject::connect: signal not found in QsciAPIs
Key:  "main_file:new_figure"  not found in settings
Key:  "main_file:load_workspace"  not found in settings
:
:
<followed by several hundreds of repeated missing key settings complaints.>
:

But AFAICS nothing special w.r.t. the file browser.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 06 Mar 2024 08:24:36 PM UTC, comment #11: 

Unfortunately not. This is one of those bugs were the code seems okay (and works on other platforms) but does not give the expected result.

Maybe there are some message pointing into the right directions when you start octave with the environment variable OCTAVE_SHOW_GUI_MESSAGES=1


Torsten Lilge <ttl>
Group Member
Tue 05 Mar 2024 10:12:28 PM UTC, comment #10: 

Any update on this bug?

Philip Nienhuis <philipnienhuis>
Group Member
Sun 04 Feb 2024 04:11:25 PM UTC, comment #9: 

With the patch I get this:


Files dock widget restoring header: 1

GNU Octave, version 10.0.0
Copyright (C) 1993-2024 The Octave Project Developers.
This is free software; see the source code for copying conditions.
:


Philip Nienhuis <philipnienhuis>
Group Member
Sun 04 Feb 2024 01:32:07 PM UTC, comment #8: 

My impression is that the column widths are properly written to file, even read upon restart, but then ignored. But we'll see what your patch shows. It'll try today.

Sort order in the sense of a->z or a<-z, and column order (shifting around column headers) changes are properly retained.

Philip Nienhuis <philipnienhuis>
Group Member
Sun 04 Feb 2024 10:09:57 AM UTC, comment #7: 

Thanks for testing. The column widths are changing on my system at restart when copying your data changes into my ini file. Therefore. the data is okay and definitely reflect changes in column widths. Could you please try the attached patch next time you make a build? With this patch, there is a line in the terminal widget before the welcome message. This line prints out the result of restoring the header state (-1: related key in the settings not found, 0: error while restoring, 1: okay).

There might be a misunderstanding regarding the second item as the sort column and order that you describe are the default ones. When you change the sort order and/or the column, are these changes retained after a restart of octave?

(file #55665)

Torsten Lilge <ttl>
Group Member
Sat 03 Feb 2024 08:02:23 PM UTC, comment #6: 
  • Is the column width in the workspace view restoring the last column width?


No, in the works space column widhts are also reset (good hint, Torsten)

  • Are sort column and sort order preserved in the file browser?


Both column sort and sort order (alphabetically, first subdirs, then filenames, a->z) are retained.

  • Does the line "column_state" in section "[filesdockwidget]" in the settings file change after changing the column with and exiting octave?


Yes these change but the changes seem to be ignored. I copy the relevant lines below, one after a few Octave restarts w/o changing GUI layout, the second one after adapting column width in the file browser pane

column_state=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x4\x6\0\0\0\x2\0\0\0\x1\0\0\0}\0\0\0\x2\0\0\0}\0\0\x1o\0\0\0\x4\x1\x1\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x1\v\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0}\0\0\0\0)

column_state=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x4\x6\0\0\0\x2\0\0\0\x1\0\0\0}\0\0\0\x2\0\0\0}\0\0\x1\x81\0\0\0\x4\x1\x1\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\x1\x4\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0}\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0}\0\0\0\0)



Philip Nienhuis <philipnienhuis>
Group Member
Sat 03 Feb 2024 02:43:10 PM UTC, comment #5: 

I have no windows system for testing available. therefore some questions:

  • Is the column width in the workspace view restoring the last column width?
  • Are sort column and sort order preserved in the file browser?
  • Does the line "column_state" in section "[filesdockwidget]" in the settings file change after changing the column with and exiting octave?


Torsten Lilge <ttl>
Group Member
Sat 03 Feb 2024 12:27:42 AM UTC, comment #4: 

on a fairly recent windows stable build (9.0.1 (hg id: 9034521f154f))  The file browser behaves like shown in the image attached to comment #0. column sizing is not retained after restarting octave

Nicholas Jankowski <nrjank>
Group Member
Fri 02 Feb 2024 10:43:03 PM UTC, comment #3: 

Indeed on Linux there's no issue.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 18 Dec 2023 12:23:45 AM UTC, comment #2: 

I tried to reproduce on Linux, which I run, but the GUI behaves correctly.  Someone with MS Windows will have to check.

Rik <rik5>
Group administrator
Wed 13 Dec 2023 08:14:09 PM UTC, comment #1: 

FTR, in the last dev Octave I made (9.0.0, crossbuilt Nov. 18) this was still working fine.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 13 Dec 2023 08:11:52 PM UTC, original submission:  

See attached pic.
Upper = after starting dev Octave
Lower = after reshifting the column separator line to the right, in vain, as after a restarting Octave the browser pane again looks like the upper pic.

Regression as it used to work fine. But admittedly this is just a cosmetical regression.

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #55845:  bug65030_test_02.patch added by ttl (2KiB - text/x-patch)
file #55665:  bug65030_test_01.patch added by ttl (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2024-05-03 philipnienhuis StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2024-05-01 ttl StatusIn Progress Ready For Test
    2024-04-29 philipnienhuis Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusFixed In Progress
        Open/ClosedClosed Open
        Releasestable dev
    2024-04-16 ttl StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2024-03-18 ttl StatusConfirmed Ready For Test
    2024-03-16 ttl Attached File- Added bug65030_test_02.patch, #55845
    2024-03-14 philipnienhuis Operating SystemMicrosoft Windows Any
    2024-02-04 ttl Attached File- Added bug65030_test_01.patch, #55665
    2024-02-03 rik5 Carbon-CopyRemoved 72865 -
    2024-02-03 nrjank Releasedev stable
    2024-02-03 nrjank StatusNone Confirmed
    2023-12-18 philipnienhuis Carbon-Copy- Added ttl
    2023-12-13 rik5 SummaryColumn width in browser pane not retianed between restarts of Octave Column width in browser pane not retained between restarts of Octave
    2023-12-13 philipnienhuis Attached File- Added Octave10_filebrowser_colwidth_reset.png, #55449

    Back to the top

    Powered by Savane 3.13-3e34.
    Corresponding source code