I am working with a DM6446, dvevm_1_20, codec_engine_1_10_01. I am trying to restart (delete and create) a codec many times for stress testing. It keeps failing on the 128th restart. For successful restarts, I see a log like this:
[DSP] @0x78dbcd78:[T:0x8fb3b244] CR - processRmsCmd(0x8fe01928, 4056): cmd = 0
[DSP] @0x78dbcdbf:[T:0x8fb3b244] OM - Memory_alloc> Enter(size=0x18)
[DSP] @0x78dbcdf7:[T:0x8fb3b244] OM - Memory_alloc> return (0x8fb42b68)
[DSP] @0x78dbce30:[T:0x8fb3b244] OM - Memory_alloc> Enter(size=0xf)
[DSP] @0x78dbce62:[T:0x8fb3b244] OM - Memory_alloc> return (0x8fb42b80)
[DSP] @0x78dbce9d:[T:0x8fb3b244] OM - Memory_alloc> Enter(size=0x20)
[DSP] @0x78dbced0:[T:0x8fb3b244] OM - Memory_alloc> return (0x8fb42b90)
[DSP] @0x78dbcf0a:[T:0x8fb3b244] OM - Memory_alloc> Enter(size=0x24)
[DSP] @0x78dbcf3e:[T:0x8fb3b244] OM - Memory_alloc> return (0x8fb42bb0)
(followed by successful VISA_create call for the codec)
For the unsuccessful restart, I see this:
[DSP] @0x79cd6509:[T:0x8fb3b244] CR - processRmsCmd(0x8fe01928, 4056): cmd = 5
[DSP] @0x79cd6548:[T:0x8fb3b244] CR - remote time = 0x0, trace buffer size = 4032
(then the VISA_Create fails)
So it looks like on the 128th try, for some reason the VISA_Create doesn't create a node and allocate buffers, but instead gets the trace data.
If I call Engine_getLastError() after the failure, I get error 4, which is
#define Engine_ENOCOMM 4 /**< Unable to create a comm connection to the DSP.*/
I tried putting a 3 minute pause in the restart code at restart 126 to see if there was a timing issue, but the problem remains.
Another test I ran: The application deletes/creates the codec in one thread, and makes the process calls in a different thread. A semaphore is used as a mutex so that only one thread at a time can access the codec. In the test that fails, the process task processes a few frames of video between restarts. If I do a tight loop and restart more than 128 times without letting the process task run (i.e. I hold on to the mutex in the delete/create task), then I do not see the problem.
Any suggestions? Am I hitting some limit on an 8-bit signed value in the codec engine?