MacroDroid crashed

bewafa

Member
java.lang.OutOfMemoryError: Failed to allocate a 51680392 byte allocation with 2989648 free bytes and 2919KB until OOM, target footprint 268435456, growth limit 268435456
at java.lang.StringFactory.newStringFromChars(StringFactory.java:112)
at java.lang.StringBuilder.toString(StringBuilder.java:413)
at java.lang.String.replace(String.java:2793)
at com.arlosoft.macrodroid.common.j0.y0(MagicText.java:1)
at com.arlosoft.macrodroid.common.j0.x0(MagicText.java:9)
at com.arlosoft.macrodroid.common.j0.w0(Unknown Source:10)
at com.arlosoft.macrodroid.common.j0.u0(Unknown Source:6)
at com.arlosoft.macrodroid.common.j0.t0(Unknown Source:1)
at com.arlosoft.macrodroid.common.MacroDroidVariable.K(MacroDroidVariable.kt:2)
at com.arlosoft.macrodroid.common.MacroDroidVariable.toString(MacroDroidVariable.kt:4)
at com.arlosoft.macrodroid.common.MacroDroidVariable.I(MacroDroidVariable.kt:3)
at com.arlosoft.macrodroid.common.j0.A0(MagicText.java:4)
at com.arlosoft.macrodroid.common.j0.x0(MagicText.java:399)
at com.arlosoft.macrodroid.common.j0.w0(Unknown Source:10)
at com.arlosoft.macrodroid.common.j0.u0(Unknown Source:6)
at com.arlosoft.macrodroid.common.j0.t0(Unknown Source:1)
at com.arlosoft.macrodroid.action.Action.Q2(Action.java:1)
at com.arlosoft.macrodroid.action.ToastAction.j1(Unknown Source:19)
at com.arlosoft.macrodroid.macro.Macro.logAction(Macro.java:2)
at com.arlosoft.macrodroid.macro.Macro.invokeActions(Macro.java:103)
at com.arlosoft.macrodroid.action.ReadFileAction$h$a.invokeSuspend(ReadFileAction.kt:3)
at kotlin.coroutines.jvm.internal.a.resumeWith(ContinuationImpl.kt:4)
at kotlinx.coroutines.x0.run(DispatchedTask.kt:18)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at android.app.ActivityThread.main(ActivityThread.java:8322)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1038)
Suppressed: kotlinx.coroutines.v0: [q2{Cancelling}@21d354a, Dispatchers.IO]
 
Last edited:

bewafa

Member
I attempted to free up space on my device by uninstalling unnecessary apps and clearing the cache, but despite this, the "read from file" option is still not functioning properly. Are there any other solutions you can recommend?
 

bewafa

Member
I attempted to transfer macros from one device to another by backing them up and restoring them, but some components of the macros were missing despite being on the latest version. :)
 

Endercraft

Moderator (& bug finder :D)
I attempted to free up space on my device by uninstalling unnecessary apps and clearing the cache, but despite this, the "read from file" option is still not functioning properly. Are there any other solutions you can recommend?
Memory is not storage, you can’t really do anything about it.
there may be an option somewhere to use some of your storage of that.
 

Jacob L

Moderator (Lawsonator)
If you're confident, you could Debloat your device with this tool:https://github.com/0x192/universal-android-debloater to free up memory(RAM).

if you're not as confident or want to be sensible and play it safe, go settings>apps>three dots button>show system and you can disable and force stop apps you don't need (beicing cafeful not to cripple Android). I would suggest updating Android and apps at first
 

MacroDroidDev

Administrator
Staff member
Whatever you are doing looks insane because you are trying to allocate 51MB.

Your device may have a lot of RAM, but each app is typically limited to a tiny fraction of the overall device RAM size (maybe 100s of MBs depending on your device).
 

Jacob L

Moderator (Lawsonator)
Might be wise to enable and disable macros or categories to free up memory from resources you're not needing. You should also see if you can rewrite macros to use less processes and make sure you don't have infinite loops
 

Jacob L

Moderator (Lawsonator)
I don't think this will help. The file is just too big. Have you ever tried opening a photo or video as text ?
Yes! It happens with total commander file manager if the text file is too big as well like my macros file. Still think the above will help in other cases such as low end devices.
 

HappyDev

New member
Whatever you are doing looks insane because you are trying to allocate 51MB.

Your device may have a lot of RAM, but each app is typically limited to a tiny fraction of the overall device RAM size (maybe 100s of MBs depending on your device).
I get too many app crashes with the same message at 51MB, which has made my life unbearable. Even when I don't do anything but open the app, it's not because of my macros; it could be a fault of Android 12. I remember when I was on Android 11, I rarely got any app crashes.
 

Jacob L

Moderator (Lawsonator)
I get too many app crashes with the same message at 51MB, which has made my life unbearable. Even when I don't do anything but open the app, it's not because of my macros; it could be a fault of Android 12. I remember when I was on Android 11, I rarely got any app crashes.
Oh I wonder if it has anything to do with the "phantom processes". Android 12 caused an issue with this at 32 child processes
 

Endercraft

Moderator (& bug finder :D)
Oh I wonder if it has anything to do with the "phantom processes". Android 12 caused an issue with this at 32 child processes
Hey, now that I think about it...
I too have Android 12, and recently I have noticed crashes way too much !
 
Top