The flow definitions have been modified outside of Automagic

Post your questions and help other users.

Moderator: Martin

ewill
Posts: 67
Joined: 20 Jul 2015 16:42

Re: The flow definitions have been modified outside of Autom

Post by ewill » 30 May 2016 13:37

I just encountered this after the following steps:
1-Nandroid backup
2-Restore prior nandroid backup (to grab something out of that backup
3-Restore the nandroid backup done in my first step

My device ID had not changed throughout the entire process. I had to re-enable all flows again.

I also tried restoring data from Titanium backup (that did not help either).

The third option would have been great - it is hard to remember which of my flows should be active.

jeminar
Posts: 4
Joined: 11 Jun 2016 10:52

Re: The flow definitions have been modified outside of Autom

Post by jeminar » 07 Mar 2017 08:30

Martin wrote:I'll probably add such a third option. It seems that the check causes more problems than it helps. When the flows are available on /storage/emulated/0/Automagic, you could force-stop Automagic, clear the data of Automagic and the flows should be loaded without warning.
@Martin -- I have had the same problem on several phones for several years, and been hoping for a while to see an update from you with this hapenning. In the meanwhile, I have a flow called "_reset" which I have to run manually when I happen to spot that flows are failing.

Because it has still been a problem, I spent some time very specifically diagnosing the root cause in my case, and this might help you:

BACKGROUND FLOW
A collection of my flows records what is happening on my phone (e.g. app focus, bluetooth connect), and stores it in a log, which is periodically dumped to a file and uploaded to dropbox. It works well (except when the circumstance below happens).

Technically, there are lots of triggers on events, which create strings, which are added to a List called global_log using addElement(global_log,[the log string]).

I have a flow triggered on a timer which checks if length(global_log)>[some threshold] saves global_log to file and uploads to dropbox, then clears global_log if successfully uploaded. The threshold is set on number of items in the list, and means that a typical log file is ~30kB.

CAUSING THE CRASH
During a long period off-line, or a period when some external event has triggered lots of events, then global_log gets bigger. (The save to dropbox fails, for example).
There is some point when global_log is so big that something in the uploading flow flow fails before reaching the save to dropbox. I don't know if it's the test of length(global_log) or the action of saving variable to file, but at this point, the log never gets cleared. There does not seem to be any pattern to the size of global_log. global_log gets bigger and bigger. Very often, I cannot read or copy global_log from Manage>Global Variables>global_log>Show value in text editor.

When global_log is in this position, then I cannot start Automagic without getting the Verify Flow error.

POTENTIAL DIAGNOSIS
Something truncates global_log in the system, and when Automagic opens, it's hash is not as expected.

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

Re: The flow definitions have been modified outside of Autom

Post by Martin » 07 Mar 2017 21:08

It sounds like global_log might become so big that Automagic runs out of memory when it tries to add/read or otherwise process this variable.
Could you please enable Debug Log and Log to SD card in the preferences of Automagic, wait until the crash happens again and then send the log to me (menu->Manage->Log, menu->Send Log) so I can investigate this issue?

Do you really need to store the events temporarily in global_log? I recommend to store the strings directly in a file using action Write to File (enable Append). This could prevent the crash of Automagic and would probably also circumvent the verification issue.

Regards,
Martin

Post Reply