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

exit status 1 when run from IDE GoLand 2024.3.1 #1063

Open
jkpark opened this issue Dec 18, 2024 · 1 comment
Open

exit status 1 when run from IDE GoLand 2024.3.1 #1063

jkpark opened this issue Dec 18, 2024 · 1 comment

Comments

@jkpark
Copy link

jkpark commented Dec 18, 2024

in my Mac PC, I am facing an error when executing tview application from GoLand 2024.3.1.

To prove, I have created hello world project and ran it.

package main

import (
	"github.com/rivo/tview"
)

func main() {
	box := tview.NewBox().SetBorder(true).SetTitle("Hello, world!")
	if err := tview.NewApplication().SetRoot(box, true).Run(); err != nil {
		panic(err)
	}
}

got error

GOROOT=/opt/homebrew/opt/go/libexec #gosetup
GOPATH=/Users/jkpark/go #gosetup
/opt/homebrew/opt/go/libexec/bin/go build -o /Users/jkpark/Library/Caches/JetBrains/GoLand2024.3/tmp/GoLand/___go_build_test_tview test-tview #gosetup
/Users/jkpark/Library/Caches/JetBrains/GoLand2024.3/tmp/GoLand/___go_build_test_tview #gosetup
panic: exit status 1

goroutine 1 [running]:
main.main()
	/Users/jkpark/work/test/test-tview/main.go:10 +0x29c

Process finished with the exit code 2

Do you have any idea to solve it?

Thank you

@vlanse
Copy link

vlanse commented Dec 21, 2024

@jkpark
IMO that's JB problem. I've set check box "Emulate terminal in output console" in corresponding Run Configuration (was unset after recent IDE update) and everything started working

The problem in fact was because call to infocmp -1 (invoked internally by tview) failed with exit code 1 (looks like w/o that "emulation" it's impossible to obtain required info about terminal)

Screenshot 2024-12-21 at 17 48 38

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