Chat freely about anything...

User avatar
By LBussy
#83462 I have been chasing this for a while. It's possible this may be well known but not necessarily documented to the point where I was able to find it.

I get a random crash in my project. When searching for REALLY basic stuff like "how the heck do I debug an ESP8266 crash?" I find the ubiquitous reference in the FAQ to a tool called EspExceptionDecoder which I'm apparently too stupid to get to run with PlatformIO. I was able to get GDB to give me some information, however ... but part 1 of this is "Has anyone been able to get EspExceptionDecoder to work with PlatformIO?"

Part 2 is more specific. I get the device to crash fairly regularly in the same place (but not always.)

Code: Select allFatal exception 28(LoadProhibitedCause)

So far it's always been in an external library but not the same one every time. For instance, once time it looked like it was in WiFi Manager (for which I forgot to record the notes of course) and now it is crashing in NTPClient:

Code: Select all0x40210a5f <NTPClient::sendNTPPacket()+67>:     0x2c38e358

The only consistency between the (so far) two crashes is that it comes when trying to make some sort of network connection. I should also mention at this point that it happens "after a while" and certainly is not every time.

I have put in some debug on the memory:

Code: Select allDEBUG: getFreeHeap(): 34120, getHeapFragmentation(): 2, getMaxFreeBlocks(): 33576

... which stays fairly consistent and shows no weird changes immediately prior to the crash.

I know I have more "typical debug" work to do. It does raise a question in my mind however if network communication in a potentially sub-optimal WiFi network is known to cause issues in standard libraries, and/or if there's a well known (to everyone but me) manner of dealing with it? Since it's popped up in two different libraries with no changes in between, it just makes me wonder.
User avatar
By QuickFix
#83469 What's your hardware and used power supply?
Maybe it's not a software problem after all. :idea:
User avatar
By LBussy
#83471 Valid question.

Bare board only and a 2A power supply I have been using quite some time. It’s possibly it’s going bad. It’s possible I have a bad board too.

Like I said I clearly have work I’ve not done. It’s just that “random” crashing in network related libraries makes me wonder about any know challenges with networking. Anything like “oh yeah when you lose connection to WAP mid-stream weird things happen so do this.”

If nothing like that, I know what I will be doing Saturday.
User avatar
By LBussy
#83474 Sorry - can't figure out how to edit my post.

If by the hardware you meant "which board?" it's a Wemos D1 Mini R2. I removed the shield for debugging so there's nothing but the USB plugged in.

Actually, right now it's plugged into my laptop for easier debugging since this started. I can always switch to a powered USB hub.