-
Notifications
You must be signed in to change notification settings - Fork 35
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
Using platformIO esp8266 panics every few seconds and reboots. #108
Comments
Hello bobcroft, the issue that you pointed out is due to a problem with the ArduinoJson v 6.20.0 library. I've done different tests with it, and actually the solution is to use the v6.19.4 of the ArtuinoJson library.
Hoping that helps, cheers. Stefano |
Hello Stefano,
Thanks you for your prompt reply. I wondered if the issue might be with ArduinoJson library as I recall from its last release notes it had some breaking issues. I am not very proficient with Github but I assume you mean the new V3.0.0 version is available on Github, I’ll take a look.
When I have needed help with ArduinoJson in the past I have emailed Benoit Blanchon, its author, and found him extremely helpful. Perhaps he could help with the issues you are seeing.
I’ll report back later.
Kind regards
Bob
From: Stefano Ledda ***@***.***>
Sent: 09 January 2023 08:45
To: shurillu/CTBot ***@***.***>
Cc: bobcroft ***@***.***>; Author ***@***.***>
Subject: Re: [shurillu/CTBot] Using platformIO esp8266 panics every few seconds and reboots. (Issue #108)
Hello bobcroft,
the issue that you pointed out is due to a problem with the ArduinoJson v 6.20.0 library. I've done different tests with it, and actually the solution is to use the v6.19.4 of the ArtuinoJson library.
Keep on mind that I have two version of the CTBot:
* the first is published and is the 2.1.9 that use String variables
* the other is the 3.0.0 (published in the v3.0.0 branch - you have to download it manually) that use standard C strings and have a lot of new functionalities
Both have the same issue with the ArduinoJson library v6.20.0.
Hoping that helps, cheers.
Stefano
—
Reply to this email directly, view it on GitHub <#108 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAVDXISCJ7ZMNSGXXY4O62DWRPFZBANCNFSM6AAAAAATUTG3AQ> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AAVDXIVIQHVBT2TUJ23436TWRPFZBA5CNFSM6AAAAAATUTG3ASWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSR7ED46.gif> Message ID: ***@***.*** ***@***.***> >
|
Hi Stefano, I have done as you suggested and changed the ArduinoJson version to 6.19.4. I have tried that version along with CTBot v2.1.9 and v3.0.0 on both an ESP32 and a Wemos d1 mini. CTbot V3.0.0 on the ESP 32 compliles, loads and runs to Telegrambot connected OK but it doesn't seem to send or receive any bot messages, it just sits there. I am monitoring bot messgaes on Node-RED so I can check if they are sent and they are sen immediately. The bot also receives messages from NR too. |
Hello Bob,
Let me know and thank you for your feedback! Stefano |
Hi Stefano,
Thank you again for your detailed reply. To the best of my knowledge I have only one CTbot library. I tried them with platformIO and when I changed the library version I deleted the PIO files and then recompiled my code, the print out as the code compiled indicated the correct library was loaded. I had a quick look at the compile print out and I think I am using different tool chain versions. At my first attempt I used Arduino 2.0.3 not 1.8.15. I think I have, inadvertently used too many different versions of the various software.
Under platformIO I have the latest available versions of all toolchains etc. loaded and that may be causing issues.
Unfortunately I won’t be able to get back to more testing for just over a week because I am away from the PC I use for coding. Once I am able to check code again I plan to replicate the set up you have on your “test rig”.
I was pleased to see you use Visual Micro with visual studio, I used to use that years ago and for reasons I can’t remember I went away from it. I am planning to try it again.
I’ll report back on what I find
Bob
From: Stefano Ledda ***@***.***>
Sent: 11 January 2023 10:06
To: shurillu/CTBot ***@***.***>
Cc: bobcroft ***@***.***>; Author ***@***.***>
Subject: Re: [shurillu/CTBot] Using platformIO esp8266 panics every few seconds and reboots. (Issue #108)
Hello Bob,
I've just finished to do some tests. Here my "test rig":
* Boards: NodeMCU 1.0 (ESP8266) and Node32s (ESP32)
* ArduinoJson v 6.19.4
* CTBot v 2.1.9 and 3.0.0
* ESP8266 toolchain version 3.1.0
* ESP32 toolchain version 2.0.6
* VisualStudio with VisualMicro and Arduino IDE v 1.8.15
Actually I have no strange behavior at all (both boards works with the two CTBot library versions).
Sorry for the silly question, but in your Arduino libraries folder do you have only one CTBot library?
In other words, when you switch between the two library version, do you overwrite or keep it both?
Keeping both (with different folder name) could be an issue.
Let me know and thank you for your feedback!
Cheers,
Stefano
—
Reply to this email directly, view it on GitHub <#108 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAVDXIT45P6GX4MWOP5SNBDWR2AYTANCNFSM6AAAAAATUTG3AQ> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AAVDXIU2FVISQCNUPAZQVZTWR2AYTA5CNFSM6AAAAAATUTG3ASWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSSFJPV4.gif> Message ID: ***@***.*** ***@***.***> >
|
I'm using
|
Hello stsdc, Cheers |
My issue is identical to an earlier bug reported as 'Kernel panic' , following on from the excellent imformation in that post / reply I set up a basic test using only the following in the loop;
void loop()
{
TBMessage msg;
if (myBot.getNewMessage(msg))
Serial.print("got message");
delay (500);
}
That little snippet is enough to crash the esp8266. Referring to the exception decode even the most basic library example crashes and in all cases there is a reference to the Wstring.h (Ah, the curse of the 'String' versus the 'C' string!) I have also seen exception 9 too.
Serial monitor output;
Starting TelegramBot...
testConnection OK After a few seconds the esp8266 crashes
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Exception (3):
epc1=0x4020b595 epc2=0x00000000 epc3=0x00000000 excvaddr=0x402544fe depc=0x00000000
LoadStoreError: Processor internal physical address or data error during load or store
epc1=0x4020b595 in String::init() at C:\Users\Bob.platformio\packages\framework-arduinoespressif8266\cores\esp8266/WString.h:289
(inlined by) String::String(char const*) at C:\Users\Bob.platformio\packages\framework-arduinoespressif8266\cores\esp8266/WString.cpp:39
excvaddr=0x402544fe in pp_attach at ??:?
I am using the latest version of platformIO under VSC and all libraries are the latest versions.
Further to my earlier comments I installed the Arduino 2.0.3 IDE along with allowing all library and board updates. Initially before the library / board updates I did successfully compile the basic echo example and it ran without crashing BUT it didn't receive or send any messages to telegram. I am of the opinion that either the newer tool chains or library versions break the code resulting in a soft WDT reset. This occurs both under the Ardsuino and platformIO IDE's.
The text was updated successfully, but these errors were encountered: