Hi
I am using NDK 2.20.04.26 and am working with the NDK helloWorld example.
I have added code to poll an open TCP/IP socket for data, using fdSelect:
timeval timeOut;
timeOut.
tv_sec = 0;
timeOut.
tv_usec = a_uSecTimeout;
fd_set readFDs;
FD_ZERO(&readFDs);
FD_SET(a_socket,&readFDs);
int retVal = fdSelect( 0, &readFDs, 0, 0, &timeOut );
This works fine the first few times that I call it but then a stack overflow occurs in the fdSelect() call:
ti.sysbios.knl.Task: line 345: E_spOutOfBounds: Task 0xc0b9b28 stack error, SP = 0xc0a6cd0.
xdc.runtime.Error.raise: terminating execution
I guess the logical thing to do is to increase the size of the stack for that task. However, the task is spawned by the TCP/IP server daemon:
hHello = DaemonNew( SOCK_STREAMNC, inet_addr(LocalIPAddr), 3000, dtask_tcpip_server, OS_TASKPRINORM, OS_TASKSTKNORM, 0, 3 );
Changing OS_TASKSTKNORM to OS_TASKSTKHIGH makes no improvement.
How can I debug or fix this please?
Best regards
David