NodeMCU 1.0 - Exception 9 `Fatal exception 9(LoadStoreAlignmentCause):`
Fatal exception 9(LoadStoreAlignmentCause):


This is caused by you (or some code you are running) attempting to read or write a 32 bit value from memory that is not "aligned" to 32 bits.  It is most often the result of trying to cast portions of a byte array (for instance a buffer received over UDP) to a 32-bit integer.  The compiler is not clever enough to know that the byte array portion you are casting isn't at a 32-bit boundary and thus doesn't know to use the 8-bit load/store instructions to access the memory.

Mapping a struct over a buffer can also have similar issues where the buffer is 8-bit aligned and the struct contains 32-bit words. 

You can combat it by forcing the alignment of any buffers which you treat in such a way with the __attribute__((aligned(4)) tag:

uint8_t __attribute__((aligned(4))) buffer[128];


You can also "pack" structures to tell the compiler "These variables are mis-aligned and should not be padded to 32-bits":

struct foo {
    uint8_t bar1;
    uint32_t bar2;
} __attribute__((packed));


If in doubt, though, just pull individual bytes out of buffers (or wherever) and build up your larger integers manually with bit shifting and OR operators (&lt;&lt; and |), and do the reverse for filling byte buffers.