Bug 1956023 - Workrave crashes at startup under Wayland
Summary: Workrave crashes at startup under Wayland
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: workrave
Version: 39
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lukas Zapletal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-02 07:27 UTC by Matthew Cline
Modified: 2024-06-12 01:31 UTC (History)
6 users (show)

Fixed In Version: workrave-1.10.51.1-2.fc38 workrave-1.11.0~beta.12-2.fc40 workrave-1.11.0~beta.12-2.fc39
Clone Of:
Environment:
Last Closed: 2024-06-04 03:22:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
gdb stack trace (3.62 KB, text/plain)
2021-05-15 01:18 UTC, Matthew Cline
no flags Details
gdb stacktrace for 1.10.50 (3.77 KB, text/plain)
2022-11-10 05:01 UTC, Gergely Polonkai
no flags Details
Backtrace for version 1.10.50-2.fc38.x86_64 (3.42 KB, text/plain)
2023-05-17 16:17 UTC, Gergely Polonkai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github rcaelers workrave issues 302 0 None open Crash on startup under Wayland 2023-09-06 03:29:13 UTC

Description Matthew Cline 2021-05-02 07:27:51 UTC
When using Plasma desktop (KDE) under Wayland, workrave crashes on startup before having the chance to bring up its window.  It still works fine if X11 is used instead of Wayland.

Comment 1 Matthew Cline 2021-05-15 01:18:28 UTC
Created attachment 1783424 [details]
gdb stack trace

I ran workrave under gdb after installing all of the debug packages, and it showed that the crash happened in xcb_take_socket() in libxcb.  Doing a websearch showed https://github.com/prusa3d/PrusaSlicer/issues/2515, which claims the issue can be solved by setting the env var GDK_BACKEND to "x11", though I haven't tried this yet.

Comment 2 Matthew Cline 2021-05-15 05:43:24 UTC
I've confirmed that setting GDK_BACKEND to "x11" prevents the crash.

Comment 3 Gergely Polonkai 2022-03-08 14:03:01 UTC
The DE doesn’t seem to matter; it happens to me using Sway. Setting GDK_BACKEND to x11 makes it start, but this way it cannot track idle state which is essential for this app.

Comment 4 Ben Cotton 2022-05-12 16:06:18 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Ben Cotton 2022-06-07 23:03:43 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Yaakov Selkowitz 2022-11-04 18:14:24 UTC
Can you still reproduce this with 1.10.50 in Fedora 36/37 testing?

Comment 7 Gergely Polonkai 2022-11-06 06:50:36 UTC
Tried updating it with

dnf upgrade --enablerepo=updates-testing --refresh workrave

but i still have 1.10.49. Any advice on how to upgrade it?

Comment 8 Gergely Polonkai 2022-11-10 05:01:34 UTC
Created attachment 1923484 [details]
gdb stacktrace for 1.10.50

Same error happens, attaching backtrace from F37.

