Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault (core dumped) with tdmgr_0.2.13.appImage on Archlinux python 3.11.3 #243

Closed
m040601 opened this issue May 9, 2023 · 10 comments

Comments

@m040601
Copy link

m040601 commented May 9, 2023

Hi, thanks for your york in this usefull tool.

Possible related issue, #176

I'm on Archlinux. A normal, regular, updated system with the official repos and without any hacks, unofficial packages or customizations.

$ uname -a

Linux gigabyty 6.3.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 01 May 2023 17:42:39 +0000 x86_64 GNU/Linux

I wanted to try the appImage you have on "Releases".

It's not explicited stated on the README, but I assume it is meant and should work on any x64 modern Linux. I do this for many other apps, softwares and appImages, and havent had any problems.

I started it and It crashes with

Segmentation fault (core dumped)

I see no other error output.

I then went on to try testing it instead with a python virtual environment

python -m venv test_venv_for_tdm

cd test_venv_for_tdm

source bin/activate

pip install tdmgr

I then went on like this,

Collecting paho-mqtt>=1.4
  Downloading paho-mqtt-1.6.1.tar.gz (99 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.4/99.4 kB 4.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting PyQt5==5.14.2
  Downloading PyQt5-5.14.2-5.14.2-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl (63.6
MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.6/63.6 MB 2.7 MB/s eta 0:00:00
Collecting PyQt5-sip<13,>=12.7
  Downloading PyQt5_sip-12.12.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.whl (371 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 371.5/371.5 kB 7.0 MB/s eta 0:00:00
Installing collected packages: paho-mqtt, PyQt5-sip, PyQt5, tdmgr
  DEPRECATION: paho-mqtt is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for paho-mqtt ... done
Successfully installed PyQt5-5.14.2 PyQt5-sip-12.12.1 paho-mqtt-1.6.1 tdmgr-0.2.11

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
(xxx)

I then tried to start it, from the terminal, with "tdmgr.py", and saw no error message

My MQTT broker (Mosquitto) and my Tasmota device (D1 mini) is up and running, but I dont see anything in tdm. It seems it doesnt pick it.

So I went into the menu, "MQTT" > "Connect", and tdm immediatelly crashed with,

Traceback (most recent call last):
  File "/dev/shm/xxx/lib/python3.11/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)
(xxx)
    /dev

It also crashes if I start it, and then use the right mouse click button in the list section,


Traceback (most recent call last):
  File "/dev/shm/xxx/lib/python3.11/site-packages/GUI/Devices.py", line 313, in show_list_ctx_menu
    self.select_device(self.device_list.indexAt(at))
  File "/dev/shm/xxx/lib/python3.11/site-packages/GUI/Devices.py", line 321, in select_device
    relays = self.device.power()
             ^^^^^^^Traceback (most recent call last):
  File "/dev/shm/xxx/lib/python3.11/site-packages/GUI/Devices.py", line 313, in show_list_ctx_menu
    self.select_device(self.device_list.indexAt(at))
  File "/dev/shm/xxx/lib/python3.11/site-packages/GUI/Devices.py", line 321, in select_device
    relays = self.device.power()
             ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'power'
Aborted (core dumped)
(xxx)^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'power'
Aborted (core dumped)
(xxx)

More information about the official defaults on my my system, as of May 2023

Repository      : extra
Name            : python-pyqt5-sip
Version         : 12.12.1-2

Repository      : core
Name            : python
Version         : 3.11.3-1

Repository      : extra
Name            : python-pyqt5
Version         : 5.15.9-2

Repository      : extra
Name            : qt5-base
Version         : 5.15.9+kde+r151-1


Repository      : community
Name            : python-paho-mqtt
Version         : 1.6.1-2


Thanks in advance.

@m040601 m040601 changed the title Segmentation fault (core dumped) with tdmgr_0.2.13.appImage on Archlinux Segmentation fault (core dumped) with tdmgr_0.2.13.appImage on Archlinux python 3.11.3 May 10, 2023
@m040601
Copy link
Author

m040601 commented May 10, 2023

UPDATE:

I just discovered that tdm creates a folder in my home directory, "TDM".

Inside it it created 2 files tdm.cfg and tdm.log.

Looking at the tdm.log, it does seem like tdm "discovered" something. But I'me not sure.

2023-05-10 00:39:48 [INFO] ### TDM START ###
2023-05-10 01:03:16 [INFO] ### TDM START ###
2023-05-10 01:03:47 [INFO] ### TDM START ###
2023-05-10 01:03:52 [INFO] ### TDM START ###
2023-05-10 01:04:49 [INFO] ### TDM START ###
2023-05-10 01:05:36 [INFO] ### TDM START ###
2023-05-10 01:07:51 [INFO] MQTT: Subscribed to tele/#, stat/#, cmnd/#, +/tele/#, +/stat/#, +/cmnd/#
2023-05-10 01:07:51 [INFO] DISCOVERY: LWT from an unknown device tele/tasmota_148945/LWT
2023-05-10 01:07:51 [INFO] DISCOVERY: Discovered topic=tasmota_148945 with fulltopic=%prefix%/%topic%/
2023-05-10 01:07:58 [INFO] ### TDM START ###
2023-05-10 01:08:12 [INFO] MQTT: Subscribed to tele/#, stat/#, cmnd/#, +/tele/#, +/stat/#, +/cmnd/#
2023-05-10 01:08:12 [INFO] DISCOVERY: LWT from an unknown device tele/tasmota_148945/LWT
2023-05-10 01:08:12 [INFO] DISCOVERY: Discovered topic=tasmota_148945 with fulltopic=%prefix%/%topic%/
2023-05-10 01:08:23 [INFO] ### TDM START ###
2023-05-10 01:08:51 [INFO] MQTT: Subscribed to tele/#, stat/#, cmnd/#, +/tele/#, +/stat/#, +/cmnd/#
2023-05-10 01:08:51 [INFO] DISCOVERY: LWT from an unknown device tele/tasmota_148945/LWT
2023-05-10 01:08:51 [INFO] DISCOVERY: Discovered topic=tasmota_148945 with fulltopic=%prefix%/%topic%/
2023-05-10 01:08:55 [INFO] ### TDM START ###
2023-05-10 01:09:00 [INFO] MQTT: Subscribed to tele/#, stat/#, cmnd/#, +/tele/#, +/stat/#, +/cmnd/#
2023-05-10 01:09:00 [INFO] DISCOVERY: LWT from an unknown device tele/tasmota_148945/LWT
2023-05-10 01:09:01 [INFO] DISCOVERY: Discovered topic=tasmota_148945 with fulltopic=%prefix%/%topic%/
2023-05-10 01:13:16 [INFO] ### TDM START ###
2023-05-10 01:15:37 [INFO] MQTT: Subscribed to tele/#, stat/#, cmnd/#, +/tele/#, +/stat/#, +/cmnd/#
2023-05-10 01:15:37 [INFO] DISCOVERY: LWT from an unknown device tele/tasmota_148945/LWT
2023-05-10 01:15:37 [INFO] DISCOVERY: Discovered topic=tasmota_148945 with fulltopic=%prefix%/%topic%/
2023-05-10 01:15:53 [INFO] ### TDM START ###
2023-05-10 01:17:14 [INFO] ### TDM START ###
2023-05-10 01:17:49 [INFO] ### TDM START ###
2023-05-10 01:22:04 [INFO] ### TDM START ###
2023-05-10 01:22:19 [INFO] MQTT: Subscribed to tele/#, stat/#, cmnd/#, +/tele/#, +/stat/#, +/cmnd/#
2023-05-10 01:22:19 [INFO] DISCOVERY: LWT from an unknown device tele/tasmota_148945/LWT
2023-05-10 01:22:20 [INFO] DISCOVERY: Discovered topic=tasmota_148945 with fulltopic=%prefix%/%topic%/
2023-05-10 01:30:21 [INFO] ### TDM START ###
2023-05-10 01:30:35 [INFO] MQTT: Subscribed to tele/#, stat/#, cmnd/#, +/tele/#, +/stat/#, +/cmnd/#, cmnd/tasmota_148945/#, cmnd/tasmota_148945/#, cmnd/tasmota_148945/#
2023-05-10 01:30:35 [INFO] DISCOVERY: LWT from an unknown device tele/tasmota_148945/LWT
2023-05-10 01:30:35 [INFO] DISCOVERY: Discovered topic=tasmota_148945 with fulltopic=%prefix%/%topic%/

PS:

I just discovered that tdm creates a folder in my home directory, "TDM".

And I didnt like it. It did that without asking me anything. And I dont like programs creating random folders in my home directory.

I would expect anyway this software to use the standards, that is the XDG standards, https://wiki.archlinux.org/title/XDG_Base_Directory.

Something like

~/.config/tdm/tdm.cfg
~/.local/share/tdm/tdm.log
or
~/.cache/tdm/tdm.log

Was this requested before or is this being considerered ?

@jziolkowski
Copy link
Owner

Hi. Both your issues are fixed with the latest development build. Go to releases and download the built binaries from the develop build.

@jziolkowski
Copy link
Owner

Also +1 for a detailed issue report. However it was posted quite a few times in the past; it's helpful to read past issues sometimes ;) Cheers

@jziolkowski
Copy link
Owner

Ehh, gtihub expired the artifacts. I'll run the build again

@jziolkowski
Copy link
Owner

@ikifar2012
Copy link

Hey @jziolkowski any news on when we can see a stable release of this?

@beren12
Copy link

beren12 commented Sep 30, 2023

Yeah looks like it expired again

@jziolkowski
Copy link
Owner

I've released a dev build to PyPI: https://pypi.org/project/tdmgr/0.2.14.dev35/

@davlaw
Copy link

davlaw commented Jan 27, 2024

Glad I checked in, thanks

@jziolkowski
Copy link
Owner

Fixed with #268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants