openimsdk / open-im-android-demo

IM Android
https://openim.io
92 stars 89 forks source link

[Other]: Crash after calling login (with attached Go log) #28

Closed yedashen closed 10 months ago

yedashen commented 1 year ago

What would you like to share?

调用OpenIMClient.getInstance().login 回调success,但是出现如下日志,然后app crash了。

2023-09-12 10:43:53.942 24580-0/? E/Go: panic: runtime error: invalid memory address or nil pointer dereference 2023-09-12 10:43:53.942 24580-0/? E/Go: [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x706f9eccd4] 2023-09-12 10:43:53.942 24580-0/? E/Go: 2023-09-12 10:43:53.942 24580-0/? E/Go: goroutine 23 [running]: 2023-09-12 10:43:53.942 24580-0/? E/Go: open_im_sdk/internal/conversation_msg.(Conversation).doNotificationNew(0x40004c2ea0, {{0x706fbd8e86, 0x3}, {0x706fdf15a0, 0x40000322e0}, {0x706feba5e0, 0x40003aeea0}}) 2023-09-12 10:43:53.942 24580-0/? E/Go: open_im_sdk@v0.0.0-00010101000000-000000000000/internal/conversation_msg/conversation_notification.go:644 +0x184 2023-09-12 10:43:53.942 24580-0/? E/Go: open_im_sdk/internal/conversation_msg.(Conversation).Work(0x400006df18?, {{0x706fbd8e86, 0x3}, {0x706fdf15a0, 0x40000322e0}, {0x706feba5e0, 0x40003aeea0}}) 2023-09-12 10:43:53.942 24580-0/? E/Go: open_im_sdk@v0.0.0-00010101000000-000000000000/internal/conversation_msg/conversation_notification.go:48 +0x248 2023-09-12 10:43:53.942 24580-0/? E/Go: open_im_sdk/pkg/common.DoListener({0x706feb83c0, 0x40004c2ea0}, {0x706feba538, 0x4000158050}) 2023-09-12 10:43:53.942 24580-0/? E/Go: open_im_sdk@v0.0.0-00010101000000-000000000000/pkg/common/trigger_channel.go:212 +0x70 2023-09-12 10:43:53.942 24580-0/? E/Go: created by open_im_sdk/internal/login.(*LoginMgr).login 2023-09-12 10:43:53.942 24580-0/? E/Go: open_im_sdk@v0.0.0-00010101000000-000000000000/internal/login/init_login.go:297 +0x1058

Additional information

No response

EthanForAi commented 1 year ago

which version?

yedashen commented 1 year ago

implementation 'io.openim:android-sdk:3.1.0@aar' implementation 'io.openim:core-sdk:3.1.0@aar'

skiffer-git commented 1 year ago

Without making any changes, will the demo run properly if executed directly?

Oliver-WJ commented 10 months ago

Please set listener first and then call login