Cannot start in (K)ubuntu 22.04

Bug #1991322 reported by Johannes Ballmann
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
frescobaldi (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The included version of qpageview relies on float->int conversions which were apparently removed in python 3.10.

Frescobaldi is failing on Kubuntu 22.04 with the following stacktrace:

Traceback (most recent call last):
  File "/usr/share/frescobaldi/frescobaldi_app/qpageview/highlight.py", line 209, in paintEvent
    super().paintEvent(ev) # first paint the contents
  File "/usr/share/frescobaldi/frescobaldi_app/qpageview/shadow.py", line 43, in paintEvent
    rect = ev.rect().adjusted(-width, -width, width / 2, width / 2)
TypeError: adjusted(self, int, int, int, int): argument 1 has unexpected type 'float'

Which seems reasonable after looking at shadow.py and seing width being calculated by pythons true division.

I wonder if frescobaldi is able to launch for anyone on 22.04?

Revision history for this message
Andreas Nagel (antimatter84) wrote :

I can reproduce the same issue on standard Ubuntu 22.04 and on Linux Mint 21 Cinnamon.

The error described by you appears on application start and can be dismissed. But once the window is resized, you have lost and clicking "cancel" will just immediately show it again forever.

A workaround which worked for me is to manually download and install the latest *.deb packages from kinetic repos:
- https://packages.ubuntu.com/kinetic/python3-qpageview
- https://packages.ubuntu.com/kinetic/frescobaldi

Revision history for this message
Andreas Nagel (antimatter84) wrote :

Another workaround would be to edit the file /usr/share/frescobaldi/frescobaldi_app/qpageview/shadow.py and change line 43 from this:

rect = ev.rect().adjusted(-width, -width, width / 2, width / 2)

into this:

rect = ev.rect().adjusted(int(-width), int(-width), int(width / 2), int(width / 2))

Revision history for this message
Johannes Ballmann (johannes-ballmann) wrote :

It doesn't stop there. I already tried fixing that line and found, that other lines and iirc also other files have the same or similar problems. I'm wondering whether it's possible to ship the net version since this one isn't going to work with Ubuntu 22.04/python3.10. is there an official Backport underway?

Revision history for this message
Abou Samra Jean (jean-abou-samra) wrote :
Revision history for this message
Abou Samra Jean (jean-abou-samra) wrote :

For now, you can get a working Frescobaldi on Jammy by installing it from Flatpak.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in frescobaldi (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.