Bug 2140639 - Pronterface GUI broken after upgrade to Fedora 37
Summary: Pronterface GUI broken after upgrade to Fedora 37
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: printrun
Version: 37
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Scott Talbert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-07 13:19 UTC by Vilém Maršík
Modified: 2022-12-21 10:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-02 03:09:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
screenshot (395.97 KB, image/png)
2022-11-07 13:19 UTC, Vilém Maršík
no flags Details
Screenshot from swt2c (199.76 KB, image/png)
2022-11-09 21:53 UTC, Scott Talbert
no flags Details
Screenshot from Fedora 35 (143.55 KB, image/png)
2022-11-10 11:19 UTC, Miro Hrončok
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kliment Printrun issues 1283 0 None open 3D viewer broken by wxwidgets 3.2/python-wxpython 4.1 2022-11-08 10:52:17 UTC

Description Vilém Maršík 2022-11-07 13:19:11 UTC
Created attachment 1922728 [details]
screenshot

Description of problem:
1. model view does not draw (main problem)
2. buttons seem to have lost their styles (cosmetic)
(see attached screenshot)
You can still print, but cannot see what is being printed.

Version-Release number of selected component (if applicable):
pronterface-2.0.0-0.23.rc8.fc37.noarch

dependencies versions:
python3-wxpython4-4.2.0-1.fc37.x86_64
python3-pyglet-1.5.23-3.fc37.noarch
python3-psutil-5.9.1-1.fc37.x86_64
python3-gobject-3.42.2-2.fc37.x86_64
python3-dbus-1.2.18-5.fc37.x86_64
python3-cffi-1.15.1-2.fc37.x86_64
python3-cairocffi-1.3.0-5.fc37.noarch
simarrange-0.0-3520170316git8238ce5.fc37.x86_64
python3-3.11.0~rc2-1.fc37.x86_64


How reproducible:
100%

Steps to Reproduce:
1. run pronterface
2.
3.

Actual results:
cannot see what you print

Expected results:
can see what you print

Additional info:
stdout repeatedly prints error message, not sure if related:
(pronterface:5224): Gtk-CRITICAL **: 14:03:46.877: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

Comment 1 Miro Hrončok 2022-11-08 10:52:17 UTC
Sounds like https://github.com/kliment/Printrun/issues/1283

I am a bit swamped with other things. Scott, do you have any idea?

