Closed dirkvranckaert closed 2 years ago
Hi @dirkvranckaert
The error is not appearing often, just from time to time. I also cannot reproduce so far locally
With this kink of issue, it's really hard for anybody to nail down the culprit.
Can you try the latest library version, or even check and change your code, because the NullPointerException
(NPE) can also be created from any other portion of your code.
Remember the infamous BSOD
? Sometimes, in extreme cases, you have to live with that, and write code to recover from random crashes to minimize bad consequences.
If you're using ESP32/ESP8266, use ESP Exception Decoder
to hopefully isolate the bad code. If not using ESPs, you can port the code to ESP, run to see if random crashes still happen, then use use ESP Exception Decoder
.
Also without any minimal info, such as board, core, libraries' versions, your full code or MRE, I don't think anyone can help you out here.
Anyway, I'm closing the issue now, and only reopen when, hopefully, you can prove that this is a bug, which can make this library much better.
Good Luck,
From my production devices from time to time I gather a crash with exception cause 28 (LoadProhibitedCause, so basically a NPE) with the final traces within this library.
After checking the library locally the error is on this line:
My initialisation code for the open call looks like this:
The error is not appearing often, just from time to time. I also cannot reproduce so far locally. But I wonder if sometimes the
c_str()
could give an empty/false result making the library crash...?!The error has been installed like this because my production builds are generated with arduino-cli:
The version is
1.9.1
.Any other ideas we might be able to investigate? This is happening in production, I could roll out a new build with a new version, but result won't be seen very fast off course...