Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msg.SenderInGroup() 频繁报错导致程序退出运行 #548

Open
wordgao opened this issue Nov 2, 2024 · 0 comments
Open

msg.SenderInGroup() 频繁报错导致程序退出运行 #548

wordgao opened this issue Nov 2, 2024 · 0 comments

Comments

@wordgao
Copy link

wordgao commented Nov 2, 2024

`
//获取消息在群里面的发送者
senderFrom, _ := msg.SenderInGroup()

//TODO senderFrom.NickName 程序几乎运行不定时的出现程序恐慌,导致程序退出运行。
nike:= fmt.Sprintf("%s\n", senderFrom.NickName)
fmt.Println(nike)

`

错误代码

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

goroutine 120 [running]:
main.start.func1(0xc00064c008)
/home/nisa/go/src/softlist/openwx/main.go:131 +0x428
github.com/eatmoreapple/openwechat.(*Bot).syncCheck(0xc00035a0e0)
/home/nisa/go/pkg/mod/github.com/eatmoreapple/[email protected]/bot.go:245 +0x271
github.com/eatmoreapple/openwechat.(*Bot).webInit.func1()
/home/nisa/go/pkg/mod/github.com/eatmoreapple/[email protected]/bot.go:186 +0x8c
created by github.com/eatmoreapple/openwechat.(*Bot).webInit in goroutine 1
/home/nisa/go/pkg/mod/github.com/eatmoreapple/[email protected]/bot.go:178 +0x326

Process finished with the exit code 2

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant