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_10.465 E/tmessages: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154) 24_06_2026_20_33_10.465 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652) 24_06_2026_20_33_10.465 E/tmessages: at java.lang.Thread.run(Thread.java:1564) 24_06_2026_20_33_10.475 D/tmessages: chatItemAnimator enable notifications 24_06_2026_20_33_10.646 E/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 731612880 byte allocation with 4547600 free bytes and 4441KB until OOM, target footprint 536870912, growth limit 536870912 24_06_2026_20_33_10.646 E/tmessages: at org.telegram.messenger.ImageLoader$CacheOutTask.run(SourceFile:1509) 24_06_2026_20_33_10.646 E/tmessages: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154) 24_06_2026_20_33_10.646 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652) 24_06_2026_20_33_10.646 E/tmessages: at java.lang.Thread.run(Thread.java:1564) 24_06_2026_20_33_10.853 E/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 813675792 byte allocation with 3181584 free bytes and 3107KB until OOM, target footprint 536870912, growth limit 536870912 24_06_2026_20_33_10.853 E/tmessages: at org.telegram.messenger.ImageLoader$CacheOutTask.run(SourceFile:1509) 24_06_2026_20_33_10.853 E/tmessages: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154) 24_06_2026_20_33_10.853 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652) 24_06_2026_20_33_10.853 E/tmessages: at java.lang.Thread.run(Thread.java:1564) 24_06_2026_20_33_11.015 E/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 800269544 byte allocation with 3140624 free bytes and 3067KB until OOM, target footprint 536870912, growth limit 536870912
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.
24_06_2026_20_33_10.155 E/tmessages: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
24_06_2026_20_33_10.155 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
24_06_2026_20_33_10.155 E/tmessages: at java.lang.Thread.run(Thread.java:1564)
24_06_2026_20_33_10.188 D/tmessages: java received org.telegram.tgnet.TLRPC$TL_messages_messageViews@b064c2e messageId = 0x6a3c14d6024dd400
24_06_2026_20_33_10.189 D/tmessages: notify item changed 2
24_06_2026_20_33_10.190 D/tmessages: notify item changed 1
24_06_2026_20_33_10.190 D/tmessages: notify item changed 0
24_06_2026_20_33_10.190 D/tmessages: notify item range changed 1:2
24_06_2026_20_33_10.190 D/tmessages: notify item changed 0
24_06_2026_20_33_10.206 D/tmessages: chatItemAnimator disable notifications
24_06_2026_20_33_10.287 E/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 878200400 byte allocation with 4535312 free bytes and 4429KB until OOM, target footprint 536870912, growth limit 536870912
24_06_2026_20_33_10.287 E/tmessages: at org.telegram.messenger.ImageLoader$CacheOutTask.run(SourceFile:1509)
24_06_2026_20_33_10.287 E/tmessages: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
24_06_2026_20_33_10.287 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
24_06_2026_20_33_10.287 E/tmessages: at java.lang.Thread.run(Thread.java:1564)
24_06_2026_20_33_10.465 E/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 814831096 byte allocation with 4535312 free bytes and 4429KB until OOM, target footprint 536870912, growth limit 536870912
24_06_2026_20_33_10.465 E/tmessages: at org.telegram.messenger.ImageLoader$CacheOutTask.run(SourceFile:1509)
24_06_2026_20_33_10.465 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
24_06_2026_20_33_10.465 E/tmessages: at java.lang.Thread.run(Thread.java:1564)
24_06_2026_20_33_10.475 D/tmessages: chatItemAnimator enable notifications
24_06_2026_20_33_10.646 E/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 731612880 byte allocation with 4547600 free bytes and 4441KB until OOM, target footprint 536870912, growth limit 536870912
24_06_2026_20_33_10.646 E/tmessages: at org.telegram.messenger.ImageLoader$CacheOutTask.run(SourceFile:1509)
24_06_2026_20_33_10.646 E/tmessages: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
24_06_2026_20_33_10.646 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
24_06_2026_20_33_10.646 E/tmessages: at java.lang.Thread.run(Thread.java:1564)
24_06_2026_20_33_10.853 E/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 813675792 byte allocation with 3181584 free bytes and 3107KB until OOM, target footprint 536870912, growth limit 536870912
24_06_2026_20_33_10.853 E/tmessages: at org.telegram.messenger.ImageLoader$CacheOutTask.run(SourceFile:1509)
24_06_2026_20_33_10.853 E/tmessages: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
24_06_2026_20_33_10.853 E/tmessages: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
24_06_2026_20_33_10.853 E/tmessages: at java.lang.Thread.run(Thread.java:1564)
24_06_2026_20_33_11.015 E/tmessages: java.lang.OutOfMemoryError: Failed to allocate a 800269544 byte allocation with 3140624 free bytes and 3067KB until OOM, target footprint 536870912, growth limit 536870912
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