spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.39k stars 3.08k forks source link

"Extra" electrum window remains open until machine reboots #9126

Open ln2max opened 3 months ago

ln2max commented 3 months ago

After using Electrum for a while (with a number of wallets open, etc), an "extra" window appears in the background: extra_electrum_window

This window remains open (and cannot be closed) until the machine reboots. Closing the other Electrum windows does not affect this window.

This window remains open even when there is no Electrum process visible in ps auxww.

I am using Electrum on Debian 12.6 (Whonix 17).

ecdsa commented 3 months ago

are you using any plugin?

ln2max commented 3 months ago

are you using any plugin?

Nothing aftermarket. In the "Electrum Plugins" dialog, only the "2-Factor Authentication" box is checked, and it's greyed out so I can't turn it off.

I am using Electrum 4.5.5 but this issue has been on-going for a very long time, across many versions.

ecdsa commented 3 months ago

@ln2max what is your Qt version? you can see it in the log of Electrum, the line should look like this 0.80 | I | gui.qt.ElectrumGui | Qt GUI starting up... Qt=5.15.3, PyQt=5.15.6

ln2max commented 3 months ago
  2.48 | I | gui.qt.ElectrumGui | Qt GUI starting up... Qt=5.15.2, PyQt=5.15.10

I am using the Electrum 4.5.5 AppImage.

accumulator commented 3 months ago

Do you use any hardware wallets? The hardware wallet plugins are spawning new windows each in their own way, to request passphrases, PIN codes, unlock matrix etc, so there could be one that's not cleaning up fully in certain cases.

ln2max commented 3 months ago

I do use a Trezor hardware wallet. Many of the Electrum wallets I use are not linked to a hardware wallet, because they handle small transactions and don't accrue a significant balance. The issue appears even if I only use Electrum wallets which are non-hardware-wallet linked.

I can't rule out that a hardware-wallet linked wallet is never opened (e.g by default when opening Electrum, it opens the last-used wallet)

But I can definitely rule out a connection between performing hardware wallet operations (signing transactions) and this issue appearing.

accumulator commented 3 months ago

This window remains open even when there is no Electrum process visible in ps auxww.

If there's no Electrum process remaining, it cannot be the cause of the window. I suspect another process is triggered by e.g. you hitting some global hotkey when you use electrum.

you might get more info which process is associated with the window by using xprop

ln2max commented 3 months ago

Electrum is definitely the cause of the window. I run Electrum in a dedicated virtual machine. Nothing else runs in this VM except Electrum. The window only appears after using Electrum extensively. The window has been appearing for years, always after using Electrum. It is not a one-off "I hit the wrong key by mistake" situation.

ln2max commented 3 months ago

The window just appeared now, after a transaction confirmation. xprop does not reveal much at all -- the available information is very sparse. Other windows return extensive information in xprop, but this window returns almost nothing.

But the timing of the window is very near to the transaction confirmation pop-up. The way it appeared makes me think it is very likely related to the Electrum notification.

Probably it is an interaction between the notification and the VM, since I am running Electrum in a VM.

ln2max commented 3 months ago

The window also has an "electrum" entry in the taskbar... I should have mentioned that. Clicking the relevant "electrum" entry shifts the window to the foreground. So it is definitely connected to Electrum.

Note that normal Electrum windows show as "Electrum 4.5.5" in the taskbar. This window merely shows as "electrum".

accumulator commented 3 months ago

But the timing of the window is very near to the transaction confirmation pop-up. The way it appeared makes me think it is very likely related to the Electrum notification.

Indeed.

I'm not deeply familiar with the desktop-notification spec. As it seems to be a virtual package in Debian, there's many implementations, depending on desktop environment. Also, around the time of Debian 12 I believe there was less mature wayland support, maybe that is a factor as well.

ln2max commented 3 months ago

Electrum is the only application that does this. I run other applications inside VMs as well, but they do not display this behaviour. And I run the AppImage version of Electrum.

Therefore the issue is likely related to the specific pathway Electrum uses for showing notifications.

SomberNight commented 3 months ago

See maybe https://github.com/spesmilo/electrum/issues/3956

ln2max commented 3 months ago

The fix suggested there is a 2 year old commit: https://github.com/spesmilo/electrum/commit/57ec9612cb3395bfc1237c56efb3c3fdb144145f

I am using the newest version of Electrum. I assume this commit has long since been incorporated into the current release.