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

bat --list-themes fails with SIGSEGV #701

Closed
jswny opened this issue Oct 24, 2019 · 7 comments
Closed

bat --list-themes fails with SIGSEGV #701

jswny opened this issue Oct 24, 2019 · 7 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists macOS Issue is related to the macOS build of bat upstream-error A bug in an upstream component

Comments

@jswny
Copy link

jswny commented Oct 24, 2019

Screen Shot 2019-10-24 at 2 02 31 PM

As you can see, when I run bat --list-themes, the command fails with SIGSEV. I tried this in Bash and Fish, both resulted in the same failure.

I'm running this on MacOS Catalina 10.15, and I have bat version 0.12.1 installed via Brew.

@eth-p eth-p added bug Something isn't working macOS Issue is related to the macOS build of bat upstream-error A bug in an upstream component labels Oct 24, 2019
@eth-p
Copy link
Collaborator

eth-p commented Oct 24, 2019

The --list-themes flag highlights the theme previews with Syntect. The segfault you encountered is likely related to #680, which is caused by an incompatibility with oniguruma (the regex library used by Syntect) and macOS 10.15.

This should be fixed in the next release.

@jswny
Copy link
Author

jswny commented Oct 24, 2019

@eth-p Thanks, I've been taking a look at that issue and the related ones. Is there any way to work around this problem and build bat manually? I couldn't seem to find a definitive workaround in the linked issue.

@eth-p
Copy link
Collaborator

eth-p commented Oct 25, 2019

There isn't any workaround for --list-themes, unfortunately. If you don't mind getting your hands dirty and building bat yourself, there is a fix in #680 though. It involves building onig with the latest oniguruma master and using that instead of the version syntect specified.

I'm not entirely sure on the process, but I assume you would need to clone syntect and change its Cargo.toml to reference the latest onig crate (which fixed the segfaults), and then change bat's Cargo.toml to reference your local copy of syntect.

@jswny
Copy link
Author

jswny commented Oct 25, 2019

@eth-p Ok thank you, I will try to do it manually for now.

@sharkdp
Copy link
Owner

sharkdp commented Oct 28, 2019

@jswny Thank you for reporting this. I think we close this as a duplicate of #680?

@jswny
Copy link
Author

jswny commented Oct 28, 2019

@sharkdp Yes I think so, sorry for not finding that issue earlier, I was having a hard time figuring out what actually was going wrong to search for similar issues.

@jswny jswny closed this as completed Oct 28, 2019
@sharkdp
Copy link
Owner

sharkdp commented Oct 28, 2019

no worries, thanks.

@sharkdp sharkdp added the duplicate This issue or pull request already exists label Oct 28, 2019
@eth-p eth-p mentioned this issue Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists macOS Issue is related to the macOS build of bat upstream-error A bug in an upstream component
Projects
None yet
Development

No branches or pull requests

3 participants