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

Segmentation Fault #8

Closed
ghost opened this issue Aug 16, 2018 · 5 comments
Closed

Segmentation Fault #8

ghost opened this issue Aug 16, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Aug 16, 2018

When I try to run st from another temrinal (in this case, Konsole because I'm running Kubuntu 18) the program does not launch and instead my terminal returns

Segmentation fault (core dumped)

@ghost
Copy link
Author

ghost commented Aug 16, 2018

GNU Debugger shows the following outpt

Starting program: /usr/local/bin/st
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
tcache_get (tc_idx=9) at malloc.c:2943
2943 malloc.c: No such file or directory.

@shumvgolove
Copy link

I've got similar error:

free(): invalid next size (normal)
Aborted (core dumped)

@JohnnyVim
Copy link

The problem is that the defaultbg value is set to 256, but there is no value for 256 in the colorname array.
There are two easy ways to fix this by editing the config.h file:

Option 1:
Assign a valid value to defaultbg in line 117. change unsigned int defaultbg = 256; to unsigned int defaultbg = 16; (16 would produce a black background color. You can choose a different color from the colorname array. Any number from 0 to 18 should work.)
Option 2:
Add back [255] = 0, before the "more colors can be added.." comment in line 105.

@aasril
Copy link

aasril commented Sep 7, 2018

@JohnnyVim thanks. That solved the issue. What i did exactly was changing the value on line 117 to 0.

Worth to note that I expected to get black background because 0 refer to black, instead I get solarized theme background color. Not that I complained, by the way.

@LukeSmithxyz
Copy link
Owner

Sorry for not getting on this issue earlier, but it looks like you guys had converged on a fix. I've actually switched the background color to 0 now so this particular problem shouldn't be a problem on any other systems.

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

4 participants