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

SIGSEGV when monitor is powered off #606

Open
wojnilowicz opened this issue Mar 9, 2025 · 1 comment
Open

SIGSEGV when monitor is powered off #606

wojnilowicz opened this issue Mar 9, 2025 · 1 comment

Comments

@wojnilowicz
Copy link
Contributor

Describe the bug
Frequent "systemd-coredump[188657]: [🡕] Process 188425 (workrave) of user 1000 dumped core." when analyzing journalctl.

To Reproduce
Steps to reproduce the behavior:

  1. Start workrave
  2. Call swaymsg "output * power off" from the terminal. In my case it's called automatically after some idle period.
  3. A coredump can be observed either immediately, after 5 minutes or even after 15 minutes

Expected behavior
No coredump.

Screenshots
Not applicable.

** Linux (please complete the following information in case you encountered the bug on Linux):**

  • Distribution: Fedora
  • Distribution Version: 41
  • Desktop Environment: Sway 1.10
  • Workrave Version 1.11.0~beta.13
  • Nouveau

Additional context

  1. "Force the use of X11 on Wayland" unchecked.
  2. Running in quiet mode, no screen blocking or reminders.
  3. It's a laptop with external monitor connected through HDMI. The laptop monitor is always disabled.
#0  0x00007f4397746355 in Gdk::Monitor::is_primary() const () at /lib64/libgdkmm-3.0.so.1
#1  0x00005626bd131fca in Toolkit::get_head_info (this=0x5626ed280b00, screen_index=<optimized out>) at /usr/include/glibmm-2.4/glibmm/refptr.h:259
#2  0x00005626bd11e202 in MainWindow::convert_monitor_to_display
    (this=0x5626ed5fba00, x=<synthetic pointer>: <optimized out>, y=<synthetic pointer>: <optimized out>, head=0)
    at /usr/src/debug/workrave-1.11.0~beta.13-2.fc41.x86_64/ui/app/toolkits/gtkmm/MainWindow.cc:383
@wojnilowicz
Copy link
Contributor Author

It seems to crash at the 155 line

HeadInfo
Toolkit::get_head_info(int screen_index) const
{
Glib::RefPtr<Gdk::Display> display = Gdk::Display::get_default();
Glib::RefPtr<Gdk::Monitor> monitor = display->get_monitor(screen_index);
HeadInfo head;
head.primary = monitor->is_primary();
head.monitor = monitor;

Both get_default and get_monitor from the 151 and 152 line could return nullptr as seen here and here. Current code is not prepared to handle that, and we seem to have such case with the "monitor" pointer.

Could you fix that?

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

1 participant