Skip to content

Conversation

@mdejong
Copy link

@mdejong mdejong commented Jan 13, 2022

Hello. I ran into a crash in the block passed to dispatch_io_read and from what I could see it seemed to be caused by data being set to nil. This is my attempt to address that crash by setting dataSize to 0. This seemed to be a random one time situation and I have not been able to reproduce the issue since.

@mdejong
Copy link
Author

mdejong commented Jan 13, 2022

FYI, the done flag was true when this crash was hit. The stack trace looked like this:

* thread #7, queue = 'com.apple.libdispatch-io.opq', stop reason = EXC_BAD_ACCESS (code=1, address=0x30)
frame #0: 0x000000018142c480 libdispatch.dylib`dispatch_data_get_size
* frame #1: 0x00000001010af560 ___`__53-[PTProtocol readPayloadOfSize:overChannel:callback:]_block_invoke(.block_descriptor=0x00000002820588a0, done=true, data=0x0000000000000000, error=57) at PTProtocol.m:247:23
frame #2: 0x000000018142be44 libdispatch.dylib`___dispatch_operation_deliver_data_block_invoke + 148

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

Successfully merging this pull request may close these issues.

1 participant