KDAB / Charm

The Cross-Platform Time Tracker
GNU General Public License v2.0
194 stars 70 forks source link

Fix a crash on Wayland #361

Closed zzag closed 3 years ago

zzag commented 4 years ago

X11IdleDetector should be created only if it's X11, otherwise Charm will crash in X11IdleDetector::checkIdleness().

On Wayland, unfortunately, there is no any standardized way to get notified when the user is idle. KWin has a protocol for that purpose but it's proprietary.

caybro commented 4 years ago

Still makes charm crash under wayland for me :/

bam80 commented 4 years ago

Interestingly I have that Idle check tick disabled and still get crash.

zzag commented 4 years ago

Still makes charm crash under wayland for me :/

Do you have a backtrace?

bam80 commented 3 years ago

According to recent Readme update this project is no longer supported, thus no hope for the MR merge. What I would suggest is to publish the build on Flathub, if we are still going to use it. Any thoughts?

bam80 commented 3 years ago

Still crashes for me too, running with QT_QPA_PLATFORM=xcb in Wayland session. Idle check tick is disabled:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000477409 in X11IdleDetector::checkIdleness (this=0x222b960) at /var/home/bam/timetracker~/Charm/Charm/Idle/X11IdleDetector.cpp:61
61      const int idleSecs = info->ms_since_user_input / 1000;

For some reason can't run on Wayland natively any more:


$  ~/timetracker~/Charm/Charm/charmtimetracker
The Wayland connection experienced a fatal error: Protocol error
Aborted (core dumped)

Program terminated with signal SIGABRT, Aborted.
#0  0x00007f17ab8ae9d5 in raise () from /lib64/libc.so.6