strange characters while submitting rules

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
riker1
Normal user
Posts: 320
Joined: 26 Dec 2017, 18:02

strange characters while submitting rules

#1 Post by riker1 » 29 Nov 2019, 09:29

Hi

I experienced strange characters while submitting rules.

Is flash corrupt?
Would totally format / flash solve this?

Thanks


strange characters on start of rules after submitting :

Code: Select all

I 

��


User avatar
grovkillen
Core team member
Posts: 3324
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: strange characters while submitting rules

#2 Post by grovkillen » 29 Nov 2019, 13:23

What browser are you using?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 1922
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: strange characters while submitting rules

#3 Post by TD-er » 29 Nov 2019, 14:00

And also, how big is your rules file? (or actually was your file, as it now seems damaged)

User avatar
ThomasB
Normal user
Posts: 444
Joined: 17 Jun 2018, 20:41
Location: USA

Re: strange characters while submitting rules

#4 Post by ThomasB » 30 Nov 2019, 02:25

And also: If it is an official ESPEasy release then what is the bin file name? Or if it's self compiled then what are the core and ESPEasy versions?

- Thomas

riker1
Normal user
Posts: 320
Joined: 26 Dec 2017, 18:02

Re: strange characters while submitting rules

#5 Post by riker1 » 06 Dec 2019, 13:36

Hi I am using Chrome

riker1
Normal user
Posts: 320
Joined: 26 Dec 2017, 18:02

Re: strange characters while submitting rules

#6 Post by riker1 » 06 Dec 2019, 13:37

TD-er wrote:
29 Nov 2019, 14:00
And also, how big is your rules file? (or actually was your file, as it now seems damaged)
It happens also with small rules sets, just 200 characters

Uploading via file solved it

riker1
Normal user
Posts: 320
Joined: 26 Dec 2017, 18:02

Re: strange characters while submitting rules

#7 Post by riker1 » 06 Dec 2019, 13:40

ThomasB wrote:
30 Nov 2019, 02:25
And also: If it is an official ESPEasy release then what is the bin file name? Or if it's self compiled then what are the core and ESPEasy versions?

- Thomas
It was ESP_Easy_mega-20190305_normal_ESP8266_4M.bin

I assume it was related to the browser

are you aware of any brower history while writing rules does lead to problems?

I experience sometimes that rules are not written complete .
I select pulldown rules 2 , submit it, but than it is jumping to rule 1 and rule2 keeps unchanged....

TD-er
Core team member
Posts: 1922
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: strange characters while submitting rules

#8 Post by TD-er » 06 Dec 2019, 14:47

As we speak, I am looking into the way we deal with rules and also how the webserver internals parse the POST form elements.
For the last one, I added a feature request (part is actually a bug report I think): https://github.com/esp8266/Arduino/issues/6884

I've also looked at our own code handling the rules in the web interface and the code is also not really memory efficient.
For that part I will add a fix.
But as long as my feature request is not finished, it will be very hard to see if the submitted data was received complete and processed well.

riker1
Normal user
Posts: 320
Joined: 26 Dec 2017, 18:02

Re: strange characters while submitting rules

#9 Post by riker1 » 06 Dec 2019, 14:59

Hi

just experienced the same problem under chrome with

ESP_Easy_mega-20191119_normal_core_241_ESP8266_4M1M.bin


sometime strange char will be stored

now just those in the beginning of the ruleset:

Code: Select all

oFile: free stack: 3440
....
...
 
No sure where they are coming from

looks like you have an idea

Thanks T

riker1
Normal user
Posts: 320
Joined: 26 Dec 2017, 18:02

Re: strange characters while submitting rules

#10 Post by riker1 » 06 Dec 2019, 15:03

Just for curiosity

is it a problem having more open tabs per ESP website at the same time?

I do logging and editing rules in parallel ?

TD-er
Core team member
Posts: 1922
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: strange characters while submitting rules

#11 Post by TD-er » 06 Dec 2019, 15:33

I do think there is a problem with concurrent web access on the Webserver we use.
As they are handled on event base, there is a possibility the webserver arguments are changed while the previous request still is rendered.
So I am thinking about adding some mutex on processing save requests.

User avatar
ThomasB
Normal user
Posts: 444
Joined: 17 Jun 2018, 20:41
Location: USA

Re: strange characters while submitting rules

#12 Post by ThomasB » 06 Dec 2019, 19:42

Interesting problem. I tried to duplicate the issue but did not experience any strange characters.

My Setup:
*NodeMCU, ESP_Easy_mega-20191130-2-PR_2789_test_ESP8266_4M_VCC.bin
- Enabled Controllers: Home Assistant (openHAB) MQTT
- Enabled Devices: Switch input, Display-Nextion, Generic-System Info (Qty 4).

*Launched two Chrome Browsers on the Win10/64 PC. Chrome Version 78.0.3904.108 (64-bit).
- First Chrome browser has two tabs: One shows web log (set to "debug more" log level) and the other has the Rules file.
- Second Chrome browser has only one tab with Rules file.

The rules test file had 1680 chars in it. I saved it about a hundred times. No extraneous chars were seen.

My problem-free results may hint that the problem involves the ESPEasy's configuration. Maybe interaction with a specific Controller or Device plugin. Or maybe today was my lucky day.

- Thomas

TD-er
Core team member
Posts: 1922
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: strange characters while submitting rules

#13 Post by TD-er » 06 Dec 2019, 20:44

Well, your build is heading for the infinite uptime, so it will not break :)

I've been looking into the webserver code a bit more (core library stuff) and I've come to the conclusion this may have lead to a lot of very strange issues in the past where settings somehow have become corrupted.
So this is for sure something I will think about how to detect these issues as they may have remained undetected until now.
The rules handling may be one of the most clear situations where an error like these gets noticed quite easily.
Also the submitted data of the rules is significantly larger, so it may lead to issues sooner.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests