oh-my-posh: "invalid memory address or nil pointer dereference" in various prompt modules
Code of Conduct
- I agree to follow this project’s Code of Conduct
What happened?
At random times, rendering one or more elements of the prompt results in errors of the following format:
“oh-my-posh fatal error rendering [segment] segment:runtime error: invalid memory address or nil pointer dereference”
The affected segment displays the text “error” when this event occurs. The affected segment can be something as trivial as the operating system logo or the last execution timer.
Version
> Get-Module oh-my-posh | select Version
Version
-------
5.19.0
Theme
night-owl, no modifications.
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Relevant log output
╭─ 0ms 21:45:38
╰─
oh-my-posh fatal error rendering executiontime segment:runtime error: invalid memory address or nil pointer dereference
╭─ error 21:45:39
╰─
╭─ 0ms 21:45:40
╰─
╭─ 0ms 21:45:41
╰─
╭─ 0ms 21:45:42
╰─
╭─ 0ms 21:45:43
╰─
╭─ 0ms 21:45:44
╰─
╭─ 0ms 21:45:45
╰─
╭─ 0ms 21:45:46
╰─
╭─ 0ms 21:45:47
╰─
╭─ 0ms 21:45:48
╰─
╭─ 0ms 21:45:49
╰─
╭─ 0ms 21:45:50
╰─
╭─ 0ms 21:45:51
╰─
╭─ 0ms 21:45:52
╰─
╭─ 0ms 21:45:53
╰─
oh-my-posh fatal error rendering os segment:runtime error: invalid memory address or nil pointer dereference
╭─ error 0ms 21:45:54
╰─
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (10 by maintainers)
Commits related to this issue
- fix: add stack trace when errors happen in segments relates to #1182 — committed to JanDeDobbeleer/oh-my-posh by JanDeDobbeleer 3 years ago
- fix: add stack trace when errors happen in segments relates to #1182 — committed to JanDeDobbeleer/oh-my-posh by JanDeDobbeleer 3 years ago
The fix is building
Status update: fix is available
it’s an issue with the latest changes. @JanDeDobbeleer has been notified. https://github.com/JanDeDobbeleer/oh-my-posh/commit/04f841d1b323f58e8e1b7c33f96eae26ea00558b.
For the time being rollback to a previous version, the fix is on its way.
@Kyllingene check #1907, fix incoming.