Sublime Forum

Broken window in KDE Plasma 5

#1

After some update in Plasma 5, sublime started breaking. When I run sublime, it all works fine in the beginning, but then at some point it breaks and every sublime window starts looking like the screenshot below. Looks like it’s likely a problem with sublime as this doesn’t happen with any other application.

Is there a way I can debug this, like look at some sublime logs?

I am on Linux, installed sublime from source using the tarball. KDE Plasma version 5.27.10

0 Likes

#2

Are you using hardware acceleration? Does it happen in safe mode?

0 Likes

#4

Thanks for suggestion. Safe mode works fine. I wiped the cache in my installation of sublime (~/.cache/sublime-text and ~/.config/sublime-text), but the problem still happens. Any tips what might be the reason and what are other differences with safe mode?

0 Likes

#5

Do you have hardware acceleration enabled in your settings?

0 Likes

#6

No, hardware_acceleration is set to none in settings

0 Likes

#7

Does it also happen in other GTK-based applications?

0 Likes

#8

I haven’t seen this happen in any other application. I also tried GIMP as it seems to be GTK-based, but it behaves properly.

Additional info: It looks like the problem happens after wake up from suspend. There seems to be some ‘resizing’ happening on wake up - I have seen other applications automatically ‘resizing’ from the crop size on the picture to full screen, but it takes them a second at most, rather than getting stuck and unresponsive like sublime. It might also be related to having an external monitor connected.

I also tried using hardware_accelaration: opengl and then sublime crashes and closes after wake up from suspend.

Since safe mode seemed to work correctly, what would be the differences between a fresh install of sublime with no local cache and safe mode?

0 Likes

#9

GIMP uses older versions of GTK, I’d try gedit, gnome-calculator or gnome-terminal.

what would be the differences between a fresh install of sublime with no local cache and safe mode?

There is no difference between fully reverting to a freshly installed state and safe mode.

0 Likes

#10

Tried gnome-calculator, it works alright too. sublime is the only application where I have observed this

It’s very strange that it doesn’t happen in safe mode, but happens with a freshly installed state. Are there any logs I could check that would give us further information what causes the problem?

0 Likes

#11

There are no logs for rendering, the only extra thing you could enable is G_MESSAGES_DEBUG=all for getting logs from GTK.

0 Likes

#12

This is very strange. I did some extensive testing and whatever I do, it eventually happens in normal mode, but never happens in safe mode.

Could it be something related to handling the cached data by normal mode, which effectively doesn’t happen in safe mode since the state is not preserved between different launches of the program.

0 Likes

#13

It looks like the above is the exact reason. I continued with my testing, here are the results:

  1. Safe mode - problem never happens
  2. Normal mode, clean install, ~/.cache/sublime-text and ~/.config/sublime-text cleaned up, just open up several windows, no settings changed - problem doesn’t happen
  3. Same as 2, but I close sublime and reopen it (so now ~/.config/sublime-text is populated only with data about the windows I opened in 2 and nothing else) - problem happens
0 Likes

#14

Do you see anything suspicious logged when running G_MESSAGES_DEBUG=all subl --multiinstance --debug?

0 Likes

#15

Nothing strange. Nothing gets logged when the windows break down. Here’s the entire log:

niko@dell-xps15: ~ $ G_MESSAGES_DEBUG=all sublime --multiinstance --debug
(sublime:5390): GLib-DEBUG: 13:14:50.076: unsetenv() is not thread-safe and should not be used after threads are created
(sublime:5390): GLib-GIO-DEBUG: 13:14:50.092: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(sublime:5390): GLib-DEBUG: 13:14:50.095: unsetenv() is not thread-safe and should not be used after threads are created
(sublime:5390): Gtk-DEBUG: 13:14:50.095: Connecting to session manager
(sublime:5390): Gtk-DEBUG: 13:14:50.095: Failed to get the GNOME session proxy: The name org.gnome.SessionManager is not owned
(sublime:5390): Gtk-DEBUG: 13:14:50.096: Failed to get the Xfce session proxy: The name org.xfce.SessionManager is not owned
(sublime:5390): GLib-GIO-DEBUG: 13:14:50.112: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
:0                                                                startup, version: 4169 linux x64 channel: stable
:0                                                                executable: /opt/sublime_text/sublime_text
:0                                                                application: /opt/sublime_text
:0                                                                working dir: /home/niko
:0                                                                packages path: /home/niko/.config/sublime-text/Packages
:0                                                                state path: /home/niko/.config/sublime-text/Local
:0                                                                zip path: /opt/sublime_text/Packages
:0                                                                zip path: /home/niko/.config/sublime-text/Installed Packages
:0                                                                ignored_packages: ["Advanced CSV", "CMake", "LSP", "LSP-copilot", "Theme - Monokai Pro", "Vintage", "Visual Studio Code Plus Scheme"]
(sublime:5390): GLib-GIO-DEBUG: 13:14:50.284: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
(sublime:5390): dconf-DEBUG: 13:14:50.284: watch_fast: "/org/gnome/desktop/interface/" (establishing: 0, active: 0)
(sublime:5390): dconf-DEBUG: 13:14:50.285: watch_established: "/org/gnome/desktop/interface/" (establishing: 1)
(sublime:5390): Gtk-DEBUG: 13:14:50.310: State 4 for context 0x7fd1657da660 doesn't match state 128 set via gtk_style_context_set_state ()
:0                                                                pre session restore time: 0.296714
:0                                                                git: using configuration from system git install
:0                                                                startup time: 0.975644
:0                                                                git: tracking working dir /home/niko/Workspace/linuxconf
:0                                                                Unable to find cancel_build command: exec
:0                                                                Unable to find cancel_build command: exec
:0                                                                Unable to find cancel_build command: exec
:0                                                                Unable to find cancel_build command: exec
:0                                                                Unable to find cancel_build command: exec
:0                                                                Unable to find cancel_build command: exec
:0                                                                first paint time: 1.33549
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading python 3.3 plugin Python Breakpoints.PythonBreakpoints
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading python 3.3 plugin SideBarEnhancements.SideBar
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading python 3.3 plugin SideBarEnhancements.SideBarAPI
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading python 3.3 plugin SideBarEnhancements.SideBarDefaultDisable
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin Package Control.plugin
:0                                                                git: tracking working dir /home/niko/Workspace/bzl-base
:0                                                                git: tracking working dir /home/niko/Workspace/resume-cv/cv
:0                                                                Unknown refs form in packed-refs: refs/replace/00c291dc3e78b4ac765fc6f746a0d9d1342d37f8
:0                                                                Unknown refs form in packed-refs: refs/replace/14b3147fdc580fa28a1a5c45da8970c590b075f8
:0                                                                Unknown refs form in packed-refs: refs/replace/16d962232980741766718ce3a0d9817ba0dba3c1
:0                                                                Unknown refs form in packed-refs: refs/replace/18d11a8bd214e80a96e9bafaa12bcb9e9455adc2
:0                                                                Unknown refs form in packed-refs: refs/replace/1920ffc1f464be69dce177cb07ba43712cc5582e
:0                                                                Unknown refs form in packed-refs: refs/replace/1d9ab3717665ecc601690c6febb7ffaf1d7d03ad
:0                                                                Unknown refs form in packed-refs: refs/replace/1e0a92773a22fe10473c1c0cbfd3682669cdfd21
:0                                                                Unknown refs form in packed-refs: refs/replace/1f1577448b9cb115d7293b1810d2a6254cbe9c4c
:0                                                                Unknown refs form in packed-refs: refs/replace/1fe4f2adeb20c1f2faee947d02e8d52f9b6641f2
:0                                                                Unknown refs form in packed-refs: refs/replace/228f8ad177fa37f29e6b18258917f2b73ceb8140
:0                                                                Unknown refs form in packed-refs: refs/replace/25fc633e3dfe7b9aa8e548e45ffd5fdb47514e32
:0                                                                Unknown refs form in packed-refs: refs/replace/2de9457f46c7481122efcd7fa1fbcccaff262c5d
:0                                                                Unknown refs form in packed-refs: refs/replace/3b60aa0b69de5c4e92920311f970f2011dcbb49e
:0                                                                Unknown refs form in packed-refs: refs/replace/3ce41acfc82a6d5654d9f2e6115d74b96c6da1f4
:0                                                                Unknown refs form in packed-refs: refs/replace/3f6d0b9a83e0733cc88cbccbbe0d08ced1dc1e27
:0                                                                Unknown refs form in packed-refs: refs/replace/4300f65d8fd6bf0de9bb2d26728c6c40ebf7ffbe
:0                                                                Unknown refs form in packed-refs: refs/replace/46c0a370e8b3316bd41a2891c40bcabe7caec76e
:0                                                                Unknown refs form in packed-refs: refs/replace/4758641ccd27b6f27a20044b0727ee8b1b798650
:0                                                                Unknown refs form in packed-refs: refs/replace/4ef4ef6e3e915f7267207db4327cf21204a400a2
:0                                                                Unknown refs form in packed-refs: refs/replace/51704f7f40514f15f5eea3ea7e04b729c5b10ffd
:0                                                                Unknown refs form in packed-refs: refs/replace/56c12384971b4e56cc45ac2b71d7e5f50e23d46a
:0                                                                Unknown refs form in packed-refs: refs/replace/5a4ee1a29c3bc9cbce0e3e5b6a917bb49fcb0953
:0                                                                Unknown refs form in packed-refs: refs/replace/5f2532221a3b94fd86e475710a4a5a3a0e9c283f
:0                                                                Unknown refs form in packed-refs: refs/replace/5fa29083f95c2464876886613ed43c507405ccd1
:0                                                                Unknown refs form in packed-refs: refs/replace/647ec8cd07e8febf575c21cb3c0edb4155556012
:0                                                                Unknown refs form in packed-refs: refs/replace/6b77997d0951d7eb43e05bd7af6f731751229c0c
:0                                                                Unknown refs form in packed-refs: refs/replace/6c6fe401c95648ab6086554b03a9668d4b37b24f
:0                                                                Unknown refs form in packed-refs: refs/replace/71e66803cae950a485bb6b9e020e8cb01deb7b54
:0                                                                Unknown refs form in packed-refs: refs/replace/72afb6e8ad5982ffb799ccbb285fe5a4f753e516
:0                                                                Unknown refs form in packed-refs: refs/replace/752526a8be3093d4a16580ca4debfdd484bd7923
:0                                                                Unknown refs form in packed-refs: refs/replace/7539ce7ffe867d4722ca405f762f6c8370fd88cc
:0                                                                Unknown refs form in packed-refs: refs/replace/79063ee9cb63d7c6833c383750a1fc23aece6d32
:0                                                                Unknown refs form in packed-refs: refs/replace/7a3228ed0bb4cf77158f8e417e836281473ab0d6
:0                                                                Unknown refs form in packed-refs: refs/replace/818325ede7495bab9d250088f362b23ba06613c6
:0                                                                Unknown refs form in packed-refs: refs/replace/83e206eaab905365ac60b94bdaffe457d0412eb5
:0                                                                Unknown refs form in packed-refs: refs/replace/882f86a17230419ce69d2b29ebcacc53a2162077
:0                                                                Unknown refs form in packed-refs: refs/replace/9094bcf8007362fa1d7a6ee5dc8add510e55eccd
:0                                                                Unknown refs form in packed-refs: refs/replace/91518bce97c34511ab00b49496b26892d1c3b534
:0                                                                Unknown refs form in packed-refs: refs/replace/91f88b5f359d23e53656b42056f7f7bca5fe7a74
:0                                                                Unknown refs form in packed-refs: refs/replace/99d981a3dac26b747c48f0c6fc6ef71fca975740
:0                                                                Unknown refs form in packed-refs: refs/replace/9b48d0a62ad4fe4968fa611b4124d3f3a2fddd41
:0                                                                Unknown refs form in packed-refs: refs/replace/9dd2ad27e2f8d90a129eab1cb39f2ad4cfe64b8e
:0                                                                Unknown refs form in packed-refs: refs/replace/a3c7f6941c66feb7d012707a0c0118e69a7b1c4c
:0                                                                Unknown refs form in packed-refs: refs/replace/ab211f6c3f429c4a5c3a459827b2c41bb7b9b345
:0                                                                Unknown refs form in packed-refs: refs/replace/b5e1078e30cb66b9aa7079b4d807bd6370ead5ab
:0                                                                Unknown refs form in packed-refs: refs/replace/b8634ccc6c84b42c77b4605d2858f08d434723ff
:0                                                                Unknown refs form in packed-refs: refs/replace/bfe2f5bbbe694f5abd24a3108e2b72b85999d7c2
:0                                                                Unknown refs form in packed-refs: refs/replace/c0b7170bc7d5975d0116a737564ea8cf26c726e5
:0                                                                Unknown refs form in packed-refs: refs/replace/c29ccd69c3c67312e30c6a9cf72d52ad8c515761
:0                                                                Unknown refs form in packed-refs: refs/replace/c5e3b866eac71ec3d6eb036ab3ab96a1778fed6a
:0                                                                Unknown refs form in packed-refs: refs/replace/c8e2decf85a0a0b25011a9d58f672eb5366252e7
:0                                                                Unknown refs form in packed-refs: refs/replace/c90850d918fa3ce2a42410006d368fea40abd704
:0                                                                Unknown refs form in packed-refs: refs/replace/cc3058ae8f091b275491aef45ae09d36b1599570
:0                                                                Unknown refs form in packed-refs: refs/replace/d855f6fe4886253c22218c7389821726e338af23
:0                                                                Unknown refs form in packed-refs: refs/replace/df4dd6a315ef7c0fc74381d5b9a58091e951e499
:0                                                                Unknown refs form in packed-refs: refs/replace/e63ee674333df35a8b542c9ee9a14bc68a78f9f2
:0                                                                Unknown refs form in packed-refs: refs/replace/e7b80e297bc648492bbca02b92ef58083cb78788
:0                                                                Unknown refs form in packed-refs: refs/replace/ec79b4799943810fa9e36a277fb967a40fecb1e0
:0                                                                Unknown refs form in packed-refs: refs/replace/ee210bed49a4cbc165dadcda5e5224d3e112dfad
:0                                                                Unknown refs form in packed-refs: refs/replace/efc9c4ff9b23a08bc30f8a7e630ee436e78ccc06
:0                                                                Unknown refs form in packed-refs: refs/replace/f4fa7ba4b39931ee01652ecb05a109fa5e36656e
:0                                                                Unknown refs form in packed-refs: refs/replace/ff0a733099901609cae52c1cb975f9f8d0b3177f
:0                                                                Unknown refs form in packed-refs: refs/replace/ff8924c47c559bf2d10473bc5e33dea7abd332bb
:0                                                                scan: /home/niko/Workspace/bzl-base/bzl-build/databib/bzl-build/databib has been seen before, skipping (using inode) previous path: /home/niko/Workspace/bzl-base/bzl-build/databib inode: 16114890
:0                                                                git: tracking working dir /home/niko/.cache/bazel/_bazel_niko/347de56077a6f149e70449376a860667/execroot/databib
:0                                                                git: tracking working dir /home/niko/Workspace/bzl-base/bzl-build/databib
:0                                                                plugins loaded
:0                                                                git: tracking working dir /home/niko/Workspace/databib
:0                                                                git: tracking working dir /home/niko/Workspace/linuxconf/slackware/packages/nvidia-container-toolkit
Package Control: Skipping automatic upgrade, last run at 2024-03-01 09:12:31, next run at 2024-03-01 17:12:31 or after
:0                                                                git: tracking working dir /home/niko/Workspace/linuxconf/slackware/packages/bumblebee/bumblebee

And here’s the log from running in --safe-mode:

niko@dell-xps15: ~ $ G_MESSAGES_DEBUG=all sublime --multiinstance --debug --safe-mode
(sublime:6618): GLib-DEBUG: 13:21:56.617: unsetenv() is not thread-safe and should not be used after threads are created
(sublime:6618): GLib-GIO-DEBUG: 13:21:56.621: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(sublime:6618): GLib-DEBUG: 13:21:56.622: unsetenv() is not thread-safe and should not be used after threads are created
(sublime:6618): Gtk-DEBUG: 13:21:56.622: Connecting to session manager
(sublime:6618): Gtk-DEBUG: 13:21:56.623: Failed to get the GNOME session proxy: The name org.gnome.SessionManager is not owned
(sublime:6618): Gtk-DEBUG: 13:21:56.623: Failed to get the Xfce session proxy: The name org.xfce.SessionManager is not owned
(sublime:6618): GLib-GIO-DEBUG: 13:21:56.630: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
:0                                                                startup, version: 4169 linux x64 channel: stable
:0                                                                SAFE MODE - overriding packages, state and cache paths
:0                                                                executable: /opt/sublime_text/sublime_text
:0                                                                application: /opt/sublime_text
:0                                                                working dir: /home/niko
:0                                                                packages path: /home/niko/.config/sublime-text-safe-mode/Packages
:0                                                                state path: /home/niko/.config/sublime-text-safe-mode/Local
:0                                                                zip path: /opt/sublime_text/Packages
:0                                                                zip path: /home/niko/.config/sublime-text-safe-mode/Installed Packages
:0                                                                ignored_packages: ["Vintage"]
:0                                                                generating syntax summary
:0                                                                generating meta info summary
(sublime:6618): GLib-GIO-DEBUG: 13:21:59.053: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
(sublime:6618): dconf-DEBUG: 13:21:59.053: watch_fast: "/org/gnome/desktop/interface/" (establishing: 0, active: 0)
(sublime:6618): dconf-DEBUG: 13:21:59.054: watch_established: "/org/gnome/desktop/interface/" (establishing: 1)
(sublime:6618): Gtk-DEBUG: 13:21:59.087: State 4 for context 0x7f38c95e3160 doesn't match state 128 set via gtk_style_context_set_state ()
:0                                                                pre session restore time: 2.54603
:0                                                                startup time: 2.65799
:0                                                                first paint time: 2.73701
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
:0                                                                plugins loaded
0 Likes