Sublime Forum

Sublime Text 4 freezes on monitor layout change

#1

Whenever the monitor layout changes (insert/remove Notebook into/from docking station), some Sublime Text windows freeze and about the lower third of the frozen window is either black or shows the desktop wallpaper (even if there are other windows behind it). The issue has been there for quite some time and Sublime Text is the only application that shows it.

Sublime Text 4 (installed from AUR) on Manjaro Linux with KDE Plasma desktop.

Any idea what might be the issue? Or where I could start looking?

Edit:
Changing the option hardware_acceleration frome none to opengl causes sublime text to crash instead of the freeze.

0 Likes

#2

Are you using X11 or Wayland?

0 Likes

#3

I’m using X11.

0 Likes

#4

Does it still happen if you use wayland?

0 Likes

#5

I’ve tried it and temporarily switched to Wayland and it did not happen there.

0 Likes

#6

This is likely a bug with KDE or GTK then. You could try attaching a debugger with opengl enabled and see where it crashed.

0 Likes

#7

How can I do that?

0 Likes

#8

With gdb installed you can run gdb --args /opt/sublime_text/sublime_text --multiinstance --debug. When the prompt appears type r to run Sublime Text. When the crash happens you can type bt into the prompt to get a backtrace.

1 Like

#9

I did not get it to reproduce reliably at first. I have two external screens connected to the notebook (with the notebook screen off), the first one and the notebook have the same resolution, the second screen has a different one. It seems that the problem only occurs when I have a Sublime Text window on this second screen.

Here is the backtrace (although it “just” froze even with the opengl option).

Is this an issue with GTK then?

Thread 1 "sublime_text" received signal SIGSEGV, Segmentation fault.
0x00007ffff6326402 in cairo_surface_unmap_image () from /usr/lib/libcairo.so
(gdb) bt
#0  0x00007ffff6326402 in cairo_surface_unmap_image () at /usr/lib/libcairo.so
#1  0x00007ffff5b26a6a in gdk_gl_texture_from_surface (surface=0x7ffff63bc040, region=0x7fffbe24a4a0)
    at ../gtk/gdk/gdkgl.c:809
#2  0x00007ffff5b30e5a in gdk_window_end_paint_internal (window=window@entry=0x7fffeee90500)
    at ../gtk/gdk/gdkwindow.c:3060
#3  0x00007ffff5b30f77 in gdk_window_end_draw_frame (context=0x7fffd7b5c1f0, window=0x7fffeee90500)
    at ../gtk/gdk/gdkwindow.c:3311
#4  gdk_window_end_draw_frame (window=0x7fffeee90500, context=0x7fffd7b5c1f0) at ../gtk/gdk/gdkwindow.c:3294
#5  0x00007ffff515991b in gtk_main_do_event (event=0x7fffffffd1b0) at ../gtk/gtk/gtkmain.c:1844
#6  gtk_main_do_event (event=<optimized out>) at ../gtk/gtk/gtkmain.c:1691
#7  0x00007ffff5b1bb87 in _gdk_event_emit (event=0x7fffffffd1b0) at ../gtk/gdk/gdkevents.c:73
#8  _gdk_event_emit (event=0x7fffffffd1b0) at ../gtk/gdk/gdkevents.c:67
#9  0x00007ffff5b2d982 in _gdk_window_process_updates_recurse_helper
    (window=0x7fffeee90500, expose_region=<optimized out>) at ../gtk/gdk/gdkwindow.c:3874
#10 0x00007ffff5b31fd8 in gdk_window_process_updates_internal (window=0x7fffeee90500)
    at ../gtk/gdk/gdkwindow.c:4020
#11 0x00007ffff5b321f5 in gdk_window_process_updates_with_mode
    (recurse_mode=<optimized out>, window=<optimized out>) at ../gtk/gdk/gdkwindow.c:4215
#12 gdk_window_process_updates_with_mode (window=<optimized out>, recurse_mode=<optimized out>)
    at ../gtk/gdk/gdkwindow.c:4186
#13 0x00007ffff7f45b73 in  () at /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff7f45c77 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#15 0x00007ffff7f45d34 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff5b28e69 in _gdk_frame_clock_emit_paint (frame_clock=0x7fffef0680f0)
    at ../gtk/gdk/gdkframeclock.c:657
#17 gdk_frame_clock_paint_idle (data=0x7fffef0680f0) at ../gtk/gdk/gdkframeclockidle.c:597
#18 0x00007ffff5b156ae in gdk_threads_dispatch (data=0x7fffbe253240) at ../gtk/gdk/gdk.c:769
#19 0x00007ffff7e2139e in  () at /usr/lib/libglib-2.0.so.0
#20 0x00007ffff7e1ff19 in  () at /usr/lib/libglib-2.0.so.0
#21 0x00007ffff7e7e2b7 in  () at /usr/lib/libglib-2.0.so.0
#22 0x00007ffff7e20b47 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#23 0x00007ffff5156f6f in gtk_main () at ../gtk/gtk/gtkmain.c:1329
#24 0x0000555555b1eacb in  ()
#25 0x0000555555952d15 in  ()
#26 0x00007ffff794ecd0 in __libc_start_call_main
    (main=main@entry=0x55555594f61b, argc=argc@entry=3, argv=argv@entry=0x7fffffffe138)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#27 0x00007ffff794ed8a in __libc_start_main_impl
    (main=0x55555594f61b, argc=3, argv=0x7fffffffe138, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe128) at ../csu/libc-start.c:360
#28 0x00005555558a623a in  ()

0 Likes

#10

That certainly looks like a GTK issue. What exact version of GTK3 are you using?

0 Likes

#11

My GTK3 version is 1:3.24.38-1

I guess I’ll report it to GTK then. Thank you for your help.

0 Likes