nicotine-plus / nicotine-plus

Graphical client for the Soulseek peer-to-peer network

Home Page:https://nicotine-plus.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nictotine Hard fail trying to get pointer

oniGino opened this issue · comments

commented

Nicotine+ version:
3.2.9
Operating System/Distribution:
Gentoo

Describe the bug

On start



Nicotine+ Version: 3.2.9
GTK Version: 
Python Version: 3.11.8 (main, Feb 22 2024, 14:54:46) [GCC 13.2.1 20240113]

Type: <class 'TypeError'>
Value: constructor returned NULL
Traceback:   File "/usr/lib/python3.11/site-packages/pynicotine/gtkgui/application.py", line 107, in on_activate
    from pynicotine.gtkgui.frame import NicotineFrame
  File "/usr/lib/python3.11/site-packages/pynicotine/gtkgui/frame.py", line 36, in <module>
    from pynicotine.gtkgui.chatrooms import ChatRooms
  File "/usr/lib/python3.11/site-packages/pynicotine/gtkgui/chatrooms.py", line 41, in <module>
    from pynicotine.gtkgui.popovers.roomwall import RoomWall
  File "/usr/lib/python3.11/site-packages/pynicotine/gtkgui/popovers/roomwall.py", line 23, in <module>
    from pynicotine.gtkgui.widgets.textview import TextView
  File "/usr/lib/python3.11/site-packages/pynicotine/gtkgui/widgets/textview.py", line 35, in <module>
    class TextView:
  File "/usr/lib/python3.11/site-packages/pynicotine/gtkgui/widgets/textview.py", line 41, in TextView
    POINTER_CURSOR = Gdk.Cursor.new_from_name(Gdk.Display.get_default(), "pointer")
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This used to work fine..
I run SwayWM Wayland, i have other gtk/gdk apps that work just fine

x11-libs/gtk+-3.24.39
dev-python/pygobject-3.46.0
commented

Upgraded to 3.3.2 now I get

Nicotine+ has encountered a critical error and needs to exit. Please copy the following message and include it in a bug report:

Nicotine+ Version: 3.2.9
GTK Version: 
Python Version: 3.11.8 (main, Feb 22 2024, 14:54:46) [GCC 13.2.1 20240113]

Type: <class 'ModuleNotFoundError'>
Value: No module named 'pynicotine.gtkgui.frame'
Traceback:   File "/usr/lib/python3.11/site-packages/pynicotine/gtkgui/application.py", line 107, in on_activate
    ("user-status", self.on_user_status)

I have gtk4 installed

There is nothing wrong with your cursor theme, the error indicates whereby GTK cannot load because it cannot find a valid display to output to. It is a duplicate bug report and has been reported before...

Something went wrong with the upgrade, there is a mix of files between the two versions, because the frame module no longer exists in 3.3.x.

commented

well i'm pretty sure i only have 3.3.2 files installed, but yeah baffled by the error message, it does say 3.2.9, i cannot seem to trace where the frame call is coming from

commented
NICOTINE_GTK_VERSION=3 nicotine
[2024-03-15 00:53:22] Loading Python 3.11.8
[2024-03-15 00:53:22] Loading Nicotine+ 3.3.2
[2024-03-15 00:53:22] Loading GTK 3.24.39
  NICOTINE_GTK_VERSION=4 nicotine
[2024-03-15 00:53:27] Loading Python 3.11.8
[2024-03-15 00:53:27] Loading Nicotine+ 3.3.2
[2024-03-15 00:53:27] Loading GTK 4.12.4

same error on both GTK versions, cursor theme is Adwaita so thats the default

commented

Could you verify that no old instances of Nicotine+ are running in the background? Also try a system restart.

commented

Ah Ha! yes a lone thread was still running, after i killed it everything was fine. thanks!

So how can the packaging instantiation be improved to avoid this erroneous situation happening to others on first run after upgrade?

Can you replicate the bug by reverting back and then upgrading again, then perhaps capturing the full execution path of the lone thread as displayed in htop or whatever tool you use to kill it?

commented

So how can the packaging instantiation be improved to avoid this erroneous situation happening to others on first run after upgrade?

detect when a process is already running, and verify its from the same version / release?

There is no such mechanism to communicate that information between threads, afaik. I suppose it must be a bug in 3.2.9 that causes the hanging thread on exit, for which there is unlikely to be any sort of mitigation.

We should at least verify that the same thing won't happen during the next upgrade version release.

commented

There is no such mechanism to communicate that information between threads, afaik. I suppose it must be a bug in 3.2.9 that causes the hanging thread on exit.

possibly, on my UI in 3.2.9 I had the earlier error reported above and no tray icon, so I didn't think it was already running. then I upgraded and couldn't get the app to start. So I dunno IMHO this is a very narrow corner case I'm not sure if its worth your time. a "did you reboot?" would have fixed this one

a "did you reboot?" would have fixed this one

This is not really an acceptable solution for *nix based systems, because they may be serving a mission critical application.

Can you try installing 3.3.3.dev2 and see if upgrades/downgrades goes smoothly? link:
https://github.com/nicotine-plus/nicotine-plus/blob/master/doc/TESTING.md