Comments (8)
Seems like x86_64 vs. x86 issue. I use the same structures on both platforms, perhaps it was a bad decission. Can't really do much here, because I have no x86_64 windows installation, but will take a closer look on things that may cause a problem.
from termbox-go.
So, I tried the example on my windows machine (x86), it works... Definitely something architecture specific. Can't see it. Will keep looking for an amd64 windows machine.
from termbox-go.
I am getting the same result, and I am not running a 64bit OS. My machine is 64bit, but I am running 32bit Windows 7, and 32 bit Go. I just installed Go and termbox, and got this error when running any of the demos. I then created my own basic program, almost exactly like the one in the original bug report, and I got the same error. The error does not occur when I remove termbox.Flush().
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x1 addr=0x0 pc=0x7616d68d]
goroutine 1 [syscall]:
syscall.Syscall6(0x7616d705, 0x5, 0x13, 0x11c21000, 0x1, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist579160455/go/src/pkg/runtime/zsyscall_windows_386.c:97 +0x49
github.com/nsf/termbox-go.write_console_output_attribute(0x13, 0x11c21000, 0x1, 0x57e40, 0x10001, ...)
C:/Go/src/pkg/github.com/nsf/termbox-go/termbox_windows.go:99 +0x9f
github.com/nsf/termbox-go.Flush(0x1, 0x1)
C:/Go/src/pkg/github.com/nsf/termbox-go/api_windows.go:67 +0xaa
main.main()
C:/Go/src/term/term.go:16 +0xe1
goroutine 2 [syscall]:
created by runtime.main
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist579160455/go/src/pkg/runtime/proc.c:221
goroutine 3 [syscall]:
syscall.Syscall6(0x7616d082, 0x4, 0xf, 0x11685a60, 0x1, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist579160455/go/src/pkg/runtime/zsyscall_windows_386.c:97 +0x49
github.com/nsf/termbox-go.read_console_input(0xf, 0x11685a60, 0x0, 0x0)
C:/Go/src/pkg/github.com/nsf/termbox-go/termbox_windows.go:138 +0x78
github.com/nsf/termbox-go.input_event_producer()
C:/Go/src/pkg/github.com/nsf/termbox-go/termbox_windows.go:574 +0x52
created by github.com/nsf/termbox-go.Init
C:/Go/src/pkg/github.com/nsf/termbox-go/api_windows.go:51 +0x2f0
exit status 2
from termbox-go.
Well, I was testing it on windows xp 32 bit. Now I actually have the Windows 7 64 bit. Will check that out soon.
from termbox-go.
I just installed cygwin on my machine, and I no longer get that error. Don't know if that was coincidence or not.
from termbox-go.
I take that back, kind of. My simple little program runs without error now, though nothing is visible from my call to SetCell. It does wait on events, fmt.Println prints to the screen, and it quits correctly on a key press. However, I still get the same error when I try to run any of your demo programs.
from termbox-go.
You need to call termbox.Flush(), that submits everything to the console. And I think you'll have your segfault if you do that.
from termbox-go.
It clearly works now on my w7-x64. Screenshot proof (godit.exe is a 64 bit process for sure):
http://ompldr.org/vZnAydg/godit-w64.png
from termbox-go.
Related Issues (20)
- device not configured HOT 5
- tmux-256color $TERM unsupported
- panic: The handle is invalid. HOT 1
- Keybindings not working on FreeBSD HOT 2
- Wine panics ("Invalid handle")
- build failure on gnu/hurd HOT 3
- Understanding character codes / sequences HOT 3
- Copy-pastable line wrap HOT 2
- Version tagging HOT 1
- Panic on FreeBSD host HOT 5
- ShowCursor Function
- Save current history/screen in plain text HOT 4
- Why output is ahead of my command rather than after?
- can it support emoji HOT 1
- Chinese characters support issue HOT 1
- KeyEnter and KeyCtrlM map to the same Hex value HOT 1
- Chinese character width occupation problem HOT 3
- how to use with custom pty example ssh
- How do I detect a double-click mouse event?
- Add support for SetOutputMode other than OutputNormal for Windows Terminal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from termbox-go.