Skip to content

invalid memory address or nil pointer dereference #32

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

Closed
NachoVazquez opened this issue Apr 21, 2025 · 7 comments
Closed

invalid memory address or nil pointer dereference #32

NachoVazquez opened this issue Apr 21, 2025 · 7 comments

Comments

@NachoVazquez
Copy link
Contributor

NachoVazquez commented Apr 21, 2025

The Problem

The app panics as soon as I start it. It only happens in some projects (it works in others)

Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/homebrew/Cellar/go/1.24.2/libexec/src/runtime/debug/stack.go:26 +0x64
runtime/debug.PrintStack()
        /opt/homebrew/Cellar/go/1.24.2/libexec/src/runtime/debug/stack.go:18 +0x1c
github.com/charmbracelet/bubbletea.(*Program).recoverFromPanic(0x1400057e140)
        /Users/nachovazquez/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:758 +0x80
panic({0x1041331a0?, 0x104fd1c50?})
        /opt/homebrew/Cellar/go/1.24.2/libexec/src/runtime/panic.go:792 +0x124
github.com/kujtimiihoxha/termai/internal/tui/components/core.statusCmp.model({{0x0, {0x0, 0x0}, 0x0}, 0x0, 0x2540be400})
        /Users/nachovazquez/go/pkg/mod/github.com/kujtimiihoxha/[email protected]/internal/tui/components/core/status.go:94 +0x64
github.com/kujtimiihoxha/termai/internal/tui/components/core.statusCmp.availableFooterMsgWidth({{0x0, {0x0, 0x0}, 0x0}, 0x0, 0x2540be400})
        /Users/nachovazquez/go/pkg/mod/github.com/kujtimiihoxha/[email protected]/internal/tui/components/core/status.go:90 +0x84
github.com/kujtimiihoxha/termai/internal/tui/components/core.statusCmp.View({{0x0, {0x0, 0x0}, 0x0}, 0x0, 0x2540be400})
        /Users/nachovazquez/go/pkg/mod/github.com/kujtimiihoxha/[email protected]/internal/tui/components/core/status.go:80 +0x644
github.com/kujtimiihoxha/termai/internal/tui.appModel.View({0x0, 0x0, {0x103afebe8, 0x4}, {0x0, 0x0}, 0x140004703f0, 0x14000470390, {0x1043f68d0, 0x140004703c0}, ...})
        /Users/nachovazquez/go/pkg/mod/github.com/kujtimiihoxha/[email protected]/internal/tui/tui.go:270 +0xf4
github.com/charmbracelet/bubbletea.(*Program).Run(0x1400057e140)
        /Users/nachovazquez/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:631 +0x758
github.com/kujtimiihoxha/termai/cmd.init.func1(0x104ff93a0, {0x103afe814?, 0x4?, 0x103afe818?})
        /Users/nachovazquez/go/pkg/mod/github.com/kujtimiihoxha/[email protected]/cmd/root.go:69 +0x360
github.com/spf13/cobra.(*Command).execute(0x104ff93a0, {0x1400003c070, 0x0, 0x0})
        /Users/nachovazquez/go/pkg/mod/github.com/spf13/[email protected]/command.go:1015 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x104ff93a0)
        /Users/nachovazquez/go/pkg/mod/github.com/spf13/[email protected]/command.go:1148 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/nachovazquez/go/pkg/mod/github.com/spf13/[email protected]/command.go:1071
github.com/kujtimiihoxha/termai/cmd.Execute()
        /Users/nachovazquez/go/pkg/mod/github.com/kujtimiihoxha/[email protected]/cmd/root.go:128 +0x24
main.main()
@kujtimiihoxha
Copy link
Collaborator

@NachoVazquez are you using the main version or the opencode version?

@NachoVazquez
Copy link
Contributor Author

The main version @kujtimiihoxha

@kujtimiihoxha
Copy link
Collaborator

ahh ok @NachoVazquez can you try the new version, it should work as expected and you get the new goodies, it will create a new .opencode/ folder and the config changed a bit and is now .opencode.json

@NachoVazquez
Copy link
Contributor Author

Sounds good; I'll try that. Feel free to close this one, then.

@kujtimiihoxha
Copy link
Collaborator

Thanks @NachoVazquez let me know if opencode works as expected.

@NachoVazquez
Copy link
Contributor Author

The new TUI looks amazing @kujtimiihoxha , everything seems to be working great.

@kujtimiihoxha
Copy link
Collaborator

@NachoVazquez yeah the new UI is really good @adamdottv has done an amazing job with the UI/UX redesign ❤️❤️

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

No branches or pull requests

2 participants