Hi. Telegram v12.8.3 is crashing on my Samsung SM-S938B, Android16, OneUI 8.5, with OutOfMemoryError in various situations, mainly related to attaching media. Currently it can be reproduced consistently when attaching a photo and opening editing tab, as in the video attached. The issue remains for several months now since some time in March through various versions of Tg and phone software. Not sure which versions it started appearing with exactly. No other devices seem to be affected. Reinstalling Tg/clearing cache/force stopping the app has zero effect on the issue. I'm also attaching a log tail with the crash info collected by Telegram (it doesn't log the crash moment consistently, btw)
24_06_2026_20_33_11.015 E/tmessages: at org.telegram.messenger.ImageLoader$CacheOutTask.run(SourceFile:1509) 24_06_2026_20_33_11.015 E/tmessages: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154) 24_06_2026_20_33_11.015 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652) 24_06_2026_20_33_11.015 E/tmessages: at java.lang.Thread.run(Thread.java:1564) 24_06_2026_20_33_13.387 FATAL/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 3269143 byte allocation with 2703728 free bytes and 2640KB until OOM, target footprint 536870912, growth limit 536870912 24_06_2026_20_33_13.387 FATAL/tmessages: at dalvik.system.VMRuntime.newNonMovableArray(Native Method) 24_06_2026_20_33_13.387 FATAL/tmessages: at java.nio.DirectByteBuffer$MemoryRef.<init>(DirectByteBuffer.java:73) 24_06_2026_20_33_13.387 FATAL/tmessages: at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:347) 24_06_2026_20_33_13.387 FATAL/tmessages: at com.google.android.gms.internal.vision.zzw.zza(SourceFile:23)
24_06_2026_20_33_13.387 FATAL/tmessages: at com.google.android.gms.vision.face.FaceDetector.detect(SourceFile:30) 24_06_2026_20_33_13.387 FATAL/tmessages: at org.telegram.ui.PhotoViewer.lambda$detectFaces$108(SourceFile:12093) 24_06_2026_20_33_13.387 FATAL/tmessages: at org.telegram.ui.PhotoViewer.$r8$lambda$ahxgLlvGzIMjrtO0nqdaHfjvTis(SourceFile:0) 24_06_2026_20_33_13.387 FATAL/tmessages: at org.telegram.ui.PhotoViewer$$ExternalSyntheticLambda137.run(SourceFile:0) 24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Handler.handleCallback(Handler.java:1070) 24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Handler.dispatchMessage(Handler.java:125) 24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Looper.dispatchMessage(Looper.java:358) 24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Looper.loopOnce(Looper.java:288) 24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Looper.loop(Looper.java:392) 24_06_2026_20_33_13.387 FATAL/tmessages: at org.telegram.messenger.DispatchQueue.run(SourceFile:141)
hey, thanks for replying. yes its happening with almost any picture, not 16k, sometimes screenshots, sometimes random memes from internet. typically it happens more often if telegram is already open for a while, not if it's freshly started - looks more like a memory leak or something. I don't have any machine with adb on me today, i could send over the logs tomorrow. it is happening in latest beta too though.
done, https://dropmefiles.com/6WMaO the last crash was at 10-06 09:42:15.075 1000 2269 3260 I am_crash: [20255,0,org.telegram.messenger.beta,949730884,java.lang.OutOfMemoryError,Failed to allocate a 27064339 byte allocation with 22388736 free bytes and 21MB until OOM, target footprint 536870912, growth limit 536870912,VMRuntime.java,-2,0]
24_06_2026_20_33_11.015 E/tmessages: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
24_06_2026_20_33_11.015 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
24_06_2026_20_33_11.015 E/tmessages: at java.lang.Thread.run(Thread.java:1564)
24_06_2026_20_33_13.387 FATAL/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 3269143 byte allocation with 2703728 free bytes and 2640KB until OOM, target footprint 536870912, growth limit 536870912
24_06_2026_20_33_13.387 FATAL/tmessages: at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
24_06_2026_20_33_13.387 FATAL/tmessages: at java.nio.DirectByteBuffer$MemoryRef.<init>(DirectByteBuffer.java:73)
24_06_2026_20_33_13.387 FATAL/tmessages: at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:347)
24_06_2026_20_33_13.387 FATAL/tmessages: at com.google.android.gms.internal.vision.zzw.zza(SourceFile:23)
24_06_2026_20_33_13.387 FATAL/tmessages: at org.telegram.ui.PhotoViewer.lambda$detectFaces$108(SourceFile:12093)
24_06_2026_20_33_13.387 FATAL/tmessages: at org.telegram.ui.PhotoViewer.$r8$lambda$ahxgLlvGzIMjrtO0nqdaHfjvTis(SourceFile:0)
24_06_2026_20_33_13.387 FATAL/tmessages: at org.telegram.ui.PhotoViewer$$ExternalSyntheticLambda137.run(SourceFile:0)
24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Handler.handleCallback(Handler.java:1070)
24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Handler.dispatchMessage(Handler.java:125)
24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Looper.dispatchMessage(Looper.java:358)
24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Looper.loopOnce(Looper.java:288)
24_06_2026_20_33_13.387 FATAL/tmessages: at android.os.Looper.loop(Looper.java:392)
24_06_2026_20_33_13.387 FATAL/tmessages: at org.telegram.messenger.DispatchQueue.run(SourceFile:141)
Is it also happening with every picture? Is it maybe a 16K picture?
https://pastebin.com/4qbg3emY
the last crash was at
10-06 09:42:15.075 1000 2269 3260 I am_crash: [20255,0,org.telegram.messenger.beta,949730884,java.lang.OutOfMemoryError,Failed to allocate a 27064339 byte allocation with 22388736 free bytes and 21MB until OOM, target footprint 536870912, growth limit 536870912,VMRuntime.java,-2,0]