mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.39k stars 1.26k forks source link

Tracks column widths reset all the time, on restart and change of view [Mixxx 2.4] #12845

Open laex333 opened 6 months ago

laex333 commented 6 months ago

Bug Description

[ There is a post about a similar issue with Mixxx 2.5, but this issue has been around for a while, and IMHO should be fixed in 2.4 ASAP...: #12514 ]

Bug Description

Apparently the widths of (at least some) columns in track view, AutoDJ, playlists, cradles and history do never stay how/where I put them. Not only do they get reset when I close/reopen Mixxx, even switching from one view to another destroys the width settings…

(Arrangement/order and visibility of columns stay as they should!)

After testing this a lot: It seems that mainly the duration, bitrate, year, playlist-position/order, preview-listen and play count (sorry, don't know the English column names) are the problem, and they seem to have a minimum width and are reset to this minimum when set slimmer (which I kinda need to do to save screen estate on a relatively small laptop).

(A funny example that doesn't concern me: The 5-star-rating column apparently has a minimum width of three stars...!?)

I tested this on LInux Mint 20 and 21, both with 2.3.6 and now 2.4 with pretty much the same behaviour/results…

Example

Mixxx 2.4 opened fresh: a playlist view: grafik

... configured the way I like it: grafik

... just clicked once on main track view, and right back to the playlist, result: grafik

Version

2.3.6 and 2.4

OS

Linux Mint 20 and 21

laex333 commented 6 months ago

... so if this is a feature rather than a bug, I would suggest a feature request: Remove the minimum width of duration, bitrate, year, playlist-position/order, preview-listen and play count columns!

laex333 commented 6 months ago

... the AutoDJ view seems to only be reset after a restart of Mixxx - the other views reset immediately after switching to another view and right back...

ronso0 commented 6 months ago

Which Qt version are you using?

With Qt 5.12.8 everything works as expected (2.3.6 and 2.4)

ronso0 commented 6 months ago

Can you test with a clean profile? Backup your settings by renaming the .mixxx directory.

ronso0 commented 6 months ago

Also, when you start Mixxx from the command line with --log-level debug, do you see anything suspicious when switch views?

ronso0 commented 6 months ago

I'll prepare a PR with some trace info.

laex333 commented 6 months ago

Hi, and thanks for your attention!

Finding out the QT version turns out to be a nightmare. Most promising solution I could find: $ find /usr/lib* -iname "*Qt*" gave me a lot of packages containing "5.12.8" on LinuxMint 20 and "5.15.3" on LinuxMint 21, so I suppose that's the versions used, both with Mixxx 2.4, both installed from the official repository, both with exactly the same result...

I tried everything again with a fresh and clean profile:

  1. Track view: activated play-count, year and bitrate (deacitvated album and artist to save space).
  2. Switching to AutoDJ view and back didn't change things!
  3. Had to create a new empty crate (of course, because of fresh install), and after switching to it and back to main track view: many columns reset to (useless/counterproductive) "minimum widths" again...

grafik

. Here is the debug output of the whole procedure... Nothing fishy: debug [Main] WTrackTableView::loadTrackModel() LibraryTableModel(0x5609bed5edb0) debug [Main] LibraryTableModel(0x5609bed5edb0) select() returned 1073 results in 9 ms debug [Main] CrateFeature::activateChild() QModelIndex(0,0,0x5609ce2746a0,SidebarModel(0x5609ce213440)) debug [Main] WTrackTableView::loadTrackModel() CrateTableModel(0x5609ce267ee8) debug [Main] CrateTableModel(0x5609ce267ee8) select() returned 0 results in 0 ms debug [Main] WTrackTableView::loadTrackModel() LibraryTableModel(0x5609bed5edb0) debug [Main] LibraryTableModel(0x5609bed5edb0) select() returned 1073 results in 17 ms

I hope that helped. Please tell me how I can be of further assistance...

ronso0 commented 6 months ago

Oh, sorry, I should have given a hint regarding the used Qt version: it's one of the first lines in the log when starting Mixxx from the command line with --developer argument, after the "SoundSource..." lines, for example

debug [Main] Qt: 5.12.8
laex333 commented 6 months ago

Thanks! Don't feel sorry for me being a noob... ;)

I can confirm Qt 5.12.8 on LinuxMint 20 and 5.15.3 on LinuxMint 21 - with exactly the same results...

ronso0 commented 6 months ago

Thank you!

Interestingly, if I enable a previously hidden column it's shown with the "real" minimal width, which is only a few characters: here 'Co' is 'Composer' image

Only when I double-click that column header the width is set to the minimum required by the longest content. For example, 'Last played' expands from 'La' to 'Last Play' so it can show 18.02.24

laex333 commented 6 months ago

Yes, I can confirm what you have witnessed! The double-clicking is a very helpful feature, by the way!

. Also I just found out that all columns seem to revert back to the same default minimum width when manually dragged thinner than that!

So this (with all columns enabled and dragged to their absolute minimum widths): grafik

reverts to this (right after switching view to something else and right back): grafik

laex333 commented 6 months ago

So I think I want to rephrase, simplify and clarify my proposal: In all views, have all columns keep their widths when switching views or close/reopen Mixxx!

ronso0 commented 6 months ago

That is actually the case, columns are remebered per feature.

We just:tm: need to figure why it's not working for you.

ronso0 commented 6 months ago

Looking at your "after" screenshot it seems the default width is used (50px). This indicates the default state is loaded which should only happen if the saved header state is either empty or corrupt for some reason. So the question is why the header is not saved correctly. I have a branch with some debug output which I will share soonish.

mxmilkiib commented 6 months ago

Might as well close mine, in my mind this is a dupe issue, could have said "it happens for 2.4 also" there, but this one has more chat/attention so it's worth more now.

Edit; try testing in a VM to reproduce

Edit2; though the reset is to default widths, not a consistent, like, "inch" long width.

IMHO, Qt style to have many bugs even after so these years. I get this exact same problem in QBittorrent

(then there's the "double click a word and drag doesn't select whole words (like every other bleedin toolkit..))

https://github.com/qbittorrent/qBittorrent/issues/20160

I had a look before, and there are a number of reports that match the behaviour, but there was no point in me trying to figure out which given I can't map the reported faulty mechanism to Mixxx's code let alone fix it.

https://bugreports.qt.io/browse/QTBUG-120418?jql=summary%20~%20%22column%20width*%22%20OR%20description%20~%20%22column%20width*%22%20ORDER%20BY%20created%20DESC%2C%20lastViewed%20DESC (there's no extra keyword that encompasses all the similar broken behaviour, but the titles and descriptions make it obvious which ones to look at)

ronso0 commented 6 months ago

Might as well close mine, in my mind this is a dupe issue, could have said "it happens for 2.4 also" there, but this one has more chat/attention so it's worth more now.

I couldn't reproduce with Qt 6 either (have a different version), but since this confirms the bug in 2.4 (with the version I have) it deserves more attention ;)

Thanks for the Qt bug list, but I couldn't spot a relevant bug yet. I'm using the exact same version as @laex333 (Qt 5.12.8) so I'm puzzled why this happens only for @laex333 .

laex333 commented 6 months ago

Hi @mxmilkiib, glad you join in here!

Actually, we are not having the exact same problem: Your columns seem to get resized independent of their actual width at every restart of Mixxx (as in your example video), mine only if they are smaller than 54px!

(I measured it: it is 51px + a 1px border on the left as well as on the right + 1px on the right as spacer to the next column / 54px is also the size of the content fields, easily measured when a field is selected and therefore has a border, or with the "Color" field.)

Also, switching between Maximized ("big library") to not-Maximized view is no problem for me!

So our problems might be connected, but the behavior is actually quite different...

ronso0 commented 6 months ago

@laex333 I just created #12885 with looots of debug output for the header operations. Please check this out (either wait for CI builds or build yourself). backup instructions are here https://github.com/mixxxdj/mixxx/wiki/Testing

laex333 commented 6 months ago

OK, I installed the test version and started from scratch with new Mixxx settings... As I am unexperienced with building software, I chose to download the CI build for Ubuntu 22.4 - as this corresponds to my Linux Mint 21 system...

A difference to Mixxx 2.4 stable seems to be the Qt version (test version shows Qt: 6.2.4), but our problems with the wrong/reset width of the columns seems to be exactly the same!!

I attached a file which shows the terminal output of switching views and what I've done... What I found interesting is that there is one moment, where the terminal output does NOT correspond to the displayed column widths! But you will be able to judge what that indicates... TerminalOutput.txt

Please tell me, how I can provide you with something that puts you in the position to track the problem down...! Thank you!

ronso0 commented 6 months ago

Okay, thanks for testing, let's move to #12885