user62948: i have one project that can ready compiled. The function is break on the hardware an i need help to finde the error. I am a beginner and ask for help. How can I narrow the error down?
Sketch:

SIGNALESP.ino (https://github.com/HomeAutoUser/ERROR_search/tree/master/SIGNALESP)

Platform

Hardware: AZDelivery NodeMCU Lua Amica Modul V2 ESP8266 ESP-12E
Core Version: latest git
Development Env: Arduino IDE
Operating System: Windows

Settings in IDE

Module: Nodemcu v1.0
Flash Size: 4MB
Flash Frequency: 40Mhz
CPU Frequency: 80Mhz
Upload Speed: 115200

Problem Description
15:54:11.662 -> Fatal exception 3(LoadStoreErrorCause):
15:54:11.662 -> epc1=0x4000e041, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4024bcc2, depc=0x00000000
15:54:11.701 -> 
15:54:11.701 -> Exception (3):
15:54:11.701 -> epc1=0x4000e041 epc2=0x00000000 epc3=0x00000000 excvaddr=0x4024bcc2 depc=0x00000000
15:54:11.701 ->
15:54:11.701 -> >>>stack>>>
15:54:11.701 ->
15:54:11.701 -> ctx: cont
15:54:11.701 -> sp: 3ffffce0 end: 3fffffc0 offset: 01a0
15:54:11.701 -> 3ffffe80:  00000000 00000019 4024bcaa 00000000
15:54:11.701 -> 3ffffe90:  00000001 3fff16a4 00000000 000001ff
15:54:11.701 -> 3ffffea0:  00000000 00000019 401003fc 0001687b
15:54:11.701 -> 3ffffeb0:  00000000 00000000 00000001 4024bcaa
15:54:11.701 -> 3ffffec0:  00000000 00000019 3fff1134 4020ef28
15:54:11.701 -> 3ffffed0:  ffffffff 3fffc6fc 00000001 4024bcaa
15:54:11.741 -> 3ffffee0:  00000001 00000000 3fff1134 4020efc2
15:54:11.741 -> 3ffffef0:  00000019 00000000 3fff1134 4020f09d
15:54:11.741 -> 3fffff00:  40214e08 00000000 00001388 00000057
15:54:11.741 -> 3fffff10:  4020f060 3ffef254 4024bcaa 4021104d
15:54:11.741 -> 3fffff20:  3ffef10c 3ffef10c 3ffef254 40211275
15:54:11.741 -> 3fffff30:  007a1200 3ffef10c 3ffeeec0 402019b9
15:54:11.741 -> 3fffff40:  00000000 00000000 00000001 40100304
15:54:11.741 -> 3fffff50:  3ffef10c 00000000 3fff1134 4020f130
15:54:11.741 -> 3fffff60:  3ffef10c 3ffef254 0000000d 3ffef115
15:54:11.781 -> 3fffff70:  3ffef10c 3ffef254 3ffeeec0 402027dd
15:54:11.781 -> 3fffff80:  3fffdad0 00000000 3ffef728 3ffef768
15:54:11.781 -> 3fffff90:  3fffdad0 00000000 3ffef728 40202849
15:54:11.781 -> 3fffffa0:  3fffdad0 00000000 3ffef728 40212b68
15:54:11.781 -> 3fffffb0:  feefeffe feefeffe 3ffe8500 40101059
15:54:11.781 -> <<<stack<<<
15:54:11.781 -> 
15:54:11.781 ->  ets Jan  8 2013,rst cause:2, boot mode:(3,6)
15:54:11.781 -> 
15:54:11.781 -> load 0x4010f000, len 1392, room 16
15:54:11.821 -> tail 0
15:54:11.821 -> chksum 0xd0
15:54:11.821 -> csum 0xd0
15:54:11.821 -> v3d128e5c
15:54:11.821 -> ~ld
15:54:11.861 -> 

ESPExceptionDecoder Debug
Exception 3: LoadStoreError: Processor internal physical address or data error during load or store
PC: 0x4000e041
EXCVADDR: 0x4024bcc2

Decoding stack results
0x401003fc: millis() at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_wiring.cpp line 188
0x4020ef28: ClientContext::_write_some() at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 514
0x4020efc2: ClientContext::_write_from_source(DataSource*) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 450
0x4020f09d: WiFiClient::write(unsigned char const*, unsigned int) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 364
0x4020f060: WiFiClient::write(unsigned char const*, unsigned int) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src\WiFiClient.cpp line 220
0x4021104d: Print::write(char const*) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Print.h line 60
0x40211275: Print::println(char const*) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\Print.cpp line 129
0x402019b9: commands::HandleShortCommand() at D:\Temp\arduino_build_652018\sketch/commands.h line 363
0x40100304: ets_post(uint8, ETSSignal, ETSParam) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_main.cpp line 160
0x4020f130: ClientContext::_consume(unsigned int) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 557
0x402027dd: serialEvent() at E:\Programme\Rasberry - Projekt\Projekt_FHEM\_Arduino\Firmware_SIGNALDUINO\SIGNALDuino-dev-r332_cc1101_200113\___funktionstuechtig_ESP\SIGNALESP/SIGNALESP.ino line 591
0x40202849: loop() at E:\Programme\Rasberry - Projekt\Projekt_FHEM\_Arduino\Firmware_SIGNALDUINO\SIGNALDuino-dev-r332_cc1101_200113\___funktionstuechtig_ESP\SIGNALESP/SIGNALESP.ino line 470
0x40212b68: loop_wrapper() at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_main.cpp line 180


user30175: The problem is that code like 
            MSG_PRINTLN(TXT_UNSUPPORTED1);

with
#define MSG_PRINTLN(...) { MSG_PRINTER.println(__VA_ARGS__); }

and 
static const char TXT_UNSUPPORTED1[]        PROGMEM = "Unsupported short command";

On the ESP8266 calls the println() function which accepts a char*, expected from RAM. However since the string here was put into flash and not RAM, this function will crash upon execution. 
The fix is to use the __FlashStringHelper class which calls the correct println() overload and doesn't crash.
See PR https://github.com/HomeAutoUser/ERROR_search/pull/1 and https://arduino-esp8266.readthedocs.io/en/latest/PROGMEM.html

62948: <p>i have one project that can ready compiled. The function is break on the hardware an i need help to finde the error. I am a beginner and ask for help. How can I narrow the error down?</p>

<p>Sketch:</p>

<ul>
<li>SIGNALESP.ino (<a href="https://github.com/HomeAutoUser/ERROR_search/tree/master/SIGNALESP" rel="nofollow noreferrer">https://github.com/HomeAutoUser/ERROR_search/tree/master/SIGNALESP</a>)</li>
</ul>

<p>Platform</p>

<ul>
<li>Hardware: AZDelivery NodeMCU Lua Amica Modul V2 ESP8266 ESP-12E</li>
<li>Core Version: latest git</li>
<li>Development Env: Arduino IDE</li>
<li>Operating System: Windows</li>
</ul>

<p>Settings in IDE</p>

<ul>
<li>Module: Nodemcu v1.0</li>
<li>Flash Size: 4MB</li>
<li>Flash Frequency: 40Mhz</li>
<li>CPU Frequency: 80Mhz</li>
<li>Upload Speed: 115200</li>
</ul>

<p>Problem Description</p>

<pre><code>15:54:11.662 -&gt; Fatal exception 3(LoadStoreErrorCause):
15:54:11.662 -&gt; epc1=0x4000e041, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4024bcc2, depc=0x00000000
15:54:11.701 -&gt; 
15:54:11.701 -&gt; Exception (3):
15:54:11.701 -&gt; epc1=0x4000e041 epc2=0x00000000 epc3=0x00000000 excvaddr=0x4024bcc2 depc=0x00000000
15:54:11.701 -&gt;
15:54:11.701 -&gt; &gt;&gt;&gt;stack&gt;&gt;&gt;
15:54:11.701 -&gt;
15:54:11.701 -&gt; ctx: cont
15:54:11.701 -&gt; sp: 3ffffce0 end: 3fffffc0 offset: 01a0
15:54:11.701 -&gt; 3ffffe80:  00000000 00000019 4024bcaa 00000000
15:54:11.701 -&gt; 3ffffe90:  00000001 3fff16a4 00000000 000001ff
15:54:11.701 -&gt; 3ffffea0:  00000000 00000019 401003fc 0001687b
15:54:11.701 -&gt; 3ffffeb0:  00000000 00000000 00000001 4024bcaa
15:54:11.701 -&gt; 3ffffec0:  00000000 00000019 3fff1134 4020ef28
15:54:11.701 -&gt; 3ffffed0:  ffffffff 3fffc6fc 00000001 4024bcaa
15:54:11.741 -&gt; 3ffffee0:  00000001 00000000 3fff1134 4020efc2
15:54:11.741 -&gt; 3ffffef0:  00000019 00000000 3fff1134 4020f09d
15:54:11.741 -&gt; 3fffff00:  40214e08 00000000 00001388 00000057
15:54:11.741 -&gt; 3fffff10:  4020f060 3ffef254 4024bcaa 4021104d
15:54:11.741 -&gt; 3fffff20:  3ffef10c 3ffef10c 3ffef254 40211275
15:54:11.741 -&gt; 3fffff30:  007a1200 3ffef10c 3ffeeec0 402019b9
15:54:11.741 -&gt; 3fffff40:  00000000 00000000 00000001 40100304
15:54:11.741 -&gt; 3fffff50:  3ffef10c 00000000 3fff1134 4020f130
15:54:11.741 -&gt; 3fffff60:  3ffef10c 3ffef254 0000000d 3ffef115
15:54:11.781 -&gt; 3fffff70:  3ffef10c 3ffef254 3ffeeec0 402027dd
15:54:11.781 -&gt; 3fffff80:  3fffdad0 00000000 3ffef728 3ffef768
15:54:11.781 -&gt; 3fffff90:  3fffdad0 00000000 3ffef728 40202849
15:54:11.781 -&gt; 3fffffa0:  3fffdad0 00000000 3ffef728 40212b68
15:54:11.781 -&gt; 3fffffb0:  feefeffe feefeffe 3ffe8500 40101059
15:54:11.781 -&gt; &lt;&lt;&lt;stack&lt;&lt;&lt;
15:54:11.781 -&gt; 
15:54:11.781 -&gt;  ets Jan  8 2013,rst cause:2, boot mode:(3,6)
15:54:11.781 -&gt; 
15:54:11.781 -&gt; load 0x4010f000, len 1392, room 16
15:54:11.821 -&gt; tail 0
15:54:11.821 -&gt; chksum 0xd0
15:54:11.821 -&gt; csum 0xd0
15:54:11.821 -&gt; v3d128e5c
15:54:11.821 -&gt; ~ld
15:54:11.861 -&gt; 
</code></pre>

<p>ESPExceptionDecoder Debug</p>

<pre><code>Exception 3: LoadStoreError: Processor internal physical address or data error during load or store
PC: 0x4000e041
EXCVADDR: 0x4024bcc2

Decoding stack results
0x401003fc: millis() at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_wiring.cpp line 188
0x4020ef28: ClientContext::_write_some() at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 514
0x4020efc2: ClientContext::_write_from_source(DataSource*) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 450
0x4020f09d: WiFiClient::write(unsigned char const*, unsigned int) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 364
0x4020f060: WiFiClient::write(unsigned char const*, unsigned int) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src\WiFiClient.cpp line 220
0x4021104d: Print::write(char const*) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Print.h line 60
0x40211275: Print::println(char const*) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\Print.cpp line 129
0x402019b9: commands::HandleShortCommand() at D:\Temp\arduino_build_652018\sketch/commands.h line 363
0x40100304: ets_post(uint8, ETSSignal, ETSParam) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_main.cpp line 160
0x4020f130: ClientContext::_consume(unsigned int) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 557
0x402027dd: serialEvent() at E:\Programme\Rasberry - Projekt\Projekt_FHEM\_Arduino\Firmware_SIGNALDUINO\SIGNALDuino-dev-r332_cc1101_200113\___funktionstuechtig_ESP\SIGNALESP/SIGNALESP.ino line 591
0x40202849: loop() at E:\Programme\Rasberry - Projekt\Projekt_FHEM\_Arduino\Firmware_SIGNALDUINO\SIGNALDuino-dev-r332_cc1101_200113\___funktionstuechtig_ESP\SIGNALESP/SIGNALESP.ino line 470
0x40212b68: loop_wrapper() at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_main.cpp line 180
</code></pre>
 30175: <p>The problem is that code like </p>

<pre class="lang-cpp prettyprint-override"><code>            MSG_PRINTLN(TXT_UNSUPPORTED1);
</code></pre>

<p>with</p>

<pre class="lang-cpp prettyprint-override"><code>#define MSG_PRINTLN(...) { MSG_PRINTER.println(__VA_ARGS__); }
</code></pre>

<p>and </p>

<pre><code>static const char TXT_UNSUPPORTED1[]        PROGMEM = "Unsupported short command";
</code></pre>

<p>On the ESP8266 calls the <code>println()</code> function which accepts a <code>char*</code>, expected from RAM. However since the string here was put into flash and not RAM, this function will crash upon execution. </p>

<p>The fix is to use the <code>__FlashStringHelper</code> class which calls the correct <code>println()</code> overload and doesn't crash.</p>

<p>See PR <a href="https://github.com/HomeAutoUser/ERROR_search/pull/1" rel="nofollow noreferrer">https://github.com/HomeAutoUser/ERROR_search/pull/1</a> and <a href="https://arduino-esp8266.readthedocs.io/en/latest/PROGMEM.html" rel="nofollow noreferrer">https://arduino-esp8266.readthedocs.io/en/latest/PROGMEM.html</a></p>
