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.
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.
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"]Variable Passing Bug
Moderator: Martin
Variable Passing Bug
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Variable Passing Bug
Thanks for reporting!
The next update (available in the next few hours) should improve the situation.
Regards,
Martin
The next update (available in the next few hours) should improve the situation.
Regards,
Martin
Re: Variable Passing Bug
Thanks Martin. The bug is solved within hours.
Sometimes trying to figure out how to consistently reproduce the bug takes more time.
Sometimes trying to figure out how to consistently reproduce the bug takes more time.

Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Variable Passing Bug
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.
b,c,d disappear again from script 3.
Regards,
Desmanto
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];
Regards,
Desmanto
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Variable Passing Bug
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
Thanks for reporting!
Regards,
Martin
Re: Variable Passing Bug
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
I just found it because playing with the new regex capturing group. Really a very nice addition to regex parsing.
Regards,
Desmanto
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Variable Passing Bug
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.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.b,c,d disappear again from script 3.Code: Select all
c = newList(); c[0] = list[0];
Regards,
Desmanto
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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Variable Passing Bug
Sorry for the delay. The fix should become available in the next update (EAP soon).