doulan3966 2019-08-24 02:35
浏览 136
已采纳

运行Hello Couchbase应用程序时出现紧急运行时错误[关闭]

Installed go SDK 1.6 following the instructions given here: https://docs.couchbase.com/go-sdk/current/start-using-sdk.html Created Hello Couchbase application as listed on the above page. While running the application, the program panics at the line :slight_smile: for rows.Next(&row) { and produces the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x12d66b2]

Go version prints the following: go version go1.12.9 darwin/amd64 macOS version 10.14.6

  • 写回答

1条回答 默认 最新

  • dongmiao4733 2019-08-24 03:30
    关注

    Once you’ve installed the SDK you can run this simple code snippet showcasing some of its features.

    Error checking has been omitted for brevity.

    https://docs.couchbase.com/go-sdk/current/start-using-sdk.html


    In Go, always check for errors. If you check for errors, what errors occur?

    The error

    panic: runtime error: invalid memory address or nil pointer dereference
    

    often indicates that an error was ignored.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器