I have run into another NDK problem. It seems that if we are calling send() in a very tight loop, the NDK will crash in the PBMQ_enq() function.
The Pq->pTail->pNext pointer is NULL.
I have tracked this down (and think) it happens when PBMQ_free list runs out of buffers. I've put some code in the PBMQ_deq () function to break if the
PBMQ_free.pHead and PBMQ_free.pTail is to be set to NULL. The PBMQ_free.Count is in this case set to "1" (Last free item ?).
I attach some screendumps of memory views and stack traces.
I hope this can make it easier for you to understand the problem.
If I make a Task_sleep(1) between the send() calls, this never happens.
See attached file.2626.PBMQ problems.zip
BR:
Per-Anders