NodeMcu + Firebase Demo get software reset

Dears, I tried Firebase library with the Demo example and after a moment working good, nodeMcu suddenly crush and got reset by software. There is a way to fix that?

this is the code:

//
// Copyright 2015 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

// FirebaseDemo_ESP8266 is a sample that demo the different functions
// of the FirebaseArduino API.

#include <ESP8266WiFi.h>
#include <FirebaseArduino.h>

// Set these to run example.
#define FIREBASE_HOST "xxxx"
#define FIREBASE_AUTH "xxxx"
#define WIFI_SSID "xxxx"
#define WIFI_PASSWORD "xxxx"

void setup() {
  Serial.begin(9600);

  // connect to wifi.
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  Serial.print("connecting");
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  Serial.println();
  Serial.print("connected: ");
  Serial.println(WiFi.localIP());
  
  Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
}

int n = 0;

void loop() {
  // set value
  Firebase.setFloat("number", 42.0);
  // handle error
  if (Firebase.failed()) {
      Serial.print("setting /number failed:");
      Serial.println(Firebase.error());  
      return;
  }
  delay(1000);
  
  // update value
  Firebase.setFloat("number", 43.0);
  // handle error
  if (Firebase.failed()) {
      Serial.print("setting /number failed:");
      Serial.println(Firebase.error());  
      return;
  }
  delay(1000);

  // get value 
  Serial.print("number: ");
  Serial.println(Firebase.getFloat("number"));
  delay(1000);

  // remove value
  Firebase.remove("number");
  delay(1000);

  // set string value
  Firebase.setString("message", "hello world");
  // handle error
  if (Firebase.failed()) {
      Serial.print("setting /message failed:");
      Serial.println(Firebase.error());  
      return;
  }
  delay(1000);
  
  // set bool value
  Firebase.setBool("truth", false);
  // handle error
  if (Firebase.failed()) {
      Serial.print("setting /truth failed:");
      Serial.println(Firebase.error());  
      return;
  }
  delay(1000);

  // append a new value to /logs
  String name = Firebase.pushInt("logs", n++);
  // handle error
  if (Firebase.failed()) {
      Serial.print("pushing /logs failed:");
      Serial.println(Firebase.error());  
      return;
  }
  Serial.print("pushed: /logs/");
  Serial.println(name);
  delay(1000);
}

the error:

22:03:07.229 -> 
22:03:07.229 -> Exception (9):
22:03:07.229 -> epc1=0x40211040 epc2=0x00000000 epc3=0x00000000 excvaddr=0x3f6e6fa7 depc=0x00000000
22:03:07.332 -> 
22:03:07.332 -> >>>stack>>>
22:03:07.332 -> 
22:03:07.332 -> ctx: cont
22:03:07.365 -> sp: 3ffeffd0 end: 3fff02f0 offset: 01a0
22:03:07.399 -> 3fff0170:  0000000b 3ffeeb48 3fff0ee0 40208654  
22:03:07.433 -> 3fff0180:  3ffe8a0c 000001bb 3fff0ee0 40209520  
22:03:07.503 -> 3fff0190:  3ffe88b0 0000003b 3fff0ee0 40209968  
22:03:07.537 -> 3fff01a0:  0000003b 3ffeeb48 0000002e 40202078  
22:03:07.604 -> 3fff01b0:  3fff01f8 0000003b 3fff01e0 4020a628  
22:03:07.639 -> 3fff01c0:  3ffeeb44 3fff01e0 3ffe88b0 3fff0260  
22:03:07.707 -> 3fff01d0:  3ffeeb44 3fff0224 3fff0edc 4020398b  
22:03:07.742 -> 3fff01e0:  3fff0bec 003b003f 00ff0224 3fff11ac  
22:03:07.811 -> 3fff01f0:  0041004f 00ff1014 3fff1184 001f001f  
22:03:07.845 -> 3fff0200:  00000bb8 3ffeeba8 3fff1016 3fff0260  
22:03:07.914 -> 3fff0210:  3ffeeb44 3ffe88ac 3fff0f74 402016a8  
22:03:07.948 -> 3fff0220:  3ffeeb40 3fff1138 00000020 3fff0f74  
22:03:08.018 -> 3fff0230:  3fff1014 3fff0260 3fff1014 4020203c  
22:03:08.052 -> 3fff0240:  3fff0270 00000000 00000003 3fff0f74  
22:03:08.121 -> 3fff0250:  3fff1014 3fff0268 3ffeeb40 402037f4  
22:03:08.155 -> 3fff0260:  3fff0fe0 00000002 3fff0fc0 3fff1016  
22:03:08.223 -> 3fff0270:  0000000d 3ffeeba8 3ffe896e 40209a98  
22:03:08.258 -> 3fff0280:  00000002 3fff02bc 3fff02b0 4020a628  
22:03:08.327 -> 3fff0290:  3ffeeb40 3fff02b0 3ffe87f0 3ffeecdc  
22:03:08.362 -> 3fff02a0:  3ffeeb40 3ffeeba8 00000031 402012db  
22:03:08.430 -> 3fff02b0:  3fff0d34 000d000f 00000001 00000004  
22:03:08.464 -> 3fff02c0:  00000031 00000000 3ffeec9c 401001b1  
22:03:08.531 -> 3fff02d0:  3fffdad0 00000000 3ffeec9c 4020b8b8  
22:03:08.564 -> 3fff02e0:  feefeffe feefeffe 3ffe858c 40100fed  
22:03:08.633 -> <<<stack<<<

Exception 9 appears to be (or is, i mean is) 'unaligned memory access' Now i did some reading up on it (never heard of it before) here and by now is suspect the issue is caused by firebasearduino.h making use of the stream class, but this is just a suspicion. I had a quick look into the library and saw that basically any variable type you push gets converted into Json-variant, which is a reference-type, basically just holding the pointer, and that may be where the unalignment occurs, it is all quite deep under the hood and actually you should try on github rather than here to seek answers. There may be just a hitch with the ESP-core you are using (which is it ?)

add yield(); everywhere, fixed my problems

sevenoutpinball:
add yield(); everywhere, fixed my problems

he has delay(); which includes a yield(); every few lines, anyway it is not a wdt reset.

Do you think he is compiling with the wrong board?

I am having the same problem. Is there any solution? Everytime i read the value from firebase, after 50 values read, i get the exception and Nodemcu restarts.

I am having the same problem. Is there any solution?

Since the OP hasn't responded to the request for details on the core version, and you haven't provided any details either, i don't know.