Skip to content

[LeakScope] 11 Android lifecycle/memory violations detected #702

@MuhammadTehamsibAliTashfeen

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 11 potential issue(s) across 2 detector type(s):

Severity Count
🔴 High 0
🟡 Medium 1
🟢 Low (improvement opportunity) 10
Detector Count Severity Description
ServiceResourceManagementIssueDetector 1 🟡 Medium Service may never stop — missing stopSelf() call
ViewBindingOpportunity 10 🟢 Low Manual findViewById() calls — ViewBinding migration opportunity

Detailed Findings

🟡 ServiceResourceManagementIssueDetector

Service may never stop — missing stopSelf() call

Finding #1GPSLogger

ℹ� Best Practice: Service relies on stopSelf(). For robustness, also call stopForeground(true) in onDestroy().
  Class: net.osmtracker.service.gps.GPSLogger
  Method: N/A

🟢 ViewBindingOpportunity

Manual findViewById() calls — ViewBinding migration opportunity

Finding #2ButtonsPresets

View Binding Migration Opportunity
Class: net.osmtracker.activity.ButtonsPresets
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in listLayouts
  • findViewById in listLayouts
  • findViewById in listLayouts
  • findViewById in refreshActivity
  • findViewById in refreshActivity
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

Finding #3TrackDetailEditor

View Binding Migration Opportunity
Class: net.osmtracker.activity.TrackDetailEditor
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onCreate
  • findViewById in onCreate
  • findViewById in onCreate
  • findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

Finding #4TrackDetail

View Binding Migration Opportunity
Class: net.osmtracker.activity.TrackDetail
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onCreate
  • findViewById in onCreate
  • findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

Finding #5WaypointList

View Binding Migration Opportunity
Class: net.osmtracker.activity.WaypointList
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onListItemClick
  • findViewById in onListItemClick
  • findViewById in onListItemClick
  • findViewById in onListItemClick
  • findViewById in onListItemClick
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

Finding #6OpenStreetMapUpload

View Binding Migration Opportunity
Class: net.osmtracker.activity.OpenStreetMapUpload
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onCreate
  • findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

Finding #7DisplayTrackMap

View Binding Migration Opportunity
Class: net.osmtracker.activity.DisplayTrackMap
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onCreate
  • findViewById in onCreate
  • findViewById in onCreate
  • findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

Finding #8TrackManager

View Binding Migration Opportunity
Class: net.osmtracker.activity.TrackManager
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in setRecyclerView
  • findViewById in onCreate
  • findViewById in onCreate
  • findViewById in onCreate
  • findViewById in onResume
  • findViewById in onResume
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

Finding #9About

View Binding Migration Opportunity
Class: net.osmtracker.activity.About
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onCreate
  • findViewById in onCreate
  • findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

Finding #10TrackLogger

View Binding Migration Opportunity
Class: net.osmtracker.activity.TrackLogger
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onCreate
  • findViewById in onOptionsItemSelected
  • findViewById in onPause
  • findViewById in onResume
  • findViewById in onResume
  • findViewById in onResume
  • findViewById in onResume
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

Finding #11AvailableLayouts

View Binding Migration Opportunity
Class: net.osmtracker.activity.AvailableLayouts
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onOptionsItemSelected
  • findViewById in onOptionsItemSelected
  • findViewById in onOptionsItemSelected
  • findViewById in onOptionsItemSelected
  • findViewById in onOptionsItemSelected
  • findViewById in setAvailableLayouts
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak

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 osmtracker-android.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions