TMRh20 / nrf_to_nrf

OSI Layer 2 (ESB) Radio Driver for NRF52x
https://tmrh20.github.io/nrf_to_nrf/html
GNU General Public License v3.0
22 stars 4 forks source link

Issue with crashing w/RF24Network and higher libs w/Feather 82450 Express #8

Closed TMRh20 closed 1 year ago

TMRh20 commented 1 year ago

I just identified an issue with crashing, but it only seems to affect my new Feather 82450 Express board, not my XIAO BLE Sense board. In any case, it has to do with requesting a NULL value for pipe number in the available() function. On the Feather anyway, changing it to use a defined variable fixes the crashing. Logging this issue because it may also affect the RF24 library on different boards, it uses the same behaviour. Fix incoming.

2bndy5 commented 1 year ago

Did you try using null_ptr instead?

2bndy5 commented 1 year ago

NM, I think use of null_ptr might need a void* parameter type.

TMRh20 commented 1 year ago

I just tested using nullptr and same behaviour. I think because its a null value, the device has nowhere to put the data, so it causes an overflow & subsequent crash. Took me forever to track this down too. Pretty sure it would be a good idea to change in RF24 as well.

2bndy5 commented 1 year ago

It is also good that you initialized the var to 0. This would be needed for consistent behavior in pyRF24 wrapper as well.