How are lowerAlarmBuffer and upperAlarmBuffer defined?
But it could be anywhere in your code. When you have a buffer overrun error changing the code can often cause the symptoms to go away as you have changed where things are stored in memory. Quite often it is not directly related to the lines you changed. That's why you should not post snippets.
The Nextion display library is absolute S**T! WORST piece of code I've ever seen in a commercial product. Whoever wrote it hasn't got the first clue what he's doing. The code for receiving strings from the display is especially garbage - messages coming from the display are randomly discarded by the library. My advice is ditch the Nextion, and use ANY other display.
RayLivingston:
The Nextion display library is absolute S**T! WORST piece of code I've ever seen in a commercial product. Whoever wrote it hasn't got the first clue what he's doing. The code for receiving strings from the display is especially garbage - messages coming from the display are randomly discarded by the library. My advice is ditch the Nextion, and use ANY other display.
Regards,
Ray L.
That's an opinion. Not a solution.
If you feel that strongly about the Nextion library for Arduino, fix it. Here's the source code for it.
If you can show us anything that comes close to the flexibility of the Nextion at a similar price, then I'm sure the world would be beating a path to it.
No, that is a fact, because I HAVE looked at the source code, and verified the many problems therein. I have also talked to several others who have seen EXACTLY the same problems I did. The handling of incoming string messages is absolute C**P! The library WILL, under the right circumstances, simply discard parts of messages, and even entire messages, with no warning. Examination of the code will easily prove that statement. I fixed that problem, enough to complete my last project, but I will never use a Nextion display again.
If you have NOT seen the problem (yet), you should consider yourself very, very lucky.
My code is 1000+ lines long and unforutnly i have do deal with the nextion for this project.
And as longer and longer i am working with the nextion lib, i have to admit that its not the best code.
But like i said. my project is so far, that i cant go back. My code is 1000+ long. so its hard to post the whole code and not just snippets
I dont get it, why sometimes the **** eroor appears
The most likely reason has already been suggested. The symptom is classic. SOMEWHERE in your code, you're probably writing into memory locations that you don't own causing undefined behavior. Could be from writing beyond the end of an array or some buffer that you've dynamically allocated.
Since you're the only one with the code. You're the only one who can dig through it to find the problem. Even with the code, it's unlikely others would be motivated enough to dig through 1000 lines of someone else's code to find the problem.
Also, it could be that you are overused all available memory.
Manuel_o:
Stack smashing protect failure!
suggests that the heap memory and the stack memory are colliding. I would advice to re-examine your memory usage. Only allocate memory when needed, and deallocate it right after.
Copy Backtrace: 0x4008c6dc:0x3ffb1d20 0x4008c90d:0x3ffb1d40 0x400df70c:0x3ffb1d60 0x400d4637:0x3ffb1d80 0x4011b44d:0x3ffb1dc0 0x400d93da:0x3ffb1de0 0x400d8c66:0x3ffb1e00 0x400d5c33:0x3ffb1e30 0x400dc87d:0x3ffb1fb0 0x40088e19:0x3ffb1fd0
into the stack trace decoder. Get a lot more info.
Hi Manuel,
I've only just seen this, I agree with Ray about the libraries for the Nextion. You could follow the examples in my tutorial Using Nextion Displays with Arduino, my methods do not use any library. You will have to change your approach to interfacing with the Nextion as my methods are different in the way they work, however, they do work reliably.