-
-
Notifications
You must be signed in to change notification settings - Fork 447
Crashes without stack trace #1357
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingdifficulty:hardfor devsFeatures/Fixes that will help the developersFeatures/Fixes that will help the developersrequire expertiseIssues that needs and expertise in superfile's codebase and/or golang to be able to fix effectively.Issues that needs and expertise in superfile's codebase and/or golang to be able to fix effectively.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdifficulty:hardfor devsFeatures/Fixes that will help the developersFeatures/Fixes that will help the developersrequire expertiseIssues that needs and expertise in superfile's codebase and/or golang to be able to fix effectively.Issues that needs and expertise in superfile's codebase and/or golang to be able to fix effectively.
Like #1353 , sometimes superfile can crash without printing a stack trace.
FYI, most crash I saw so far had a stack trace. Example #542
One way to reproduce it is via doing out of range access on slice from a
tea.Cmdgoroutine. For example, by returning the below value inUpdate().I could see no stack trace in Iterm2, but I could see it in Ghostty(that too, only sometimes)
bubbletea has
recoverFromPanicandrecoverFromGoPanicwhere they calldebug.PrintStack(), but I guess that sometimes, the output tostderris lost as bubbletea is still controlling the terminal.Path forward.
--custom-recover. There we will configure our tea.Program withtea.WithoutCatchPanics(), and catch panics fromp.Run()ourselves. We would also need to take care of restoring terminal viap.Kill/p.Quit/p.RestoreTerminal. Maybe we should keep it as the default way superfile works, till we can ensure that all panics will show stack trace on all terminals. After all panics might be rare and might not be reproducible.