dzhou121 / gonvim

MIT License
1.79k stars 34 forks source link

Immediate segfault upon key press #90

Open jvoisin opened 6 years ago

jvoisin commented 6 years ago

Hello, I've got an immediate crash when I'm pressing any key, with this config, using the 0.2.2:

jvoisin@mim 13:33 ~/app/gonvim bash gonvim.sh 
Qt WebEngine ICU data not found at /opt/Qt/5.10.0/gcc_64/resources. Trying parent directory...
Qt WebEngine ICU data not found at /opt/Qt/5.10.0/gcc_64. Trying application directory...
Installed Qt WebEngine locales directory not found at location /opt/Qt/5.10.0/gcc_64/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine resources not found at /opt/Qt/5.10.0/gcc_64/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/Qt/5.10.0/gcc_64. Trying application directory...
Qt WebEngine ICU data not found at /opt/Qt/5.10.0/gcc_64/resources. Trying parent directory...
Qt WebEngine ICU data not found at /opt/Qt/5.10.0/gcc_64. Trying application directory...
Installed Qt WebEngine locales directory not found at location /opt/Qt/5.10.0/gcc_64/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine resources not found at /opt/Qt/5.10.0/gcc_64/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/Qt/5.10.0/gcc_64. Trying application directory...
[10993:11020:0215/133310.628188:ERROR:nss_util.cc(750)] After loading Root Certs, loaded==false: NSS error code: -8018
Unhandle event mode_info_set
Unhandle event mode_info_set
Unhandle event mode_info_set
Received signal 11 SEGV_MAPERR 7f3349c35032
#0 0x7f3368a6c9a5 <unknown>
#1 0x7f33677ac501 <unknown>
#2 0x7f3368a6cd3d <unknown>
#3 0x7f3370733150 <unknown>
#4 0x00000050e65c <unknown>
  r8: 0000000000000200  r9: 0000000000000011 r10: 0000000000000010 r11: 0000000000000207
 r12: 00007f3349ec2010 r13: 00007f33718e1010 r14: 00007f33718e4010 r15: 00007f33718e4010
  di: 000000c4202940f0  si: 00007f3349c35032  bp: 000000c420147a88  bx: 0000000000000001
  dx: 0000000000000001  ax: 0000000000000001  cx: 0000000000000001  sp: 000000c420147a40
  ip: 000000000050e65c efl: 0000000000010297 cgf: 002b000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 00007f3349c35032
[end of stack trace]
Calling _exit(1). Core file will not be generated.
zsh: exit 1     bash gonvim.sh
jvoisin@mim 13:33 ~/app/gonvim 
dzhou121 commented 6 years ago

Can you please let me know your OS and version?

jvoisin commented 6 years ago

Sure:

jvoisin@mim 10:20 ~ lsb_release -a; uname -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:    17.10
Codename:   artful
Linux mim 4.13.0-32-generic #35-Ubuntu SMP Thu Jan 25 09:13:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
jvoisin@mim 10:20 ~ 
qazip commented 6 years ago
Qt WebEngine ICU data not found at /opt/Qt/5.10.0/gcc_64/resources. Trying parent directory...
Qt WebEngine ICU data not found at /opt/Qt/5.10.0/gcc_64. Trying application directory...
Installed Qt WebEngine locales directory not found at location /opt/Qt/5.10.0/gcc_64/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine resources not found at /opt/Qt/5.10.0/gcc_64/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/Qt/5.10.0/gcc_64. Trying application directory...
Qt WebEngine ICU data not found at /opt/Qt/5.10.0/gcc_64/resources. Trying parent directory...
Qt WebEngine ICU data not found at /opt/Qt/5.10.0/gcc_64. Trying application directory...
Installed Qt WebEngine locales directory not found at location /opt/Qt/5.10.0/gcc_64/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine resources not found at /opt/Qt/5.10.0/gcc_64/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/Qt/5.10.0/gcc_64. Trying application directory...
Unhandle event option_set
Unhandle event default_colors_set
Unhandle event option_set
Unhandle event mode_info_set
Unhandle event default_colors_set
Unhandle event option_set
Unhandle event mode_info_set
panic: runtime error: slice bounds out of range

goroutine 1 [running, locked to thread]:
github.com/dzhou121/gonvim/editor.(*Cmdline).getText(0xc4201bdb90, 0x0, 0x0, 0xc4203277f8, 0xc4203277f8)
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/editor/cmdline.go:49 +0x23b
github.com/dzhou121/gonvim/editor.(*Cmdline).show(0xc4201bdb90, 0xc420264790, 0x1, 0x1)
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/editor/cmdline.go:67 +0x1e2
github.com/dzhou121/gonvim/editor.(*Workspace).handleRedraw(0xc4201ca780, 0xc4202bec80, 0x3, 0x3)
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/editor/workspace.go:483 +0x148a
github.com/dzhou121/gonvim/editor.newWorkspace.func1()
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/editor/workspace.go:85 +0x8b
github.com/dzhou121/gonvim/editor.callbackworkspaceSignal_RedrawSignal(0x1d2bfe0)
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/editor/moc.go:848 +0x70
github.com/dzhou121/gonvim/editor._cgoexpwrap_55eba99f7d53_callbackworkspaceSignal_RedrawSignal(0x1d2bfe0)
    github.com/dzhou121/gonvim/editor/_obj/_cgo_gotypes.go:1841 +0x2b
github.com/dzhou121/gonvim/editor._Cfunc_workspaceSignal_EventDefault(0x1d2bfe0, 0x7fde18000a40, 0x0)
    github.com/dzhou121/gonvim/editor/_obj/_cgo_gotypes.go:1120 +0x4a
github.com/dzhou121/gonvim/editor.(*workspaceSignal).EventDefault.func1(0x1d2bfe0, 0x7fde18000a40, 0x7fde18000a40)
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/editor/moc.go:1348 +0xa3
github.com/dzhou121/gonvim/editor.(*workspaceSignal).EventDefault(0xc42008f590, 0x126a080, 0xc4201eeb88, 0x5)
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/editor/moc.go:1348 +0x74
github.com/dzhou121/gonvim/editor.callbackworkspaceSignal_Event(0x1d2bfe0, 0x7fde18000a40, 0xc400000008)
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/editor/moc.go:1343 +0x151
github.com/dzhou121/gonvim/editor._cgoexpwrap_55eba99f7d53_callbackworkspaceSignal_Event(0x1d2bfe0, 0x7fde18000a40, 0x0)
    github.com/dzhou121/gonvim/editor/_obj/_cgo_gotypes.go:1945 +0x35
github.com/therecipe/qt/widgets._Cfunc_QApplication_QApplication_Exec(0x0)
    github.com/therecipe/qt/widgets/_obj/_cgo_gotypes.go:1082 +0x49
github.com/therecipe/qt/widgets.QApplication_Exec(0xc420011940)
    /home/user/work/src/github.com/therecipe/qt/widgets/widgets-minimal.go:1107 +0x22
github.com/dzhou121/gonvim/editor.InitEditor()
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/editor/editor.go:174 +0x629
main.main()
    /media/sf_GOPATH0/src/github.com/dzhou121/gonvim/cmd/gonvim/gonvim.go:15 +0x3a

I am using Ubuntu 16.04.