更新推送的时候崩溃 [EMPushOptions(Private) toCorePtrWithoutIgnoredGroupIds]
出现问题部分的代码如下
Bugly收集到的崩溃日志如下
SEGV_ACCERR
[EMPushOptions(Private) toCorePtrWithoutIgnoredGroupIds]
堆栈如下
#0 Thread
SIGSEGV
SEGV_ACCERR
0 libsystem_c.dylib strlen + 12
1 KHW -[EMPushOptions(Private) toCorePtrWithoutIgnoredGroupIds] + 132
2 KHW -[EMPushOptions(Private) toCorePtrWithoutIgnoredGroupIds] + 132
3 KHW -[EMClient updatePushOptionsToServer] + 232
4 KHW -[XYChatManager updateHXConfig:] (XYChatManager.m:197)
5 libdispatch.dylib __dispatch_call_block_and_release + 24
6 libdispatch.dylib __dispatch_client_callout + 16
7 libdispatch.dylib _dispatch_main_queue_callback_4CF + 1000
8 CoreFoundation ___CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
9 CoreFoundation ___CFRunLoopRun + 1660
10 CoreFoundation CFRunLoopRunSpecific + 444
11 GraphicsServices GSEventRunModal + 180
12 UIKit -[UIApplication _run] + 684
13 UIKit UIApplicationMain + 208
14 KHW main (main.m:14)
15 libdyld.dylib _start + 4
现将代码修改为
EMPushOptions *option = [[EMClient sharedClient] getPushOptionsFromServerWithError:nil];具体表现是当环信服务器连接不上或者出现问题时,线上大规模的Crash。平时也有零星的Crash。
option.displayStyle = EMPushDisplayStyleMessageSummary;
EMError *error=[[EMClient sharedClient] updatePushOptionsToServer];
Bugly收集到的崩溃日志如下
SEGV_ACCERR
[EMPushOptions(Private) toCorePtrWithoutIgnoredGroupIds]
堆栈如下
#0 Thread
SIGSEGV
SEGV_ACCERR
0 libsystem_c.dylib strlen + 12
1 KHW -[EMPushOptions(Private) toCorePtrWithoutIgnoredGroupIds] + 132
2 KHW -[EMPushOptions(Private) toCorePtrWithoutIgnoredGroupIds] + 132
3 KHW -[EMClient updatePushOptionsToServer] + 232
4 KHW -[XYChatManager updateHXConfig:] (XYChatManager.m:197)
5 libdispatch.dylib __dispatch_call_block_and_release + 24
6 libdispatch.dylib __dispatch_client_callout + 16
7 libdispatch.dylib _dispatch_main_queue_callback_4CF + 1000
8 CoreFoundation ___CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
9 CoreFoundation ___CFRunLoopRun + 1660
10 CoreFoundation CFRunLoopRunSpecific + 444
11 GraphicsServices GSEventRunModal + 180
12 UIKit -[UIApplication _run] + 684
13 UIKit UIApplicationMain + 208
14 KHW main (main.m:14)
15 libdyld.dylib _start + 4
现将代码修改为
EMError *err=nil;不知道是否可以解决此问题。谢谢。
EMPushOptions *option = [[EMClient sharedClient] getPushOptionsFromServerWithError:&err];
option.displayStyle = EMPushDisplayStyleMessageSummary;
if(err)
{
//上报错误
return;
}
EMError *error=[[EMClient sharedClient] updatePushOptionsToServer];
没有找到相关结果
已邀请:
3 个回复
[已注销]
getPushOptionsFromServerWithErro
崩溃
S_Criminal
[EMClient updatePushOptionsToServer]
只不过我还多了更内部的一句
[EMPushOptions(Private) toCorePtrWithoutIgnoreGroupIds]
[已注销]
[[EMClient sharedClient] updatePushOptionsToServer]和
[[EMClient sharedClient] getPushOptionsFromServerWithError:&err]
是否在登录成功之后