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

Panic on Close(): The handle is invalid. [Windows] #199

Closed
TACIXAT opened this issue Oct 6, 2018 · 1 comment
Closed

Panic on Close(): The handle is invalid. [Windows] #199

TACIXAT opened this issue Oct 6, 2018 · 1 comment

Comments

@TACIXAT
Copy link

TACIXAT commented Oct 6, 2018

panic: The handle is invalid. [recovered]
        panic: The handle is invalid.

goroutine 74 [running]:
github.com/nsf/termbox-go.get_win_size(0x1e4, 0xc0004319e0)
        /home/dg/go/src/github.com/nsf/termbox-go/termbox_windows.go:448 +0xc4
github.com/nsf/termbox-go.update_size_maybe()
        /home/dg/go/src/github.com/nsf/termbox-go/termbox_windows.go:470 +0x38
github.com/nsf/termbox-go.Clear(0xc000000000, 0x729849, 0xc00025a9c0)
        /home/dg/go/src/github.com/nsf/termbox-go/api_windows.go:187 +0x41
github.com/nsf/termbox-go.Close()
        /home/dg/go/src/github.com/nsf/termbox-go/api_windows.go:77 +0x34
github.com/gizak/termui.Close()
        /home/dg/go/src/github.com/gizak/termui/render.go:75 +0x27
github.com/gizak/termui.render.func1()
        /home/dg/go/src/github.com/gizak/termui/render.go:104 +0x91
panic(0x73aee0, 0xc00000a038)
        /usr/local/go/src/runtime/panic.go:513 +0x1c7
github.com/nsf/termbox-go.get_win_size(0x1e4, 0xc00006f8f0)
        /home/dg/go/src/github.com/nsf/termbox-go/termbox_windows.go:448 +0xc4
github.com/nsf/termbox-go.update_size_maybe()
        /home/dg/go/src/github.com/nsf/termbox-go/termbox_windows.go:470 +0x38
github.com/nsf/termbox-go.Flush(0xaee4e8, 0xc00006fb60)
        /home/dg/go/src/github.com/nsf/termbox-go/api_windows.go:108 +0x2d
github.com/gizak/termui.render(0xc00029e210, 0x1, 0x1)
        /home/dg/go/src/github.com/gizak/termui/render.go:164 +0x1fb
github.com/gizak/termui.Init.func2()
        /home/dg/go/src/github.com/gizak/termui/render.go:65 +0x7a
created by github.com/gizak/termui.Init
        /home/dg/go/src/github.com/gizak/termui/render.go:63 +0x31e
@scrouthtv
Copy link
Collaborator

I don't know if you're still interested in this, but just in case:
I tried running the keyboard and editbox demos in both cmd.exe as well as pwsh under Windows 10 Version 2004.
Both call the Close() function at the end
Everything worked for me both in the traditional conemu terminal as well as in the new Terminal emulator.

Let me know if your issue persists and I'll look into it!

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