LLCOMM dataReceived is sometimes ignored


My coworkers and I have found a bug in the ECOM-comm module (version 1.1.4). In our Java code, we call the read(byte[]) method on a serial input and it blocks until a packet is received. In our custom connection implementation in C, we call LLCOMM_CUSTOM_CONNECTION_dataReceived(LLCOMM_CUSTOM_CONNECTION*) when a packet is received to trigger the read of the packet by the Java.

Most of the time, it works perfectly, but sometimes the call to dataReceived seems to be ignored due to a bad timing. This can happen when the read is called in Java and shortly after (~ 1 millisecond) a packet is received (and dataReceived is called). In this case, the packet won’t be read and the read method in Java will block forever, like if dataReceived was never called.

We have a workaround which call again dataReceived when the bug appear, but it is neither efficient nor clean. If a new version of the ECOM-comm module fixes this bug, please notify me.

Best regards,
Yoann Jézégou, developer at Otodo

Hello Yoann,

Thanks for reporting this bug. We are going to investigate the issue.

We will keep you informed when a new version of ECOM-comm will be available.

Kind regards,

Alex Colleux