Comment 9 Ben Cotton 2023-04-25 16:42:15 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 10 Gergely Polonkai 2023-05-17 08:21:54 UTC
Still happens on F38 :( Should i attach a fresh backtrace?

Comment 11 Gergely Polonkai 2023-05-17 16:17:02 UTC
Created attachment 1965168 [details]
Backtrace for version 1.10.50-2.fc38.x86_64

Comment 12 Fedora Update System 2023-08-29 03:38:10 UTC
FEDORA-2023-75fcfc9d42 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-75fcfc9d42

Comment 13 Fedora Update System 2023-08-30 02:23:26 UTC
FEDORA-2023-75fcfc9d42 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-75fcfc9d42`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-75fcfc9d42

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Gergely Polonkai 2023-09-06 03:29:14 UTC
I added the upstream issue link.

They have two workarounds: use GDK_BACKEND=x11 which prevents the crash but actually useless (see comment 3 above), and to turn on “Force the use of X11 on Wayland” which doesn’t seem to change anything at all.

Comment 15 Fedora Update System 2023-09-07 01:28:21 UTC
FEDORA-2023-75fcfc9d42 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Gergely Polonkai 2023-09-07 03:40:00 UTC
This issue is not solved. I told in a comment (even though there are workarounds that work with huge limitations), and i even gave negative feedback on Bodhi.

Comment 17 ValdikSS 2024-01-13 22:15:49 UTC
I can confirm that Workrave instantly crashes on Fedora 39 KDE Wayland.
“Force the use of X11 on Wayland” does not help.

Comment 18 ValdikSS 2024-01-15 22:33:19 UTC
By the way, you can still use the program in "reading mode" (in this mode it counts the time regardless of activity), so it's not entirely useless.

Comment 19 ValdikSS 2024-01-16 08:01:49 UTC
Another workaround is go to Settings → Applications → Legacy X11 app support and enable any option, for example "Only meta, control, alt, and shift keys".

Comment 20 ValdikSS 2024-01-16 19:52:32 UTC
The developer has fixed the crash in git main branch: https://github.com/rcaelers/workrave/commit/f67805a094748af8f987ca7171ac1845482c8e0c
And added ext-idle-notify-v1 Wayland protocol support: https://github.com/rcaelers/workrave/commit/ce6f6764ed5526f8159b2b48853befdc007af0fd

Meta-issue: https://github.com/rcaelers/workrave/issues/523

Comment 21 Aoife Moloney 2024-05-07 15:43:45 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 22 Aoife Moloney 2024-05-21 14:12:06 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 23 Gergely Polonkai 2024-05-23 19:48:05 UTC
Still exists in Fedora 39 (will test it for F40 within a week).

Comment 24 ValdikSS 2024-05-30 23:06:12 UTC
Still the issue on F40.
https://github.com/rcaelers/workrave/issues/547

Comment 25 Fedora Update System 2024-05-31 05:45:05 UTC
FEDORA-2024-21363fbd13 (workrave-1.11.0~beta.12-1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-21363fbd13

Comment 26 Fedora Update System 2024-06-01 01:53:55 UTC
FEDORA-2024-4080a49616 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-4080a49616`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-4080a49616

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 27 ValdikSS 2024-06-01 03:11:45 UTC
Grabbed .src from the link above and rebuilt it for F39. Segfaults upon starting.

    Breakpoint 1 at 0x5555556cfd25: file /usr/include/c++/13/bits/shared_ptr_base.h, line 1665.
    (gdb) bt
    #0  UnixInputMonitorFactory::create_monitor (this=0x5555558343c0, capability=<optimized out>) at /usr/include/c++/13/bits/shared_ptr_base.h:1665
    #1  0x000055555569ef92 in workrave::input_monitor::InputMonitorFactory::create_monitor (capability=workrave::input_monitor::MonitorCapability::Activity)
        at /usr/src/debug/workrave-1.11.0~beta.12-1.fc39.x86_64/libs/input-monitor/src/InputMonitorFactory.cc:61
    #2  LocalActivityMonitor::LocalActivityMonitor (this=0x555555826330) at /usr/src/debug/workrave-1.11.0~beta.12-1.fc39.x86_64/libs/core/src/LocalActivityMonitor.cc:42
    #3  std::_Construct<LocalActivityMonitor> (__p=0x555555826330) at /usr/include/c++/13/bits/stl_construct.h:119
    #4  std::allocator_traits<std::allocator<void> >::construct<LocalActivityMonitor> (__p=0x555555826330) at /usr/include/c++/13/bits/alloc_traits.h:661
    #5  std::_Sp_counted_ptr_inplace<LocalActivityMonitor, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<void>) (__a=..., this=0x555555826320)
        at /usr/include/c++/13/bits/shared_ptr_base.h:604
    #6  std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<LocalActivityMonitor, std::allocator<void>>(LocalActivityMonitor*&, std::_Sp_alloc_shared_tag<std::allocator<void> >)
        (__a=..., __p=<optimized out>, this=<optimized out>) at /usr/include/c++/13/bits/shared_ptr_base.h:971
    #7  std::__shared_ptr<LocalActivityMonitor, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>>(std::_Sp_alloc_shared_tag<std::allocator<void> >) (__tag=..., this=<optimized out>)
        at /usr/include/c++/13/bits/shared_ptr_base.h:1712
    #8  std::shared_ptr<LocalActivityMonitor>::shared_ptr<std::allocator<void>>(std::_Sp_alloc_shared_tag<std::allocator<void> >) (__tag=..., this=<optimized out>) at /usr/include/c++/13/bits/shared_ptr.h:464
    #9  std::make_shared<LocalActivityMonitor> () at /usr/include/c++/13/bits/shared_ptr.h:1010
    #10 Core::init_monitor (this=0x555555835040, display_name=<optimized out>) at /usr/src/debug/workrave-1.11.0~beta.12-1.fc39.x86_64/libs/core/src/Core.cc:184
    #11 0x000055555569111a in Core::init (this=this@entry=0x555555835040, argc=<optimized out>, argv=<optimized out>, app=app@entry=0x5555557bf600, display_name=0x7fffffffea52 "wayland-0")
        at /usr/src/debug/workrave-1.11.0~beta.12-1.fc39.x86_64/libs/core/src/Core.cc:136
    #12 0x000055555560edcb in Application::init_core (this=0x5555557bf600) at /usr/src/debug/workrave-1.11.0~beta.12-1.fc39.x86_64/ui/app/Application.cc:261
    #13 0x00005555556012ed in Application::main (this=this@entry=0x5555557bf600) at /usr/src/debug/workrave-1.11.0~beta.12-1.fc39.x86_64/ui/app/Application.cc:97
    #14 0x0000555555603a2d in run (argv=<optimized out>, argc=1) at /usr/src/debug/workrave-1.11.0~beta.12-1.fc39.x86_64/ui/app/main.cc:118
    #15 main (argc=1, argv=<optimized out>) at /usr/src/debug/workrave-1.11.0~beta.12-1.fc39.x86_64/ui/app/main.cc:128


Exactly as stated here: https://github.com/rcaelers/workrave/issues/523#issuecomment-2038323700

Solution: build with -DHAVE_WAYLAND:BOOL=TRUE (currently it's built with -DWITH_WAYLAND:BOOL=ON, WITH vs HAVE).

Rebuilding with both options fixed the issue.

Comment 28 Yaakov Selkowitz 2024-06-02 21:45:22 UTC
Please try again with -2.

Comment 29 ValdikSS 2024-06-02 22:06:46 UTC
(In reply to Yaakov Selkowitz from comment #28)
> Please try again with -2.

2 works. Thanks!

Comment 30 Fedora Update System 2024-06-03 02:12:54 UTC
FEDORA-2024-422c69af73 (workrave-1.11.0~beta.12-2.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-422c69af73

Comment 31 Fedora Update System 2024-06-04 01:06:16 UTC
FEDORA-2024-422c69af73 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-422c69af73`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-422c69af73

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 32 Fedora Update System 2024-06-04 03:22:01 UTC
FEDORA-2024-4080a49616 (workrave-1.11.0~beta.12-2.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 33 ValdikSS 2024-06-05 09:52:30 UTC
(In reply to Yaakov Selkowitz from comment #28)
> Please try again with -2.

The -2 version seems to lose the activity detection upon suspend/resume cycle. The application needs to be restarted to make it count down again.
This doesn't happen on my self-compiled version. I assume you haven't cherry-picked some of the essential patch.

Comment 34 Gergely Polonkai 2024-06-05 10:32:14 UTC
App now starts on Fedora 40 (workrave-1.11.0~beta.12-2.fc40.x86_64), although activity tracking doesn’t seem to work on wlroot (Sway, to be more specific), only if i move my mouse within the workrave floating window.

Comment 35 Fedora Update System 2024-06-12 01:31:40 UTC
FEDORA-2024-422c69af73 (workrave-1.11.0~beta.12-2.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.