19.10 - Loading / Saving custom panel layouts is utterly broken

I don't have a solution for this. I don't even have a workaround. It may be that there simply isn't one without a lot of development work. I don't know if it even works properly on 18.04 or 16.04: I haven't tested those yet.

Case #1: The simple example.

Customise your panel layout. Save it. Load a different layout. Load your custom layout.

Obviously, this should return you to how things were when you saved your layout. Instead, you'll probably get something that bears very little relationship to it. Even worse, every setting that you have for ALL of your panel applets will have been wiped out. For example, if you had set a location for the clock applet, that will now be gone. If you changed the clock to 12H format, it'll be back to 24H. ALL your customisation will be gone. That means that things like HW Sensors and System Monitor will be back to their defaults too. So if you were monitoring multiple cores on your CPU, those will all have vanished, and so on.

Case #2: The "WTF?!" example.

Customise your panel layout. Save it TWICE with two different names. Load the first save again.

This one resulted in something even more broken. Rather than just wipe out all your settings, it gives you DUPLICATES of the applets, with one set having what is at least partially the correct settings, and the other set using the defaults. For example, if you had System Monitor tracking CPU and RAM, you'll end up with 3 windows: two CPU and one RAM. If you had an app launcher on the panel, you might now have 2 of the same app.
(Note that I did this after the initial borkage, so this one may be presenting a combination of that with a new bug).

It's hard to even guess at what's going on here. It's especially confusing since the bugs with the panel crashing when you save a custom layout are fixed in 19.10, and it defies belief that loading panels wouldn't have been tested at least once. The behavior isn't consistent either, as seen above.


Case #2 is potentially the easiest to at least understand what happened: AFAICT, it simply MERGED the layout it was supposed to be loading, without removing the current layout first. For example, the .panel file for it contains this at line 42:

[objects/cpufreqapplet]
applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
locked=false
object-type='applet'
panel-right-stick=false
position=260
toplevel-id='toplevel_0'

which I expect is the layout for that applet after Case #1 wiped out all the customisation... but it also contains this at line 314:

[objects/object-14]
applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
object-type='applet'
panel-right-stick=false
position=399
toplevel-id='toplevel-0'

[objects/object-14/prefs]
cpu=3
show-text-mode=0

[objects/object-15]
applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
object-type='applet'
panel-right-stick=false
position=354
toplevel-id='toplevel-0'

[objects/object-15/prefs]
cpu=2
show-text-mode=0

[objects/object-16]
applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
object-type='applet'
panel-right-stick=false
position=309
toplevel-id='toplevel-0'

[objects/object-16/prefs]
cpu=1
show-text-mode=0

[objects/object-17]
applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
object-type='applet'
panel-right-stick=false
position=264
toplevel-id='toplevel-0'

[objects/object-17/prefs]
show-text-mode=0

which can only be the correct layout that was saved originally, as you can see it's tracking all 4 cores.
(Actually, there are NINE of them in that file, but this is complicated enough already! The second batch of 4 also has the correct CPU identifiers etc with it).

The same layout, saved as a different user and from 16.04, has exactly the 4 instances you'd expect.

The same goes for the NetSpeed applet, with one copy at line 82 with all the settings lost:

[objects/netspeedapplet]
applet-iid='NetspeedAppletFactory::NetspeedApplet'
locked=false
object-type='applet'
panel-right-stick=false
position=741
toplevel-id='toplevel_0'

and a correct copy at line 271 with the settings intact:

[objects/object-10]
applet-iid='NetspeedAppletFactory::NetspeedApplet'
object-type='applet'
panel-right-stick=false
position=475
toplevel-id='toplevel-0'

[objects/object-10/prefs]
auto-change-device=true
change-icon=false
device='wlan0'
short-unit=true
show-bits=true
show-icon=false
show-quality-icon=false
show-sum=false

(The line numbers are irrelevant of course, but the ORDER of the duplicates may be informative, as might the object IDs). The third (and last) copy is at line 661, and again has the correct settings with it:

[objects/object_5]
applet-iid='NetspeedAppletFactory::NetspeedApplet'
[snip]

[objects/object_5/prefs]
auto-change-device=true
change-icon=false
[snip]


IDK how much of the 19.10 bugs are in the loading code and how much in the saving part - that was next on my agenda, but unfortunately I'm out of time to dig any further into this. If anyone wants to run with it for a while, custom layouts are hidden in /usr/share/mate-panel/ rather than in the user's home tree.

1 Like

I used a little script I made for 18.04 to switch between custom layouts depending on how many monitors I'm using.
Loading is indeed broken now. I end up with two superposed panels (one blank) instead of one top panel per monitor.
It seems to load fine for half a second and then gets buggy.
Really hope they fix this.

1 Like

It would be interesting to know if this is a broader Mate problem or a specifically UM problem. I can't test that right now because I am using a customized Openbox based desktop.

Thanks for spotting the breakage and debugging. I could reproduce the 2 cases too.

:x: 19.10
:heavy_check_mark: 19.04
:heavy_check_mark: 18.04

I relayed them to the QA team, hopefully to be fixed before 19.10 is released. :crossed_fingers:

5 Likes

This is from 18.04s release. How close does this sound to what you're seeing?

The duplicates sounds very familiar. However, I gave up trying to get it to do the same thing twice.

"How close?" Some of it a lot, some of it not at all. Otherwise we'd get bored. :stuck_out_tongue:

One machine is bare metal, on a 720p TV. One is a VM on a 1920x1200 display. Different core counts, RAM sizes, even storage types. Neither has a TOP panel, but both have a Left one. Ordering-wise though, it may well have BEEN a top panel originally and was just moved to the side to not burn limited vertical space rather than plentiful horizontal space.

That is the panel where the dupes were obvious, but I don't have much of anything on the bottom panel to notice: it's nearly all window bars. However, the one thing I do have on there is the clock, which at the very least had all its settings wiped out by #1 - I just don't recall if it also gained a second clock at some point.
Except, I don't have to, because I (duh) kept the panel files, and... jep: two clockapplets them, both on the bottom panel. "Only" 2 of them, rather than 3, which is one less duplicate than the elements on the other panel, but it's possible I repaired that panel a bit. Only 2 indicator sets too.

So, we end back where we started: yes and no.
I think it's unlikely that the top (?really, "first"?) panel has anything special to it, and it's more likely that the issue is systemic. It may simply be that things are screwy enough by the time the first panel's been loaded on top of the one it's replacing that the code ends up erroring out, or running into dependent problems, etc.

If you're feeling brave (and ideally have a VM you can just snapshot and restore afterwards) you could try your luck with my steps: reproduceability seemed like your biggest headache in 18.04, but I'm 2 for 2 on 19.10 and lah got the same result as well, so it might be a lot easier now - and thus also a lot easier for Wimpy et al to at least understand (and find time for) even if an actual fix isn't easily managed.

Well, today's the day the 19.10 archives will start to freeze as flavours prepare for final release, so possibly not before 19.10's release unfortunately.

Has this bug been reported on Launchpad? Marking it as "affects me too" with easy reproduction steps will increase the heat. :fire:

1 Like

Could you please give me the URL where this should be reported ?

https://bugs.launchpad.net/ubuntu-mate - also accessible via the "Bug Tracker" link at the top of the community. :point_up:

1 Like

Thanks a lot. Gonna report it now.

Launchpad entry