Page 1 of 1

Variable Passing Bug

Posted: 18 Sep 2017 14:16
by Desmanto
Automagic 1.34.0 has a new bug in variable passing when there is list or map element access. This is the flow to test the bug.
flow_Variable_bug.xml
(3.48 KiB) Downloaded 947 times
The flow consist of 3 script and 1 debug dialog. In script 1, just variable init. Second script is where the problem lies. I have b assigned to string, c to list[0] and d to map["second"]
The bug is : If there is a variable referring to any list or map elements just like c or d, then any variable declared in the same script won't appear in the elements after it.

You can try it to check at script 3, tap the variable and there is no b, c or d. The b, c, d also got red underlined, means the variables are not available. Strange thing is they all appear in debug dialog. So the variables are there, they simply disappear from selection. e also produce a proper list from b,c,d.

If in script 2, we comment out the c and d line, and uncomment the one that refer directly to the whole list and map (c = list and d = map), then b, c, d appear properly at script 3.

I tried at both my phone LP 5.1, 1.34.0, and both give same bug. Don't if everyone have the same problem. Tested in another LP 5.1 phone, with 1.33.0 installed, the bug doesn't appear. The b, c, d can be found at variable in script 3, even at script 2 refer to list/map element.
The bug is not fatal, but simply annoying. Because when compacting the flow I just curious why the variables are red underlined, even though I have properly declared it in the previous element and connect them. It slows down debugging process, since usually red underlined means undeclared/unavailable variables, which is usually the error.

Re: Variable Passing Bug

Posted: 18 Sep 2017 19:34
by Martin
Thanks for reporting!
The next update (available in the next few hours) should improve the situation.

Regards,
Martin

Re: Variable Passing Bug

Posted: 19 Sep 2017 02:26
by Desmanto
Thanks Martin. The bug is solved within hours.

Sometimes trying to figure out how to consistently reproduce the bug takes more time. :)

Re: Variable Passing Bug

Posted: 21 Sep 2017 05:32
by Desmanto
Hi Martin,

There is still bug at the variable passing. Previously i just tested the right side.
if i use list reference at the left side, it will disappear as well, but still appear in debug dialog (same as before).

Add and change the line at script 2 to test.

Code: Select all

c = newList();
c[0] = list[0];
b,c,d disappear again from script 3.

Regards,
Desmanto

Re: Variable Passing Bug

Posted: 22 Sep 2017 09:16
by Martin
I can reproduce the problem. The fix for this problem was obviously not complete. It should be working as expected in the next update.
Thanks for reporting!

Regards,
Martin

Re: Variable Passing Bug

Posted: 22 Sep 2017 15:54
by Desmanto
You are welcome. It is not as annoying as the first one.
I just found it because playing with the new regex capturing group. Really a very nice addition to regex parsing.

Regards,
Desmanto

Re: Variable Passing Bug

Posted: 22 Jan 2018 17:48
by Desmanto
Desmanto wrote:Hi Martin,

There is still bug at the variable passing. Previously i just tested the right side.
if i use list reference at the left side, it will disappear as well, but still appear in debug dialog (same as before).

Add and change the line at script 2 to test.

Code: Select all

c = newList();
c[0] = list[0];
b,c,d disappear again from script 3.

Regards,
Desmanto
Bumping old thread. I reproduce the problem with 1.33.0 (in emulator), it seems it is already like that since 1.33.0. I just don't realize it yet, since I haven't started to use map/list.

Recently I heavily depends on map/list, thus the problem started to escalate quickly.
When the flow passed thru 10-20 elements, it started to be quite annoying to see the redline telling the variable isn't exist (while it actually exist in debug dialog).
It is just cosmetic, but sometimes i can wrong tap the red underline and mis-deleted or mis-correct it to something else.

Re: Variable Passing Bug

Posted: 23 Jan 2018 09:19
by Martin
Sorry for the delay. The fix should become available in the next update (EAP soon).