-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Parsing String values crashes ESP8266 #104
Comments
The issue occurs here |
I'm not able to reproduce this bug. Please dig deeper in the The Please also try to increase the size of the Also, please note that using |
I fixed a bug which is triggered when the It could be the same bug. Please try branch issue104 and tell me if it works now. |
I merge it into master. |
Still faulting with the latest
|
Hi , i've also a Nodemcu 1.0 , esp8266 12e family , with my test nothing .. i use this distribution that i think it's quite good . many thanks for your library @bblanchon , i tried to parse my struct to network but between c and java not so friendly game ... at now i start with your library . the best is take and parse a struct automatically in encode and also decode |
@asetyde, thanks for your feedback. i'm glad to hear that it works on your side. |
sorry not , i do an error with example code , about this : StaticJsonBuffer<200> jsonBuffer; 200 what ? byte bit kbyte ? |
These are bytes, please have a look at the documentation. You can try to increase the size of the buffer, but 200 bytes should be enough for the example above. |
now i've added , they can , i hope , help us .. i think |
thanks ok @bblanchon |
If dynamic allocation is OK to you, you can replace |
yes , i've done . also when i tried different buffer size , there are strange but different result . |
Can you be more specific? |
So so :) i don't have many time to try , but i think the problem is where you allocate your static object , because there are many different about memory organization and space from esp and avr ... family is different . when i 've tried @JeffAshtonCT sketch with different size of buffer , reply on serial is many different : also i think it's not good idea do this in setup function ... i can do 3 fast example : with 200 you see stack error but , with 10 with 50 with 99 |
but is stupid test .. |
Alexandro, it looks like you're using version 5.0.1. Can you checkout Also, what happens with DynamicJsonBuffer? I think that the stack may be too small. Do you know if you can change it?
|
Hi all, Exception is caused by an unaligned 32-bit store in virtual void* alloc(size_t bytes) {
#ifdef ESP8266
bytes = (bytes + 3) & (~3);
#endif
... Something similar is also required in Edit:
|
Thanks Ivan. I'll fix that ASAP.
|
Russian is the best :) 👍 thanks @igrr @bblanchon when you are ok , i'll try |
Dynamicbuffer is ok , work |
I fixed the alignment in branch alignment, it should work on the ESP8266. |
but you 've merged or not ? |
No I didn't. |
also dynamic has stack exception with a heavy use to transfer a struct (2k bytes) |
wait , now i'll try |
Thanks, I'll merge as soon as I find a way to get the code smaller. |
ok |
It's fixed in master and will soon be released as 5.0.2. |
@igrr Please , i not understand why memory space is too small , in BlockJsonBuffer , only parameter i see is : it can be has more memory ?
|
Also noticing on the ESP8266, that parsing anything but a statically defined const char*, kills the parser.
Results in
The text was updated successfully, but these errors were encountered: