Sublime Forum

Sublime text 3 crashes immediately on start

#1

CentOS 6 user here.
I have been using sublime text 3 for a while now, and purchased a key in Sept 2018. I ignored some bad behavior I saw recently, since I was heads-down on a deadline. That was probably a mistake. So a few months ago, if I tried to open a new file in the gui, sublime text 3 would crash. I could just run sublime text 3 and name the file on the command line and it would come up fine, with my old buffers still intact. I had to close all my buffers and start over recently, and now sublime text will not come up at all. I can just type sublime_text by itself , or sublime_text file.txt, and same result: a gui for about 1/100 sec, and then it’s gone. Googling the issue showed entries where people were talking about all sorts of things in their config directory, but my ~/.config/subline-text-3 directory just shows this:

~/.config/sublime-text-3> ls -l
total 20
drwx------ 48 pkrouse synopsys 4096 Jan 13 11:24 Cache
drwx------ 2 pkrouse synopsys 4096 Jan 13 11:24 Installed Packages
drwx------ 3 pkrouse synopsys 4096 Jan 13 11:24 Lib
drwx------ 2 pkrouse synopsys 4096 Jan 13 11:24 Local
drwx------ 3 pkrouse synopsys 4096 Jan 13 11:24 Packages
~/.config/sublime-text-3>

Also, my sublime text installation directory shows this:
total 18324
-rw-r----- 1 styson synopsys 47997 May 13 2018 changelog.txt
-rwxr-x— 1 styson synopsys 517280 May 13 2018 crash_reporter
drwxr-x— 7 styson synopsys 4096 May 13 2018 Icon
drwxr-x— 2 styson synopsys 4096 May 13 2018 Packages
-rwxr-x— 1 styson synopsys 8137488 May 13 2018 plugin_host
-rw-r----- 1 styson synopsys 2628080 May 13 2018 python3.3.zip
-rw-r----- 1 styson synopsys 36619 May 13 2018 sublime_plugin.py
-rw-r----- 1 styson synopsys 38624 May 13 2018 sublime.py
-rwxr-x— 1 styson synopsys 7235496 May 13 2018 sublime_text
-rw-r----- 1 styson synopsys 532 May 13 2018 sublime_text.desktop

At a loss here as to what to do next. I’m happy to try anything…

0 Likes

#2

Have you tried reverting to a freshly installed state? https://www.sublimetext.com/docs/3/revert.html

0 Likes

#3

OK, since this is Linux in my case, I went to ~/.config and moved the sublime-test-3 directory aside. Then I re-ran the sublime_text executable. The result was the same. There was no gui, but as expected, I got another sublime-text-3 directory under ~/.config.

What’s my next step to solving this?

0 Likes

#4

OK, so the last thing I could think of is to install a new sublime_text image on a centos machine on my network and see if that works.

I downloaded the latest build (3211 from October 2019) and put the image on a CentOS 6.7 machine.

I guess this is progress, because now the errors are different…
Unable to load libgdk-3.so
Unable to load gdk_cairo_create from libgdk-3.0.so
The list continues, all starting with either gdk or gtk.

The dev builds are all earlier than this one, so not sure if I should try them.

Just looking for any way, at all, to get this working here.

0 Likes

#5

In build 3200, Sublime switched to using GTK3 instead of GTK2 as the GUI toolkit on Linux. The error messages that you’re seeing in the second case look like an indication that the machine you’re testing on doesn’t have GTK3 installed. Installing the libraries may help with that on that machine.

If the original machine did any updates outside of Sublime, that might also explain why it stopped working out of the blue, but that’s just a shot in the dark.

0 Likes

#6

Thanks OdatNurd, I will look into GTK3 for my CentOS machine, but failing that, can I send my license info to someone and get access to an earlier build that uses GTK2?

0 Likes

#7

You can get any version you like by copying the download URL and replacing the build number with a previous one.

For your case you want to hit build 3176 if you want the last stable build before this change, or build 3197 as the last publicly available development build prior to when this change was made, depending on what you’d like to use.

0 Likes

#8

OK, I am completely out of ideas here. I downloaded and extracted the 3176 build, and it fails the exact same way as the others – a gui for a brief flash, then it’s gone. Is there a crash file anywhere that I can send, or a log that can be examined? I looked in my current directory (which is the sublime_test_3 directory itself) with ls -la, but nothing new is there.

I even went to a centos 7 machine and tried to run it there. Display is set, and I tested it by running xclock just to make sure it was right.

What am I missing here?

0 Likes

#9

The developers may have some extra insight into the problem; the only thing I can think of to try is to execute sublime_text --debug, which gets it to write what it’s writing to the console to the terminal as well to see if there’s any clues there. That’s a real shot in the dark, though.

0 Likes

#10

OK, I appreciate the quick feedback you have given OdatNurd. Now I am getting somewhere:

/global/lynx_home/users/pkrouse/st3/sublime_text_3> ./sublime_text --debug
:0 DPI scale (detected): 1.002
:0 startup, version: 3176 linux x64 channel: stable
:0 executable: /global/lynx_home/users/pkrouse/st3/sublime_text_3/sublime_text
:0 working dir: /global/lynx_home/users/pkrouse/st3/sublime_text_3
:0 packages path: /remote/us01home17/pkrouse/.config/sublime-text-3/Packages
:0 state path: /remote/us01home17/pkrouse/.config/sublime-text-3/Local
:0 zip path: /global/lynx_home/users/pkrouse/st3/sublime_text_3/Packages
:0 zip path: /remote/us01home17/pkrouse/.config/sublime-text-3/Installed Packages
:0 ignored_packages: [“Vintage”]
:0 pre session restore time: 0.176092
:0 startup time: 0.301922
:0 first paint time: 0.318156

(sublime_text:24745): GLib-GObject-WARNING **: cannot register existing type `GInputStream’

(sublime_text:24745): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0’ failed

(sublime_text:24745): GLib-GObject-CRITICAL **: g_type_register_static: assertion `parent_type > 0’ failed

(sublime_text:24745): GLib-GObject-WARNING **: cannot register existing type `GSeekable’

(sublime_text:24745): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion `G_TYPE_IS_INTERFACE (interface_type)’ failed

(sublime_text:24745): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0’ failed

(sublime_text:24745): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed

(sublime_text:24745): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0’ failed

(sublime_text:24745): GLib-GObject-CRITICAL **: g_type_register_static: assertion `parent_type > 0’ failed

(sublime_text:24745): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed

(sublime_text:24745): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0’ failed

(sublime_text:24745): GLib-GObject-CRITICAL **: g_object_new: assertion G_TYPE_IS_OBJECT (object_type)' failed Segmentation fault /global/lynx_home/users/pkrouse/st3/sublime_text_3\> /global/lynx_home/users/pkrouse/st3/sublime_text_3/crash_reporter: /lib64/libc.so.6: versionGLIBC_2.17’ not found (required by /global/lynx_home/users/pkrouse/st3/sublime_text_3/crash_reporter)

I think something is wrong in my environment. I’ll reply back if I figure it out, in the meantime, all help and/or insight here would be gladly welcomed…

0 Likes

#11

OK, problem solved. In case someone else sees this type of problem, I am detailing this here.

I had added a command to my .bashrc to load a package, and I failed to notice that doing so clobbered by LD_LIBRARY_PATH setting.

Bad, bad thing for a package to do.

As I opened xterms and used them, things like file->open would kill the gui. Things never worked right when opening new xterms, because of the package and what it was doing to LD_LIBRARY_PATH.

I removed the offending package from my .bashrc and things went back to normal.

2 Likes