Comment 2 Vilém Maršík 2022-11-08 12:43:17 UTC
(In reply to Miro Hrončok from comment #1)
> Sounds like https://github.com/kliment/Printrun/issues/1283

Yes, that issue looks the same.

Tried to downgrade python3-wxpython4, but that looks pretty impossible if you don't want to downgrade half of the system (the RPM has dependence on exact python(abi) version, as other packages do, and downgrading one implies downgrading them all). We need a fix, though not sure if for pronterface or for python3-wxpython4.

Comment 3 Scott Talbert 2022-11-08 14:19:00 UTC
I have a hunch about this.  I'll take a look later today.

Comment 4 Scott Talbert 2022-11-09 21:53:53 UTC
Created attachment 1923433 [details]
Screenshot from swt2c

Is this what the GUI is supposed to look like?

Comment 5 Miro Hrončok 2022-11-10 11:18:54 UTC
Yes, more or less.

> 1. model view does not draw (main problem)

This seems fixed. You can download a gcode file, e.g. https://churchyard.fedorapeople.org/cube.gcode and load it with $ pronterface cube.gcode (or the Load File button in the middle of the top bar) and the middle view should give you a preview of 9 cubes. It should allow a 3D rotation via mouse.

> 2. buttons seem to have lost their styles (cosmetic)

This seems to still be the case.

-----


I'll attach a screenshot from Fedora 35.

Comment 6 Miro Hrončok 2022-11-10 11:19:19 UTC
Created attachment 1923534 [details]
Screenshot from Fedora 35

Comment 7 Vilém Maršík 2022-11-10 16:27:55 UTC
Great, looking forward to test a F37 build of your fix.

Comment 8 Scott Talbert 2022-11-18 00:34:31 UTC
Okay, so my fix seems to resolve the issue with the model viewer - I tested with Miro's cube.gcode and it seems to work.

On the issue with the button sizing, that seems to be an intentional change in wxWidgets (see https://github.com/wxWidgets/wxWidgets/commit/215a6ee238fdc0bafab79aab0a529aea8e6bba08) as pronterface seems to be using the wxBU_EXACTFIT style.  I'd suggest taking this one up with upstream pronterface if it is really that big of a deal.  I would argue that wxWidgets is doing the "right thing" with the "exact fit" style.

Back to the issue with the model viewer.  This one is a bit complicated and is somewhat my fault.  So, I implemented OpenGL EGL support in wxWidgets because the existing GLX support didn't work on Wayland as it is X11-only (Miro, you may recall the patch we put in to force X11 in pronterface because of this...).  This new EGL support was enabled by default and is an either/or compile option at the moment.  Unfortunately, when using EGL, the pronterface viewer is broken - perhaps because the other OpenGL library (pyglet) isn't working with EGL.  Because of this, and some other applications that have been broken (e.g., hugin which uses glew), I've come to the realization that the world isn't ready for EGL-only in wxWidgets.  Rebuilding with GLX support resolves the problem.  The downside of this is that it involves an ABI change, so any packages that use wxGLCanvas need to be rebuilt.  Even trickier, unfortunately this is a little harder now that F37 is released, but I suppose can be down.  I'll probably open up side tags in F37 and Rawhide, ask the wxGLCanvas package users to rebuild their packages, and if that doesn't happen quickly, I might try to flag down a provenpackager to help (hi, Miro!).

So, in the case of pronterface, the fix only involves rebuilding wxGTK and python3-wxpython4.

Comment 9 Miro Hrončok 2022-11-18 10:27:10 UTC
> I'd suggest taking this one up with upstream pronterface if it is really that big of a deal.

Not a big deal for me.


> I might try to flag down a provenpackager to help (hi, Miro!).

Sure thing. Just let me know the list of packages and side tags to build in.

Comment 10 Scott Talbert 2022-11-28 00:17:48 UTC
Should fix the model viewer for F37:

https://bodhi.fedoraproject.org/updates/FEDORA-2022-6be9e24d9c

Comment 11 Scott Talbert 2022-12-02 03:09:29 UTC
Fixed now in F37 + Rawhide.

Comment 12 Miro Hrončok 2022-12-02 10:29:13 UTC
Thank you so much, Scott!

Comment 13 Vilém Maršík 2022-12-05 12:31:02 UTC
Thanks a lot, the model view is now back after updating via
# dnf upgrade --refresh --advisory=FEDORA-2022-6be9e24d9c

A few minor issues with controls still remain:
* buttons above/below the model view still compressed (cosmetic)
* flow/speed controls only work by mouse dragging the scrollbar, buttons "+"/"-" or inserting a value manually dumps following error on change:
Traceback (most recent call last):
  File "/usr/lib64/python3.11/site-packages/printrun/gui/controls.py", line 200, in speedslider_spin
    root.speed_slider.SetValue(value)
TypeError: Slider.SetValue(): argument 1 has unexpected type 'float'

Any changes made these ways won't be sent to printer by pressing the "Set" buttons.
Did not find this problem for the original bugreport, but have seen it last week before the update.

Are you going to address this? Should I open a new bugreport?

Comment 14 Miro Hrončok 2022-12-05 12:42:26 UTC
TypeError: Slider.SetValue(): argument 1 has unexpected type 'float' is definitively a different bug.

It has been fixed upstream via https://github.com/kliment/Printrun/commit/302ed8a1aa012552529d5abd30f4b40b0b429580 and I can backport it.

Comment 15 Scott Talbert 2022-12-05 14:37:05 UTC
On your first issue, if you're referring to the button sizing that you noted previously, please refer to my previous comment about the code using the "exact fit" style.  I don't plan to do anything about this.

And yes, on the second issue, it's an unfortunate Python 3.10-ism.  That backport should fix it.

Comment 17 Vilém Maršík 2022-12-13 22:44:01 UTC
Thanks a lot, flow/speed controls now look fixed.

Comment 18 Vilém Maršík 2022-12-14 12:16:02 UTC
Still not very stable, hangs after a few hours of printing.. wonder if it prints something on stdout when started from console

Comment 19 Vilém Maršík 2022-12-21 10:26:06 UTC
Hang reproduced - looks like livelock with printing in loop "Attempted to write invalid text to console, which could be due to an invalid baudrate", at least in this case. Probably unrelated to this bug, can open a new one when knowing more. Thanks for fixing.


Note You need to log in before you can comment on or make changes to this bug.