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 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog