Global Variable map turns null on restart

Post your questions and help other users.

Moderator: Martin

Post Reply
anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Global Variable map turns null on restart

Post by anuraag » 15 Dec 2017 04:32

I am getting a strange bug when storing weather data into global Variable.

Here is script i am using
global_weather=fromJSON(jsonfile)

Now after system restart or Automagic service restart i see a null value of global_weather.

If i directly store json file to global_weather than it stays.

Json file is attached.
Attachments
Weather.txt
(15.41 KiB) Downloaded 713 times

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Global Variable map turns null on restart

Post by Desmanto » 15 Dec 2017 14:28

Strange, I can reproduce your problem too here with different glovar name, global_widget. After restart automagic, the log shows the global_widget = null too. It seems to happen only with your weather json file.

I've used another flow to parse chrome's bookmarks file (fromJSON()). I believe the nested level is much more than your weather json. And I don't encounter the null problem after restarting automagic. The Glovar which contain the bookmark still retains the bookmarks map + list value. Maybe other can try it too.
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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Global Variable map turns null on restart

Post by Martin » 15 Dec 2017 21:58

I can also reproduce the problem. This is caused by the values that are set to null, for example vt1alerts.
The next update should fix this problem.

Thanks for reporting!

Post Reply