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

关于压缩json字符串gzipData方法执行deflateInit2报错 #118

Open
roycheng92 opened this issue Apr 20, 2023 · 0 comments
Open

关于压缩json字符串gzipData方法执行deflateInit2报错 #118

roycheng92 opened this issue Apr 20, 2023 · 0 comments

Comments

@roycheng92
Copy link

roycheng92 commented Apr 20, 2023

机型:iPhone 8 系统版本:iOS16.3 网络环境:wifi
sdk 版本4.5.4

执行gzipData方法执行deflateInit2报错,报错信息如下:

#36 Thread
Caused by:Application received signal 11
callStackSymbols: {
libsystem_platform.dylib 0x0000000223178adc __bzero() (in libsystem_platform.dylib) + 28 
libz.1.dylib 0x00000002568260c4 gzflush() (in libz.1.dylib) + 160 
libz.1.dylib 0x0000000256823128 deflateInit2_() (in libz.1.dylib) + 412 
socMobile 0x0000000106103580 +[SAGzipUtility gzipData:] (in socMobile) (SAGzipUtility.m:95) 
socMobile 0x0000000105f3a9e0 -[SAFlushHTTPBodyInterceptor buildBodyWithInput:] (in socMobile) (SAFlushHTTPBodyInterceptor.m:56) 
socMobile 0x0000000105f3a874 -[SAFlushHTTPBodyInterceptor processWithInput:completion:] (in socMobile) (SAFlushHTTPBodyInterceptor.m:42) 
socMobile 0x0000000105fd4be0 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:152) 
socMobile 0x0000000105fd4ff0 __60-[SAFlowManager processWithTask:nodeIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:166) 
socMobile 0x0000000105f857d0 -[SAFlushJSONInterceptor processWithInput:completion:] (in socMobile) (SAFlushJSONInterceptor.m:0) 
socMobile 0x0000000105fd4be0 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:152) 
socMobile 0x0000000105fd4ff0 __60-[SAFlowManager processWithTask:nodeIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:166) 
socMobile 0x00000001061f8844 -[SAUpdateRecordInterceptor processWithInput:completion:] (in socMobile) (SAUpdateRecordInterceptor.m:46) 
socMobile 0x0000000105fd4be0 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:152) 
socMobile 0x0000000105fd4ff0 __60-[SAFlowManager processWithTask:nodeIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:166) 
socMobile 0x0000000105e1f794 -[SAEncryptInterceptor processWithInput:completion:] (in socMobile) (SAEncryptInterceptor.m:55) 
socMobile 0x0000000105fd4be0 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:152) 
socMobile 0x0000000105fd4ff0 __60-[SAFlowManager processWithTask:nodeIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:166) 
socMobile 0x000000010601771c -[SAQueryRecordInterceptor processWithInput:completion:] (in socMobile) (SAQueryRecordInterceptor.m:0) 
socMobile 0x0000000105fd4be0 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:152) 
socMobile 0x0000000105fd4ff0 __60-[SAFlowManager processWithTask:nodeIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:166) 
socMobile 0x00000001060ae2a4 -[SACanFlushInterceptor processWithInput:completion:] (in socMobile) (SACanFlushInterceptor.m:44) 
socMobile 0x0000000105fd4be0 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:152) 
socMobile 0x0000000105fd4938 -[SAFlowManager processWithFlow:taskIndex:input:completion:] (in socMobile) (SAFlowManager.m:135) 
socMobile 0x0000000105fd507c __60-[SAFlowManager processWithFlow:taskIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:0) 
socMobile 0x0000000105fd4c44 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:167) 
socMobile 0x0000000105fd4ff0 __60-[SAFlowManager processWithTask:nodeIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:166) 
socMobile 0x000000010603a164 -[SASerialQueueInterceptor processWithInput:completion:] (in socMobile) (SASerialQueueInterceptor.m:0) 
socMobile 0x0000000105fd4be0 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:152) 
socMobile 0x0000000105fd4938 -[SAFlowManager processWithFlow:taskIndex:input:completion:] (in socMobile) (SAFlowManager.m:135) 
socMobile 0x0000000105fd46b0 -[SAFlowManager startWithFlow:input:completion:] (in socMobile) (SAFlowManager.m:0) 
socMobile 0x0000000105fd4534 -[SAFlowManager startWithFlowID:input:completion:] (in socMobile) (SAFlowManager.m:0) 
socMobile 0x00000001061acfd0 __58-[SensorsAnalyticsSDK flushAllEventRecordsWithCompletion:]_block_invoke (in socMobile) (SensorsAnalyticsSDK.m:1028) 
socMobile 0x0000000105fd505c __60-[SAFlowManager processWithFlow:taskIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:0) 
socMobile 0x0000000105fd4fd0 __60-[SAFlowManager processWithTask:nodeIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:0) 
socMobile 0x000000010601771c -[SAQueryRecordInterceptor processWithInput:completion:] (in socMobile) (SAQueryRecordInterceptor.m:0) 
socMobile 0x0000000105fd4be0 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:152) 
socMobile 0x0000000105fd4ff0 __60-[SAFlowManager processWithTask:nodeIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:166) 
socMobile 0x00000001060ae2a4 -[SACanFlushInterceptor processWithInput:completion:] (in socMobile) (SACanFlushInterceptor.m:44) 
socMobile 0x0000000105fd4be0 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:152) 
socMobile 0x0000000105fd4938 -[SAFlowManager processWithFlow:taskIndex:input:completion:] (in socMobile) (SAFlowManager.m:135) 
socMobile 0x0000000105fd507c __60-[SAFlowManager processWithFlow:taskIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:0) 
socMobile 0x0000000105fd4c44 -[SAFlowManager processWithTask:nodeIndex:input:completion:] (in socMobile) (SAFlowManager.m:167) 
socMobile 0x0000000105fd4ff0 __60-[SAFlowManager processWithTask:nodeIndex:input:completion:]_block_invoke (in socMobile) (SAFlowManager.m:166) 
libdispatch.dylib 0x00000001e16bb850 _dispatch_call_block_and_release() (in libdispatch.dylib) + 24 
libdispatch.dylib 0x00000001e16bc7c8 _dispatch_client_callout() (in libdispatch.dylib) + 16 
libdispatch.dylib 0x00000001e1697800 _dispatch_lane_serial_drain$VARIANT$armv81() (in libdispatch.dylib) + 604 
libdispatch.dylib 0x00000001e1698290 _dispatch_lane_invoke$VARIANT$armv81() (in libdispatch.dylib) + 380 
libdispatch.dylib 0x00000001e16a2000 _dispatch_workloop_worker_thread() (in libdispatch.dylib) + 612 
libsystem_pthread.dylib 0x0000000223210b50 _pthread_wqthread() (in libsystem_pthread.dylib) + 284 
}

原本代码:

    int initError = deflateInit2(&zlibStreamStruct, Z_DEFAULT_COMPRESSION, Z_DEFLATED, (15 + 16), 8, Z_DEFAULT_STRATEGY);

这里尝试使用try catch忽略这部分代码,但是发现报错不是在objective-c层,无法catch相关报错。
请问这个bug如何解决?

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