Skip to content

[LeakScope] 2 Android lifecycle/memory violations detected #367

Description

LeakScope: Android Lifecycle & Memory Leak Violations

About this report: This issue was automatically generated by LeakScope, a static analysis tool for Android lifecycle violations and memory leaks built on the Soot framework. This is part of an ongoing academic research study targeting ICSE 2027. No immediate action is required — we would greatly appreciate your feedback on whether these findings are accurate.

Summary

LeakScope detected 2 potential issue(s) across 2 detector type(s):

Severity Count
🔴 High 1
🟡 Medium 1
🟢 Low (improvement opportunity) 0
Detector Count Severity Description
ThreadedUIReference 1 🔴 High Worker thread captures Activity/Fragment/View reference
ServiceResourceManagementIssueDetector 1 🟡 Medium Service may never stop — missing stopSelf() call

Detailed Findings

🔴 ThreadedUIReference

Worker thread captures Activity/Fragment/View reference

Finding #1ChatFragment

Scenario 1: Worker thread holds UI object reference
Class: de.stephanlindauer.criticalmaps.fragments.ChatFragment
Method: void handleSendClicked()
Statement: $r8 = new de.stephanlindauer.criticalmaps.handler.PostChatmessagesHandler
Captured UI objects:
  - r0 : de.stephanlindauer.criticalmaps.fragments.ChatFragment
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

🟡 ServiceResourceManagementIssueDetector

Service may never stop — missing stopSelf() call

Finding #2ServerSyncService

ℹ� Best Practice: Service relies on stopSelf(). For robustness, also call stopForeground(true) in onDestroy().
  Class: de.stephanlindauer.criticalmaps.service.ServerSyncService
  Method: N/A

How to respond to this issue:

  • If a finding is a true positive: consider applying the recommended fix and closing this issue.
  • If a finding is a false positive: please leave a comment explaining why — your feedback directly improves our research.
  • If you have questions: reply here or open a discussion.

This report was generated by LeakScope as part of the ICSE 2027 research artifact. Tool analyzes compiled APKs using Soot static analysis on criticalmaps-android.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions