[PR #111] [MERGED] Show backtrace on app crash #614

Closed
opened 2026-02-28 14:50:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Rigellute/spotify-tui/pull/111
Author: @jfaltis
Created: 10/25/2019
Status: Merged
Merged: 10/27/2019
Merged by: @Rigellute

Base: masterHead: show-backtrace


📝 Commits (2)

📊 Changes

3 files changed (+40 additions, -7 deletions)

View changed files

📝 Cargo.lock (+8 -7)
📝 Cargo.toml (+1 -0)
📝 src/main.rs (+31 -0)

📄 Description

This PR enables the output of the backtrace to the terminal when the app panics. This feature is currently only enabled in Debug and also ignores the RUST_BACKTRACE environment variable. It uses the workaround suggested here fdehau/tui-rs#177.

Unfortunately there is still an issue with the cursor placement after the crash where it is placed into the stacktrace output if the app was not run from the last line in terminal. Demonstration:

Cursor not at bottom before app is started:
backtrace

Cursor at bottom before app is started (expected behaviour):
backtrace-1

I couldn't figure out a solution yet but I think this could be fixed in a later PR because this is a valuable addition to track down the reason for crashes. This would improve situations like these https://github.com/Rigellute/spotify-tui/issues/102.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Rigellute/spotify-tui/pull/111 **Author:** [@jfaltis](https://github.com/jfaltis) **Created:** 10/25/2019 **Status:** ✅ Merged **Merged:** 10/27/2019 **Merged by:** [@Rigellute](https://github.com/Rigellute) **Base:** `master` ← **Head:** `show-backtrace` --- ### 📝 Commits (2) - [`03b67e0`](https://github.com/Rigellute/spotify-tui/commit/03b67e0cdda43fc69c11b811a37a8d28ee2ca51a) show backtrace on crash - [`070c6a2`](https://github.com/Rigellute/spotify-tui/commit/070c6a2212f3819045adeab1d8ac4de45a582dca) rustfmt ### 📊 Changes **3 files changed** (+40 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+8 -7) 📝 `Cargo.toml` (+1 -0) 📝 `src/main.rs` (+31 -0) </details> ### 📄 Description This PR enables the output of the backtrace to the terminal when the app panics. This feature is currently only enabled in **Debug** and also ignores the `RUST_BACKTRACE` environment variable. It uses the workaround suggested here fdehau/tui-rs#177. Unfortunately there is still an issue with the cursor placement after the crash where it is placed into the stacktrace output if the app was not run from the last line in terminal. Demonstration: Cursor not at bottom before app is started: ![backtrace](https://user-images.githubusercontent.com/45465572/67585621-35965600-f750-11e9-975d-15e678f636ef.png) Cursor at bottom before app is started (expected behaviour): ![backtrace-1](https://user-images.githubusercontent.com/45465572/67585624-37601980-f750-11e9-94a6-50c17ff6f6d0.png) I couldn't figure out a solution yet but I think this could be fixed in a later PR because this is a valuable addition to track down the reason for crashes. This would improve situations like these https://github.com/Rigellute/spotify-tui/issues/102. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:50:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-tui#614
No description provided.