You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ANR caused by main-thread work in onMalwareDetected (reflection + PackageManager calls) #214
:::writing{variant=“standard” id=“92741”}
Title: ANR caused by main-thread work in onMalwareDetected (reflection + PackageManager calls)
⸻
Description
We encountered ANR issues caused by heavy work being executed on the main thread inside onMalwareDetected.
From the stack trace, the callback triggers:
• Reflection (Class.getMethod)
• OEM framework hooks (TranReflectHelper)
• PackageManager calls (getApplicationLabel)
• Resource loading
All of these are happening on the UI thread, leading to freezes and ANR.
⸻
Stack Trace (key part)
at java.lang.Class.getMethod
at com.transsion.hubcore.proxy.TranReflectHelper.getMethod
at android.app.ApplicationPackageManager.getApplicationLabel
at com.aheaditec.freerasp.ExtensionsKt.toPigeon
at com.aheaditec.freerasp.handlers.MethodCallHandler$sink$1.onMalwareDetected
⸻
Root Cause
Inside onMalwareDetected, this line performs heavy work on the main thread:
val pigeonPackageInfo = packageInfo.map { it.toPigeon(context) }
Hi @ahan530 , thank you for bringing this up and providing a detailed write-up of the issue; we will take a look. We will be happy to receive any further feedback regarding the free malware detection capabilities! You may also check out the premium malware detection product (also comes with online DB of malware!), which offers enhanced capabilities, fast SLA, and full support for commercial projects: https://docs.talsec.app/premium-products/product/malware-detection
Activity
SirionRazzer commentedon Apr 8, 2026
Hi @ahan530 , thank you for bringing this up and providing a detailed write-up of the issue; we will take a look. We will be happy to receive any further feedback regarding the free malware detection capabilities! You may also check out the premium malware detection product (also comes with online DB of malware!), which offers enhanced capabilities, fast SLA, and full support for commercial projects: https://docs.talsec.app/premium-products/product/malware-detection
ahan530 commentedon Apr 10, 2026
OK, received. Thanks for following up.
SirionRazzer commentedon Apr 21, 2026
Hi @ahan530 ,
this is a very rare issue, however we managed to trace it and we will release the fix in the next release.