robbiehanson/CocoaAsyncSocket — Issue #12: Error when receive multiple data at a time
Author: Vermond
Created: 2011-12-20 04:56:30+00:00
State: open

I`m using GCDAsyncUDPSocket.

Because of some reason, I send a message and server get it.
Server check it and answer.

There is two type of answer. First is just transfer data once. Second is transfer 20 times.

When receive a data, It works well. The problem is second type.

It randomly stops with error.

Thread x : Program received signal: "SIGABRT"
malloc : *** error for object 0x?????? : pointer being freed was not allocated

Error occurs almost in [-(void) notifyDidCloseWithError:(NSError *) error] but some other method also.
(I don`t know well because I didn`t captured all of error)
And occurs in Thread 2 (don`t think it`s so important but no clear.... :( )

At the first time, I thought there is some problem with allocated resources. So I tried UDP communication with just using your library, don`t allocate other resource. But same error occured.

My project using ARC option but I added option [-fno-objc-arc] on your source.

Oh... I have searched about this problem... Please help ;(