Sublime Forum

Sublime Text crashes after the monitor is powered off

#1

Hi guys! Sublime Text 4 crashes for me every time my monitor is powered off and then back on, no matter if I turn off the power with the power button or if it happens by OS’s power manager’s wish.

$ subl --version
Sublime Text Build 4169

$ uname -a
Linux s0me0ne 6.5.13-7-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Dec 20 07:15:58 UTC 2023 x86_64 GNU/Linux

$ pacman -Q nvidia
linux65-nvidia 545.29.06-13

Currently, I’m using Plasma with X11, but that also happened to me on Ubuntu, with different kernel versions, and under XFCE environment. Also, I recently upgraded my hardware, replacing nearly everything, including the motherboard and GPU, but the problem persists. However, I don’t have such a problem on my laptop running Plasma with Wayland.

GDB backtrace of the latest crash follows:

Core was generated by `/usr/bin/subl --detached'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f8fa092c402 in cairo_surface_unmap_image () from /usr/lib/libcairo.so
[Current thread is 1 (Thread 0x7f8fa1ddbfc0 (LWP 18223))]
(gdb) bt
#0  0x00007f8fa092c402 in cairo_surface_unmap_image () at /usr/lib/libcairo.so
#1  0x00007f8fa012cbfa in  () at /usr/lib/libgdk-3.so
#2  0x00007f8fa0135fda in  () at /usr/lib/libgdk-3.so
#3  0x00007f8fa01360f7 in gdk_window_end_draw_frame () at /usr/lib/libgdk-3.so
#4  0x00007f8f9f5efc8b in gtk_main_do_event () at /usr/lib/libgtk-3.so
#5  0x00007f8fa0120b77 in  () at /usr/lib/libgdk-3.so
#6  0x00007f8fa0132b02 in  () at /usr/lib/libgdk-3.so
#7  0x00007f8fa0137158 in  () at /usr/lib/libgdk-3.so
#8  0x00007f8fa0137375 in  () at /usr/lib/libgdk-3.so
#9  0x00007f8fa25c8b73 in  () at /usr/lib/libgobject-2.0.so.0
#10 0x00007f8fa25c8c77 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#11 0x00007f8fa25c8d34 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#12 0x00007f8fa012dfe9 in  () at /usr/lib/libgdk-3.so
#13 0x00007f8fa011a69e in  () at /usr/lib/libgdk-3.so
#14 0x00007f8fa24a43ee in  () at /usr/lib/libglib-2.0.so.0
#15 0x00007f8fa24a2f69 in  () at /usr/lib/libglib-2.0.so.0
#16 0x00007f8fa2501367 in  () at /usr/lib/libglib-2.0.so.0
#17 0x00007f8fa24a3b97 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#18 0x00007f8f9f5ed2df in gtk_main () at /usr/lib/libgtk-3.so
#19 0x0000559be0526abe in  ()
#20 0x0000559be033d66d in  ()
#21 0x00007f8fa1fd1cd0 in  () at /usr/lib/libc.so.6
#22 0x00007f8fa1fd1d8a in __libc_start_main () at /usr/lib/libc.so.6
#23 0x0000559be02bf91a in  ()

I’d appreciate any help with the issue.

0 Likes

#2

As you can see from the backtrace it’s crashing within gtk/gdk. Since these crashes aren’t happening for all users and not under Wayland that’s a strong indication this is a bug with gtk/gdk. I suggest submitting this crash to the GTK issue tracker: https://gitlab.gnome.org/GNOME/gtk/-/issues.

0 Likes

#3

I do agree it has something to do with Cairo or GTK itself, but given that Sublime is the only GTK application crashing in this scenario (and I run a lot of them), I was hoping to get some piece of wisdom from the Sublime community that is much more responsive than GTK guys :slight_smile:

I wouldn’t waste time filing a GTK issue with only a little chance my grandchildren will see it fixed. Especially given I don’t have any grandchildren :man_shrugging: If I’m the only one affected, I’d better try to debug it myself some weekend.

0 Likes