Sketch Keeps Crashing Randomly

Sketch runs properly for a while. Usually around an hour then crashes and restarts. Can someone help me find the cause? Attached sketch.

dog_fence.ino (8.75 KB)

Install this and follow the documentation:

This is the decoder results:

[b][color=red]Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads[/color][/b]
[color=red]PC[/color]: [color=green]0x402014db: [/color][b][color=blue]getControls()[/color][/b] at C:\Users\Jereme\Documents\Arduino\dog_fence_2.0/[b]dog_fence_2.0.ino[/b] line [b]135[/b]
[color=red]EXCVADDR[/color]: [color=green]0x00000000[/color]

[i]Decoding stack results[/i]
[color=green]0x402014cb: [/color][b][color=blue]getControls()[/color][/b] at C:\Users\Jereme\Documents\Arduino\dog_fence_2.0/[b]dog_fence_2.0.ino[/b] line [b]134[/b]
[color=green]0x40201496: [/color][b][color=blue]getControls()[/color][/b] at C:\Users\Jereme\Documents\Arduino\dog_fence_2.0/[b]dog_fence_2.0.ino[/b] line [b]131[/b]
[color=green]0x40208e00: [/color][b][color=blue]sdfat::SdSpiAltDriver::send(unsigned char const*, unsigned int)[/color][/b] at C:\Users\Jereme\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266SdFat\src\SpiDriver\[b]SdSpiESP8266.cpp[/b] line [b]99[/b]
[color=green]0x40209401: [/color][b][color=blue]Print::printNumber(unsigned long, unsigned char)[/color][/b] at C:\Users\Jereme\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266\[b]Print.cpp[/b] line [b]254[/b]
[color=green]0x4020b741: [/color][b][color=blue]uart_write(uart_t*, char const*, size_t)[/color][/b] at C:\Users\Jereme\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266\[b]uart.cpp[/b] line [b]509[/b]
[color=green]0x4020938c: [/color][b][color=blue]Print::println()[/color][/b] at C:\Users\Jereme\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266\[b]Print.cpp[/b] line [b]186[/b]
[color=green]0x40201672: [/color][b][color=blue]loop()[/color][/b] at C:\Users\Jereme\Documents\Arduino\dog_fence_2.0/[b]dog_fence_2.0.ino[/b] line [b]105[/b]
[color=green]0x4020a798: [/color][b][color=blue]loop_wrapper()[/color][/b] at C:\Users\Jereme\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266\[b]core_esp8266_main.cpp[/b] line [b]197[/b]

Here's the segment reported as causing the crash:

      int n = payload.length();
      char char_array[n + 1];
      strcpy(char_array, payload.c_str());//converting the string to char
      CSV_Parser cp(char_array, /*format*/ "LL");
      int32_t *one = (int32_t*)cp[0];
      deviceControl = one[0];

The line that initializes one looks strange: take the first character of the payload and cast it as an int* pointer. I'm not sure what you're really trying to do there but I'm not surprised that what you have caused a crash.