Simple-Calendar
Simple-Calendar copied to clipboard
App keeps running out of memory
I'm not sure when it started, but Simple Calendar keeps running out of memory, both when in foreground and in background. A log entry looks like this:
[10-31 19:05:31.024 13206:13228 E/AndroidRuntime]
FATAL EXCEPTION: Thread-2
Process: com.simplemobiletools.calendar.pro, PID: 13206
java.lang.OutOfMemoryError: Failed to allocate a 22896 byte allocation with 8104 free bytes and 8104B until OOM, target footprint 268435456, growth limit 268435456
at java.lang.StringFactory.newStringFromChars(StringFactory.java:260)
at java.lang.StringBuffer.toString(StringBuffer.java:671)
at java.io.StringWriter.toString(StringWriter.java:210)
at h3.d.r(SourceFile:3)
at h3.d.q(SourceFile:2)
at w3.a$a.c(SourceFile:13)
at w3.a$a.g(SourceFile:1)
at g4.l.i0(SourceFile:3)
at g4.l.j0(SourceFile:1)
at w3.a.i(SourceFile:10)
at w3.a.w(SourceFile:11)
at u3.b$j.c(SourceFile:1)
at u3.b$j.a(SourceFile:1)
at h4.d.c(SourceFile:1)
at h4.d.a(Unknown Source:0)
at h4.c.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:923)
I also found one error message with a different trace:
[10-31 17:05:49.152 9619:9689 E/AndroidRuntime]
FATAL EXCEPTION: Thread-9
Process: com.simplemobiletools.calendar.pro, PID: 9619
java.lang.OutOfMemoryError: Failed to allocate a 12792 byte allocation with 7048 free bytes and 7048B until OOM, target footprint 268435456, growth limit 268435456
at android.database.CursorWindow.nativeGetString(Native Method)
at android.database.CursorWindow.getString(CursorWindow.java:469)
at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:53)
at x3.e.C(SourceFile:43)
at w3.a.i(SourceFile:3)
at w3.a.w(SourceFile:11)
at com.simplemobiletools.calendar.pro.activities.MainActivity$j.c(SourceFile:1)
at com.simplemobiletools.calendar.pro.activities.MainActivity$j.a(SourceFile:1)
at q3.a2$a$a.c(SourceFile:2)
at q3.a2$a$a.a(SourceFile:1)
at h4.d.c(SourceFile:1)
at h4.d.a(Unknown Source:0)
at h4.c.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:923)
I think it could be that the first stack is when it is in the background and the second when in foreground?
I've also seen just
[11-01 07:53:02.774 25700:25700 E/AndroidRuntime]
FATAL EXCEPTION: main
Process: com.simplemobiletools.calendar.pro, PID: 25700
java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw an exception; no stack trace available
or
[11-01 07:53:39.048 25859:25880 E/AndroidRuntime]
FATAL EXCEPTION: Thread-2
Process: com.simplemobiletools.calendar.pro, PID: 25859
java.lang.OutOfMemoryError: Failed to allocate a 2064 byte allocation with 1856 free bytes and 1856B until OOM, target footprint 268435456, growth limit 268435456
at o3.a.<init>(SourceFile:2)
at h3.d.n(SourceFile:1)
at h3.d.g(SourceFile:1)
at h3.d.h(SourceFile:2)
at w3.d.a(SourceFile:3)
at x3.e.C(SourceFile:55)
at w3.a.i(SourceFile:3)
at w3.a.w(SourceFile:11)
at u3.b$j.c(SourceFile:1)
at u3.b$j.a(SourceFile:1)
at h4.d.c(SourceFile:1)
at h4.d.a(Unknown Source:0)
at h4.c.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:923)
But the first error message is by far the most often. Unfortunately since the process keeps crashing I can't really filter the messages by process id. Is there any way I can debug this further?
I'm on a Pixel 4a with Calynx 2.10.0 and simple calender 6.15.4 from f-droid. I'm also using DAVx5 to sync some CalDav calendars.
I'm not sure if the issues are related but if I remember correctly around the same time the calendars sometimes took quite a bit of time to load and be displayed, possibly the same issue as https://github.com/SimpleMobileTools/Simple-Calendar/issues/1468?