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

Calling Clear() during an EventResize panics if the cursor position is outside the newly resized window. #125

Open
MANGO1234 opened this issue Apr 3, 2016 · 1 comment
Labels

Comments

@MANGO1234
Copy link

Not sure if this has a satisfactory solution in code. Work around is just hide the cursor and then readd the cursor after clearing.

panic: The parameter is incorrect.

goroutine 1 [running]:
github.com/nsf/termbox-go.move_cursor(0x0, 0x26)
E:/Develop/gopath/src/github.com/nsf/termbox-go/termbox_windows.go:559 +0x78
github.com/nsf/termbox-go.clear()
E:/Develop/gopath/src/github.com/nsf/termbox-go/termbox_windows.go:596 +0x171
github.com/nsf/termbox-go.update_size_maybe()
E:/Develop/gopath/src/github.com/nsf/termbox-go/termbox_windows.go:418 +0xc1
github.com/nsf/termbox-go.Clear(0x0, 0x0, 0x0)
E:/Develop/gopath/src/github.com/nsf/termbox-go/api_windows.go:187 +0x49
/E/Develop/cs416handin/project_o7l8_s7l8_u4o8_y5q8/gui.InitEditor(0x0, 0x0)
E:/Develop/cs416handin/project_o7l8_s7l8_u4o8_y5q8/gui/editor.go:114 +0x6ad
main.main()
E:/Develop/cs416handin/project_o7l8_s7l8_u4o8_y5q8/guit.go:8 +0x21

goroutine 4 [syscall, locked to thread]:
github.com/nsf/termbox-go.wait_for_multiple_objects(0x12257f3c, 0x2, 0x2, 0x0, 0x0)
E:/Develop/gopath/src/github.com/nsf/termbox-go/termbox_windows.go:314 +0x87
github.com/nsf/termbox-go.input_event_producer()
E:/Develop/gopath/src/github.com/nsf/termbox-go/termbox_windows.go:760 +0xd3
created by github.com/nsf/termbox-go.Init
E:/Develop/gopath/src/github.com/nsf/termbox-go/api_windows.go:68 +0x403
exit status 2

@nsf nsf added the Bug label Apr 3, 2016
@Alkorin
Copy link

Alkorin commented Feb 11, 2019

Looks like I've the same issue with gocui on windows:

panic(0x71e540, 0xc0002a96b8)
        /home/toms/go/src/runtime/panic.go:513 +0x1c7
github.com/nsf/termbox-go.move_cursor(0x1a, 0x51)
        /home/toms/src/go/src/github.com/nsf/termbox-go/termbox_windows.go:651 +0x75
github.com/nsf/termbox-go.clear()
        /home/toms/src/go/src/github.com/nsf/termbox-go/termbox_windows.go:688 +0x125
github.com/nsf/termbox-go.update_size_maybe()
        /home/toms/src/go/src/github.com/nsf/termbox-go/termbox_windows.go:510 +0x10d
github.com/nsf/termbox-go.Clear(0x0, 0xc000036ba0, 0xc00019fbd0)
        /home/toms/src/go/src/github.com/nsf/termbox-go/api_windows.go:193 +0x41
github.com/jroimartin/gocui.(*Gui).flush(0xc0000f22d0, 0x0, 0x0)
        /home/toms/src/go/src/github.com/jroimartin/gocui/gui.go:423 +0x43
github.com/jroimartin/gocui.(*Gui).MainLoop(0xc0000f22d0, 0xc0000f22d0, 0xc0002bbf80)
        /home/toms/src/go/src/github.com/jroimartin/gocui/gui.go:384 +0x20b
main.(*GoCUI).Start(0xc000036c60, 0xc000036c60, 0x0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants