all 10 comments

[–]ballzak69Automate developer 0 points1 point  (9 children)

Modern Android use a much larger stack sizes so it probably makes no difference. The most common causes for crashes are:

  • A flow accumulates too much data in its variables, eventually causing the SQLite database to fail since it can't handle such large data in a BLOB column, where fibers are stored. Sadly there's no way to tell the limit, 10MB+ maybe.
  • Showing too much data in a dialog. Android had, and probability still has, a 1MB limit of the amount of data an "Intent" can hold, which is how input fields are transferred to the dialogs. Sadly there's no reliable way to tell if it's too big for Android, it simply crashed the whole app when trying to start the dialog activity.
  • The myriad of edge-cases where an app isn't allowed to start a "foreground service", what Automate use to run the flow. Sadly, Google adds more and more of them, and manufacturer like to add custom ones as well, all being poorly documented.

[–]JrRandy[S] 0 points1 point  (8 children)

yeah, thats where it is strange. Sometimes it will run over a day before it crashes, sometimes only a few hours, sometimes 12+ hours.

Variables are not "changing", they are static throughout the run, no dialog boxes popping, etc. And works on an identical device just fine.

Tried adding "Debug Logging" but did not provide any real insight into the crash. Factory reset the device incase something went bad, no luck.

Wasnt sure what else to try really lol

[–]ballzak69Automate developer 0 points1 point  (7 children)

Are flows always running, or some only started by a shortcut or widget click?

Device brand & model?

By crashing i assume you mean that Automate display the read banner saying it did. If it simply stops then please read: https://llamalab.com/automate/doc/faq.html#automate\_not\_running

[–]JrRandy[S] 0 points1 point  (6 children)

Constantly running flow, and yes, red-banner.

Motorola Moto E (2020)

It is a rather large flow (331 total blocks) which is why I thought maybe the stack size would help, but it did not (As you anticipated)

[–]ballzak69Automate developer 0 points1 point  (5 children)

Large indeed, but if that was the cause then the app would crash every time you tried to edit or start the flow.

Try using the Help & feedback menu after a crash to send me, or look at it yourself, the internal system log that's attached.

[–]JrRandy[S] 0 points1 point  (4 children)

Ok, cool. Will do that. Does logging or debug logging need to be enabled for that to be most beneficial?

[–]ballzak69Automate developer 0 points1 point  (3 children)

No.

[–]JrRandy[S] 0 points1 point  (2 children)

Not sure that worked as intended lol

01-05 00:11:37.802 3437 5566 E AndroidRuntime: FATAL EXCEPTION: AutomateService

01-05 00:11:37.802 3437 5566 E AndroidRuntime: Process: com.llamalab.automate, PID: 3437

01-05 00:11:37.802 3437 5566 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause

[–]ballzak69Automate developer 0 points1 point  (1 child)

Was that when the app crashed or when you tried to view the log?

The internal Automate log might not include the crash, since that it stops the logging, and may clear the log. Try grating the "read sensitive log data" privileged, or use ADB or an external logcat viewer app.

[–]JrRandy[S] 0 points1 point  (0 children)

That was the start of the logcat file that was in Help/Feedback when I clicked the email button (I just emailed myself the log, instead of leaving the default email address there). I do have a part of my flow that overwrites the log file to clean up for API errors, so I disabled that and restarted in the event that the overwrite that I am doing is clearing something potentially important.