Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on page load #6

Closed
mano1979 opened this issue Dec 31, 2017 · 11 comments
Closed

Crash on page load #6

mano1979 opened this issue Dec 31, 2017 · 11 comments

Comments

@mano1979
Copy link

mano1979 commented Dec 31, 2017

On a generic ESP32-dev board:

Uploaded the filesystem with the sketch. first time i didn't do a reset. I just let it run after upload. Not every file was written so i got the "Control Offline" message.
2nd upload and a reset after the upload fixed this.

But now when i load the page, i get nothing and the esp32 reboots. serial output below:


rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:812
load:0x40078000,len:0
load:0x40078000,len:11392
entry 0x40078a9c

IP address: 192.168.4.1
UI Initialized
CORRUPT HEAP: Bad tail at 0x3ffdf74a. Expected 0xbaad5678 got 0xbaad5600
assertion "head != NULL" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/heap/./multi_heap_poisoning.c", line 199, function: multi_heap_free
abort() was called at PC 0x400dea73 on core 1

Backtrace: 0x40087ca8:0x3ffdd720 0x40087da7:0x3ffdd740 0x400dea73:0x3ffdd760 0x400879b9:0x3ffdd790 0x40083b76:0x3ffdd7b0 0x400840f9:0x3ffdd7d0 0x4000bec7:0x3ffdd7f0 0x400da09f:0x3ffdd810 0x400d8dda:0x3ffdd860 0x400d80d9:0x3ffdd8a0 0x400d6f08:0x3ffdd8e0 0x400d898b:0x3ffdd950 0x400d89f9:0x3ffdd990 0x400d8c0d:0x3ffdd9e0 0x400d4a66:0x3ffdda00 0x400d4c4d:0x3ffdda50

Rebooting...```
@s00500
Copy link
Owner

s00500 commented Jan 4, 2018

hey, sry for the late response, what version of the espasyncwebserver library are you using? I am going to test this in the next days again

@mano1979
Copy link
Author

mano1979 commented Jan 4, 2018 via email

@s00500
Copy link
Owner

s00500 commented Jan 8, 2018

OK then, this issue drove me crazy today.... The problem is that the prepareFilesystem function does write the files correct, and if I list the filesystem contents immediatly afterwards it looks all fine

But when I list the contents in a new sketch it only shows some of them.... and if the webserver can not find them it crashes

This stops once I remove all file exists and remove operations in the function. I am not sure why this is but for now I'll leave it like this, if anyone has an Idea why the FS on the ESP32 behaves so strange please let me know

I released a new patch version with the delete parts commented out

@mano1979
Copy link
Author

mano1979 commented Jan 15, 2018

I tested the patch, but i still get the "Control Offline" page.


rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:13076
entry 0x40078ad0

IP address: 192.168.4.1
Listing directory: /
  FILE: /js/slider.js  SIZE: 1944
  FILE: /js/controls.js  SIZE: 0
  FILE: /index.htm  SIZE: 1420
  FILE: /css/style.css  SIZE: 11728
  FILE: /css/normalize.css  SIZE: 1948
  FILE: /js/zepto.min.js  SIZE: 26392
UI Initialized
CORRUPT HEAP: Bad tail at 0x3ffe3825. Expected 0xbaad5678 got 0xbaad5600
assertion "head != NULL" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/heap/./multi_heap_poisoning.c", line 199, function: multi_heap_free
abort() was called at PC 0x400deb87 on core 1

Backtrace: 0x40087ca8:0x3ffdd960 0x40087da7:0x3ffdd980 0x400deb87:0x3ffdd9a0 0x400879b9:0x3ffdd9d0 0x40083b76:0x3ffdd9f0 0x400840f9:0x3ffdda10 0x4000bec7:0x3ffdda30 0x400da1b3:0x3ffdda50 0x400d8eee:0x3ffddaa0 0x400d81ed:0x3ffddae0 0x400d701c:0x3ffddb20 0x400d8a9f:0x3ffddb90 0x400d8b0d:0x3ffddbd0 0x400d8d21:0x3ffddc20 0x400d4b7a:0x3ffddc40 0x400d4d61:0x3ffddc90

Rebooting...

@s00500
Copy link
Owner

s00500 commented Jan 23, 2018

This is an annoying problem, I have to do more checks but for now pls use the ESP32 Sketch Data upload tool

As you can see in your debug output there is always one file with a size of 0, in this case /js/controls.js...
This somehow causes the server to crash...

@mano1979
Copy link
Author

indeed. uploading using the sketch data upload tool worked.

@mano1979
Copy link
Author

Do you happen to know if it is possible to give the sliders "touch" support?
Now you have to tap somewhere on the line, hoping you land in the right spot.
If the sliders where drag-able, then we can see the number according to position.

Any help or clues on where to start are appreciated. :)

@s00500
Copy link
Owner

s00500 commented Jan 31, 2018

Hm, that actually should already work... If it doesn't: can you put it into a new issue and put in info about the device you are using?

@cmorrow101
Copy link

I wanted to share an observation. I see the same reset problem when connecting through chrome web browser, however when I setup a hotspot on my phone, then connect to the ESP32(using the same phone) and mobile chrome, all works perfectly.
What is the difference when connecting directly vs through a network router?
Hopefully this is another clue. Great work BTW, love the interface.

@s00500
Copy link
Owner

s00500 commented Mar 19, 2018

This is probably some caching related issue you are having there, anyway the main problem is that the files are not written to the filesystem properly using prepareFilesystem() ...

@s00500
Copy link
Owner

s00500 commented May 26, 2018

Alright everyone: Great News: I retested on ESP32 and on ESP8266 and both are working fine with the newest versions of the arduino cores, this means this issue can be closed now =D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants