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

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). #2

Open
spyder0069 opened this issue Aug 7, 2019 · 13 comments
Open

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). #2

spyder0069 opened this issue Aug 7, 2019 · 13 comments

Comments

@spyder0069
Copy link
Contributor

spyder0069 commented Aug 7, 2019

I am trying to get this working and I get:

Send USER
Send PASSWORD
Send SYST
Send Type A
Send PASV
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x40056722 PS : 0x00060830 A0 : 0x8005682e A1 : 0x3ffb1ec0
A2 : 0x3ffb80c0 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x0000000a
A6 : 0x00000000 A7 : 0x00000008 A8 : 0x8000be99 A9 : 0x3ffb1eb0
A10 : 0x3ffb80c0 A11 : 0x00060823 A12 : 0x00060820 A13 : 0x3ffc2a1c
A14 : 0x3ffc2a30 A15 : 0x00000000 SAR : 0x00000019 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

Backtrace: 0x40056722:0x3ffb1ec0 0x4005682b:0x3ffb1ef0 0x400566cd:0x3ffb1f10 0x400d19a2:0x3ffb1f30 0x400d1a93:0x3ffb1f50 0x400d1b20:0x3ffb1f70 0x400d3b9f:0x3ffb1fb0 0x400885dd:0x3ffb1fd0

The decode shows:

Decoding stack results
0x400d19a2: ESP32_FTPClient::InitFile(char*) at C:\Users\user\AppData\Local\Temp\arduino_build_655457\sketch\ESP32_FTPClient.cpp line 142
0x400d1a93: mynewfile() at C:\SPYDERROBOTICSDATA\spyderrobotics\FIRMWARE\arduino\SKETCHBOOK\FTP_TEST\ESP32_FTPClient/ESP32_FTPClient.ino line 44
0x400d1b20: setup() at C:\SPYDERROBOTICSDATA\spyderrobotics\FIRMWARE\arduino\SKETCHBOOK\FTP_TEST\ESP32_FTPClient/ESP32_FTPClient.ino line 32
0x400d3b9f: loopTask(void*) at C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3-rc1\cores\esp32\main.cpp line 14
0x400885dd: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 143

Not sure how to proceed? This is a wroom-32d. I can get to the site through a regular ftp program and add/delete files. I appreciate any help i can get!

@ldab
Copy link
Contributor

ldab commented Aug 7, 2019

This is probably due some memory overflow, or infinite loop, can you share your code?

EDIT: check mynewfile() function

@spyder0069
Copy link
Contributor Author

Its your sample code but with my credentials. I just removed the makefile from the loop and call it during the setup so it only fires once.

`#include <WiFi.h>
#include <WiFiClient.h>
#include "ESP32_FTPClient.h"

#define ftp_server "XXX"
#define ftp_username "XXX"
#define ftp_password "XXX"

#define wifi_ssid "XXX"
#define wifi_password "XXX"

ESP32_FTPClient ftp (ftp_server,ftp_username,ftp_password);

void setup() {
Serial.begin(115200);
WiFi.begin(wifi_ssid, wifi_password);

Serial.println("Connecting Wifi...");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Connecting to WiFi..");

}
Serial.println("IP address: ");

Serial.println(WiFi.localIP());

ftp.OpenConnection();

mynewfile();

}

void loop() {
delay(5000);
Serial.println("Looping");
//Create the file new and write a string into it

}

void mynewfile(){
ftp.InitFile("Type A");
ftp.NewFile("hello_world.txt");
ftp.Write("Hello World");
ftp.CloseFile();

ftp.CloseConnection();

//Append an string to a file (it does not need to exist)
// ftp.InitFile("Type A");
// ftp.AppendFile("hello_world_append.txt");
// ftp.Write("Hello World");
// ftp.CloseFile();
}`

@spyder0069
Copy link
Contributor Author

Its chokes on this line:

array_pasv[i] = atoi(tStr);

This is in the InitFile sub. If I comment it out I don't get the crash and it continues but no file gets created.

@ldab
Copy link
Contributor

ldab commented Aug 7, 2019

Your server is probably returning something different than expected for PASV

Please include a Serial.println(outBuf) at:

To check the response, mine one returns 227 Entering Passive Mode (145,14,144,22,198,120).

@spyder0069
Copy link
Contributor Author

My response is:

530 You aren't logged in

This is because somehow I mistyped the ftp password. I really appreciate your time. I think I'm leaving that message in there for troubleshooting. :^)

After correcting the password it went through fine. Maybe there should be some error trapping there so that it doesn't crash the processor?

@ldab
Copy link
Contributor

ldab commented Aug 8, 2019

will do, please follow at ldab/ESP32_FTPClient#3

@spyder0069
Copy link
Contributor Author

One other thing I noticed is that it doesn't seem to play nice with async webserver. I think if a web page is trying to display at the same time the ftp is happening the server will hang and then eventually you get a crash and reboot. Not exactly sure what a work around would be. Have you tried this at all? I also was looking at the freeheap and it seemed to lower every time it did an upload but didn't return. I need to do some more testing with that to confirm.

@ldab
Copy link
Contributor

ldab commented Aug 8, 2019

Please create another issue here https://github.com/ldab/ESP32_FTPClient

And we can discuss it there, some free webhosting server will have bandwidth limitations, so yes, I have experienced that and it's expected.

@spyder0069
Copy link
Contributor Author

I was referring to async webserver for the esp32 to server the webpages. I did some additional testing and it seems to now be working with it. Before I had the ftp running in a ticker and after I just let it run in the main loop everything seems to be working together. I also don't seem to be losing the freeheep so it looks like that is also working.

@ldab
Copy link
Contributor

ldab commented Aug 9, 2019

Fixed, check 2f51996

@spyder0069
Copy link
Contributor Author

This did fix the crash on a wrong password it then continues on and shows the close file but never returns back to the loop.

@spyder0069
Copy link
Contributor Author

Then next command I have is the closeconnection so it might be holding up in there. Let me investigate.

@ldab
Copy link
Contributor

ldab commented Aug 9, 2019

This fixes the issue regarding the original post on this topic. Please create a new issue on the other repository so we can keep track of it.

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

2 participants