Bug 2019640 - enki-20.03.1-6.fc35 crash
Summary: enki-20.03.1-6.fc35 crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-qutepart
Version: 35
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Raphael Groner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2016898 2023192 2023637
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-03 02:12 UTC by amonet
Modified: 2021-12-01 01:19 UTC (History)
6 users (show)

Fixed In Version: python-qutepart-3.3.2-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-01 01:19:56 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github andreikop enki issues 473 0 None open python 3.10 enforces explicit float-to-int casting 2021-11-09 20:05:48 UTC
Github andreikop qutepart issues 91 0 None open python 3.10 needs explicit float-to-int casting 2021-11-09 20:05:48 UTC

Description amonet 2021-11-03 02:12:41 UTC
Description of problem:
While trying to run enki on Fedora 35 it crashes and when run on terminal it allows to see error.

Version-Release number of selected component (if applicable):
enki-20.03.1-6.fc35

How reproducible:
Simply running enki preferably on terminal will show the bugs.

Additional info:
QSocketNotifier: Can only be used with threads started with QThread
CRITICAL:root:Traceback (most recent call last):
  File "/usr/bin/enki", line 33, in <module>
    sys.exit(load_entry_point('enki==20.3.1', 'gui_scripts', 'enki')())
  File "/usr/lib/python3.10/site-packages/enki/__main__.py", line 276, in main
    core.init(profiler, cmdLine)
  File "/usr/lib/python3.10/site-packages/enki/core/core.py", line 125, in init
    self._workspace = enki.core.workspace.Workspace(self._mainWindow)
  File "/usr/lib/python3.10/site-packages/enki/core/workspace.py", line 272, in __init__
    self.openedFileExplorer = enki.core.openedfilemodel.OpenedFileExplorer(self)
  File "/usr/lib/python3.10/site-packages/enki/core/openedfilemodel.py", line 366, in __init__
    DockWidget.__init__(self, workspace, "&Opened Files", QIcon(":/enkiicons/filtered.png"), "Alt+O")
  File "/usr/lib/python3.10/site-packages/enki/widgets/dockwidget.py", line 174, in __init__
    self._titleBar = _TitleBar(self)
  File "/usr/lib/python3.10/site-packages/enki/widgets/dockwidget.py", line 46, in __init__
    self.setIconSize(QSize(textHeight * 0.8, textHeight * 0.8))
TypeError: arguments did not match any overloaded call:
  QSize(): too many arguments
  QSize(int, int): argument 1 has unexpected type 'float'
  QSize(QSize): argument 1 has unexpected type 'float'

Comment 1 Raphael Groner 2021-11-05 09:04:36 UTC
Reproducible for me with python3-qt5-5.15.0-13.fc35.x86_64 and directly in console, but so not enki related as it has definitely worked somewhen and the code hasn't changed so far.

Maybe there are too many digits for float? Tried with two guessed textHeight values 12 and 10 as they seem quite common, see below.

Python 3.10.0 (default, Oct  4 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtCore import pyqtSignal, QSize, Qt
>>> QSize(textHeight * 0.8, textHeight * 0.8)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'textHeight' is not defined
>>> textHeight = 12
>>> QSize(textHeight * 0.8, textHeight * 0.8)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: arguments did not match any overloaded call:
  QSize(): too many arguments
  QSize(int, int): argument 1 has unexpected type 'float'
  QSize(QSize): argument 1 has unexpected type 'float'
>>> textHeight * 0.8
9.600000000000001

>>> textHeight = 10
>>> textHeight * 0.8
8.0
>>> QSize(textHeight * 0.8, textHeight * 0.8)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: arguments did not match any overloaded call:
  QSize(): too many arguments
  QSize(int, int): argument 1 has unexpected type 'float'
  QSize(QSize): argument 1 has unexpected type 'float'

Comment 2 Elliott Sales de Andrade 2021-11-05 09:11:29 UTC
QSize only takes ints; Python 3.10 is more strict about not casting floats to int. This is a bug in enki if it's calling QSize with a float.

Comment 3 Raphael Groner 2021-11-05 11:38:29 UTC
(In reply to Elliott Sales de Andrade from comment #2)
> QSize only takes ints; Python 3.10 is more strict about not casting floats
> to int. This is a bug in enki if it's calling QSize with a float.

Disagree. There are also other lines where enki fails.

Comment 4 Elliott Sales de Andrade 2021-11-05 20:27:42 UTC
Well, I or anyone else cannot diagnose "other lines" without knowing what they are, but as long as they're float-to-int issues, they're still bugs in enki.

Comment 5 Raphael Groner 2021-11-08 19:38:07 UTC
Well, the "other lines" are in qutepart dependency and produces a bunch of identical errors but it's a float-to-int as well. Both fixable with an explicit conversion as workaround, not sure if upstream would accept, there must be a reason why implicit conversion has worked so far.
https://www.geeksforgeeks.org/type-casting-in-python-implicit-and-explicit-with-examples/

Comment 6 Raphael Groner 2021-11-11 16:52:18 UTC
Somehow regression of bug #2016898 or quite similiar internals with "sip fail to pickle"?

Comment 7 Raphael Groner 2021-11-19 16:50:25 UTC
Upstream provides patches with new releases of both enki and qutepart, see referenced issues and autogenerated bugs.

Comment 8 Fedora Update System 2021-11-22 17:16:26 UTC
FEDORA-2021-7b1025b562 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-7b1025b562

Comment 9 Fedora Update System 2021-11-23 01:18:52 UTC
FEDORA-2021-7b1025b562 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-7b1025b562`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-7b1025b562

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2021-12-01 01:19:56 UTC
FEDORA-2021-7b1025b562 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


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