dragam0217 2017-09-28 20:19
浏览 6

如何跟踪恐慌错误:切片范围超出范围

My program crashes with the error below. Usually I could find the lines of my code causing the panic but now there is only Go specific code. Is there any option to increase the size of the lines/stack traced (i.e. up code causing the panic)?

panic: runtime error: slice bounds out of range

goroutine 1354 [running]:
io.copyBuffer(0x4c9da60, 0xc420142c88, 0x4c9b5a0, 0xc4206e1c80, 0xc42068a000, 0x8000, 0x8000, 0xc42001b370, 0xc42001b300, 0x47846a0)
    /usr/local/Cellar/go/1.9/libexec/src/io/io.go:394 +0x340
io.Copy(0x4c9da60, 0xc420142c88, 0x4c9b5a0, 0xc4206e1c80, 0xc42024533e, 0xc4202c5c80, 0x4916258)
    /usr/local/Cellar/go/1.9/libexec/src/io/io.go:362 +0x68
os/exec.(*Cmd).stdin.func1(0xc420291c28, 0xc4206d1d80)
    /usr/local/Cellar/go/1.9/libexec/src/os/exec/exec.go:219 +0x55
os/exec.(*Cmd).Start.func1(0xc420136580, 0xc4206f94e0)
    /usr/local/Cellar/go/1.9/libexec/src/os/exec/exec.go:380 +0x27
created by os/exec.(*Cmd).Start
    /usr/local/Cellar/go/1.9/libexec/src/os/exec/exec.go:379 +0x646

OS

$ go version
go version go1.9 darwin/amd64
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
    • ¥500 52810做蓝牙接受端
    • ¥15 基于PLC的三轴机械手程序
    • ¥15 多址通信方式的抗噪声性能和系统容量对比
    • ¥15 winform的chart曲线生成时有凸起
    • ¥15 msix packaging tool打包问题
    • ¥15 finalshell节点的搭建代码和那个端口代码教程
    • ¥15 Centos / PETSc / PETGEM
    • ¥15 centos7.9 IPv6端口telnet和端口监控问题
    • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作