MagFit on MavExplorer unusable on Ubuntu 22.04

Continuing the discussion from Plane 4.3 stable release:

This screenshot maybe shows it better:

While doing log analysis on a test log on 4.3.3 beta1, I tried to use magfit but the contents dialog runs off the bottom of the window so it’s not possible to press the “Run” button. Any idea if I can fix this in settings somewhere, or is it a bug?

I’m running MAVExplorer.py 1.8.59 from a clone I took direct from GitHub on the weekend. Also python 3.10.6

As a quick fix, try changing display resolution.

Nope - just get a smaller dialog box with the content still too big for the box.

I am able to run magfit on my 22.04 just fine

It’s also available as a command line tool:

./ardupilot/modules/mavlink/pymavlink/tools/magfit_WMM.py --cmot --elliptical --mag 1 --reduce 10 --condition "GPS.Spd > 0.5" /path/to/dataflash.bin

1 Like

I’ve also been running into the same issue as @timtuxworth on Ubuntu (LTS, Pi-LTS, Budgie, PopOs). I’ve tried to re-size the screen but that didn’t help.

magfit_WMM.py works.

2 Likes

@timtuxworth if you want to resize your window you can probably make this change in the code: Comparing ArduPilot:master...rishabsingh3003:resize_magfit · ArduPilot/MAVProxy · GitHub
You’ll need to uninstall MAVProx, then build and install again with the change. You can then resize with cursor after that… I tested it

Thanks @Allister I tried magfit_WMM.py and as a command line tool only, yes it does work, thanks for that.

Thanks @rishabsingh3003 , I’m already running the dev version, so it was easy to try. It works immediately, I don’t even need to resize the dialog, the “Run” and “Close” buttons are now visible in the dialog.

I do get a number of these errors

(MAVExplorer.py:2036215): Gtk-CRITICAL **: 16:36:35.649: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton
(MAVExplorer.py:2036215): Gtk-CRITICAL **: 16:36:35.649: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

Any chance your change can get pushed to master?

1 Like

Thanks for trying it out!
I am unsure if I can get it merged… it’s probably not the correct solution. It might need some rework. I did this as a short hack for you…

I do appreciate that @rishabsingh3003 , but if myself and @Allister are reporting the problem, for sure others are having the problem too, so I’m thinking it probably needs a proper solution.

1 Like

@timtuxworth merged! So should be automatically fixed when we have a new MAVProxy release

1 Like

Thanks @rishabsingh3003 , I pulled it and ran setup.py, it does work but throws a bunch of these asserts when it runs:

(MAVExplorer.py:964981): Gtk-CRITICAL **: 08:01:23.199: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton
 
(MAVExplorer.py:964981): Gtk-CRITICAL **: 08:01:23.199: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton