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

Save backtrace to file on panic #1681

Merged
merged 11 commits into from Dec 18, 2022
Merged

Save backtrace to file on panic #1681

merged 11 commits into from Dec 18, 2022

Conversation

fekie
Copy link
Contributor

@fekie fekie commented Dec 17, 2022

What kind of change does this PR introduce?

  • Feature

Did this PR introduce a breaking change?

A breaking change includes anything that breaks backwards compatibility either at compile or run time.

  • No

I added a panic hook that appends the backtrace to a log file in the current directory so that there is some clue as to what happened when neovide crashes.

It works by attaching a panic hook at the beginning of main(). The original main function has been moved to protected_main(). I moved it here for now as I was not sure how to integrate the hook into main()'s documentation.

Cargo.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@MultisampledNight MultisampledNight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you! 🎉

I forgot to tell you this, and it doesn't seem like it's stated anywhere visible, so here I go: Should you contribute here or somewhere else, please consider creating another branch than main for your changes, and PR from that branch to this main. This makes local testing setups less messy, for a lengthier explanation see #1468 (comment).

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
@MultisampledNight
Copy link
Contributor

Looks good to me! I'd leave it bit-rot a day or two, then get it in.

@MultisampledNight
Copy link
Contributor

Choooooo chooooooooooo! Thank you!

@MultisampledNight MultisampledNight merged commit fad8e8d into neovide:main Dec 18, 2022
TENX-S pushed a commit to TENX-S/neovide that referenced this pull request Jan 24, 2023
Co-authored-by: MultisampledNight <contact@multisamplednight.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants