tdm icon indicating copy to clipboard operation
tdm copied to clipboard

core dump with Python 3.10

Open eku opened this issue 3 years ago • 7 comments

I recently upgraded from Fedora 34 to 35 and reinstalled the virtualenv used for tdm:

virtualenv ~/tdm
~/tdm/bin/pip install tdmgr
Collecting tdmgr
  Using cached tdmgr-0.2.11-py3-none-any.whl (109 kB)
Collecting PyQt5==5.14.2
  Using cached PyQt5-5.14.2-5.14.2-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl (63.6 MB)
Collecting paho-mqtt>=1.4
  Downloading paho-mqtt-1.6.1.tar.gz (99 kB)
     |████████████████████████████████| 99 kB 1.1 MB/s 
Collecting PyQt5-sip<13,>=12.7
  Downloading PyQt5_sip-12.9.0-cp310-cp310-manylinux1_x86_64.whl (351 kB)
     |████████████████████████████████| 351 kB 2.0 MB/s 
Building wheels for collected packages: paho-mqtt
  Building wheel for paho-mqtt (setup.py) ... done
  Created wheel for paho-mqtt: filename=paho_mqtt-1.6.1-py3-none-any.whl size=62132 sha256=625b3fd5cd9d83d028ec7e9e9622d81a18f1792c9e14de36f8992822efcacb75
  Stored in directory: /home/xyz/.cache/pip/wheels/8b/bb/0c/79444d1dee20324d442856979b5b519b48828b0bd3d05df84a
Successfully built paho-mqtt
Installing collected packages: PyQt5-sip, PyQt5, paho-mqtt, tdmgr
Successfully installed PyQt5-5.14.2 PyQt5-sip-12.9.0 paho-mqtt-1.6.1 tdmgr-0.2.11
$ ~/tdm/bin/tdmgr.py
Traceback (most recent call last):
  File "/home/xyz/tdm/lib/python3.10/site-packages/Util/models.py", line 281, in paint
    p.drawPixmap(option.rect.x() + 2, option.rect.y() + px_y, px.scaled(24, 24))
TypeError: arguments did not match any overloaded call:
  drawPixmap(self, QRectF, QPixmap, QRectF): argument 1 has unexpected type 'int'
  drawPixmap(self, QRect, QPixmap, QRect): argument 1 has unexpected type 'int'
  drawPixmap(self, Union[QPointF, QPoint], QPixmap): argument 1 has unexpected type 'int'
  drawPixmap(self, QPoint, QPixmap): argument 1 has unexpected type 'int'
  drawPixmap(self, QRect, QPixmap): argument 1 has unexpected type 'int'
  drawPixmap(self, int, int, QPixmap): argument 2 has unexpected type 'float'
  drawPixmap(self, int, int, int, int, QPixmap): argument 2 has unexpected type 'float'
  drawPixmap(self, int, int, int, int, QPixmap, int, int, int, int): argument 2 has unexpected type 'float'
  drawPixmap(self, int, int, QPixmap, int, int, int, int): argument 2 has unexpected type 'float'
  drawPixmap(self, Union[QPointF, QPoint], QPixmap, QRectF): argument 1 has unexpected type 'int'
  drawPixmap(self, QPoint, QPixmap, QRect): argument 1 has unexpected type 'int'
Abgebrochen (Speicherabzug geschrieben)

Do you need any additional information?

eku avatar Nov 19 '21 13:11 eku

Same here, in a clean venv..

$ virtualenv newvenv
$ source newvenv/bin/activate
$ pip install tdmgr
$ tdmgr.py 
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Traceback (most recent call last):
  File "/home/me/newvenv/lib/python3.10/site-packages/Util/models.py", line 281, in paint
    p.drawPixmap(option.rect.x() + 2, option.rect.y() + px_y, px.scaled(24, 24))
TypeError: arguments did not match any overloaded call:
  drawPixmap(self, QRectF, QPixmap, QRectF): argument 1 has unexpected type 'int'
  drawPixmap(self, QRect, QPixmap, QRect): argument 1 has unexpected type 'int'
  drawPixmap(self, Union[QPointF, QPoint], QPixmap): argument 1 has unexpected type 'int'
  drawPixmap(self, QPoint, QPixmap): argument 1 has unexpected type 'int'
  drawPixmap(self, QRect, QPixmap): argument 1 has unexpected type 'int'
  drawPixmap(self, int, int, QPixmap): argument 2 has unexpected type 'float'
  drawPixmap(self, int, int, int, int, QPixmap): argument 2 has unexpected type 'float'
  drawPixmap(self, int, int, int, int, QPixmap, int, int, int, int): argument 2 has unexpected type 'float'
  drawPixmap(self, int, int, QPixmap, int, int, int, int): argument 2 has unexpected type 'float'
  drawPixmap(self, Union[QPointF, QPoint], QPixmap, QRectF): argument 1 has unexpected type 'int'
  drawPixmap(self, QPoint, QPixmap, QRect): argument 1 has unexpected type 'int'
Aborted (core dumped)
$ pip list
Package    Version
---------- -------
paho-mqtt  1.6.1
pip        21.2.3
PyQt5      5.14.2
PyQt5-sip  12.9.0
setuptools 57.4.0
tdmgr      0.2.11
wheel      0.36.2

potchin avatar Nov 29 '21 13:11 potchin

I did not test TDM on python 3.10 yet. Please try 3.8 for example

jziolkowski avatar Nov 29 '21 13:11 jziolkowski

Yep, I just ran it in a python3.8 virtualenv and it runs fine. I guess this should be renamed to "support python 3.10"

potchin avatar Nov 29 '21 14:11 potchin

Thank you for checking. I'll have a look at what changed so the method overload doesn't work properly.

jziolkowski avatar Nov 29 '21 15:11 jziolkowski

I have just raised a merge request (#184) that fixes Python 3.10 support. So far i've only tested it on 3.10.0, but should be able to test on 3.10.2 later today.

itsmegb avatar Feb 03 '22 08:02 itsmegb

Thanks @itsmegb your patch did solve the problem for me.

rabin-io avatar Feb 07 '22 17:02 rabin-io

I have reproduced this issue on development branch with python 3.10.4. Pull Request #197 solve the issue

CyrilB1531 avatar Jul 20 '22 08:07 CyrilB1531

fixed in current develop. Before the release, build is available here:

https://github.com/jziolkowski/tdm/actions/runs/3670837944 (at the very end)

jziolkowski avatar Dec 11 '22 21:12 jziolkowski

fixed in current develop. Before the release, build is available here:

https://github.com/jziolkowski/tdm/actions/runs/3670837944 (at the very end)

Well, the linux executable from that build dumps a core.

Module libdl.so.2 with build-id 9b8f976e7c6d2c96004d734f77fa2282b6241268
Stack trace of thread 137542:
#0  0x00007f4408501e7c __pthread_kill_implementation (libc.so.6 + 0x8ce7c)
#1  0x00007f44084b1aa6 raise (libc.so.6 + 0x3caa6)
#2  0x000000000040413a n/a (tdmgr_0.2.13 + 0x413a)
ELF object binary architecture: AMD x86-64

eku avatar Dec 16 '22 13:12 eku

try the latest develop. if the issue persists try older releases. if this persists, then I'm not sure if this is not somehow related to your system.

I'm testing these builds on both windows and linux, other users as well. TBH little idea how to help more :(

jziolkowski avatar Dec 16 '22 16:12 jziolkowski

develop as in not the packaged executable, but clone the repo and install venv

jziolkowski avatar Dec 16 '22 16:12 jziolkowski

@jziolkowski The builded exe artifacts with gh actions ci should work. But idk how portable linux executables between different Linux distros are.

Jason2866 avatar Dec 16 '22 17:12 Jason2866

It is possible to do portable binaries using statically linked libraries if the app is not too much dependant of the system. For example I'm using pre-built binaries of ffmpeg that are not specifically targeted at one distro. Alternatively, packages such as AppImage, Flat pack or Snap allows to package an app with dependencies with more or less sandboxing. I could have a look...

barbudor avatar Dec 17 '22 01:12 barbudor

I looked at appimage some time ago, it was quite involved to make such build. But perhaps it improved.

jziolkowski avatar Dec 17 '22 11:12 jziolkowski