Skip to content

[LeakScope] 24 Android lifecycle/memory violations detected #29

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

Severity Count
🔴 High 19
🟡 Medium 0
🟢 Low (improvement opportunity) 5
Detector Count Severity Description
ThreadedUIReference 19 🔴 High Worker thread captures Activity/Fragment/View reference
ViewBindingOpportunity 5 🟢 Low Manual findViewById() calls — ViewBinding migration opportunity

Detailed Findings

🔴 ThreadedUIReference

Worker thread captures Activity/Fragment/View reference

Finding #1RealTimeUniformMeshChart3DFragment

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimeUniformMeshChart3DFragment
Method: void initExample(com.scichart.charting3d.visuals.SciChartSurface3D)
Statement: $r24 = new com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimeUniformMeshChart3DFragment$$ExternalSyntheticLambda0
Captured UI objects:
  - r0 : com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimeUniformMeshChart3DFragment
  - $r1 : com.scichart.charting3d.visuals.SciChartSurface3D
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

Finding #2RealtimeGeoid3DChartFragment\n// (Full source code omitted for brevity)\n"

{
  "text_input": "package com.scichart.examples.fragments.examples3d.realtime3DCharts;\n\n// Class: com.scichart.examples.fragments.examples3d.realtime3DCharts.RealtimeGeoid3DChartFragment\n// (Full source code omitted for brevity)\n",
  "output": "Yes",
  "project": "examples",
  "explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.scichart.examples.fragments.examples3d.realtime3DCharts.RealtimeGeoid3DChartFragment\nMethod: void initExample(com.scichart.charting3d.visuals.SciChartSurface3D)\nStatement: $r28 \u003d new com.scichart.examples.fragments.examples3d.realtime3DCharts.RealtimeGeoid3DChartFragment$$ExternalSyntheticLambda0\nCaptured UI objects:\n  - r0 : com.scichart.examples.fragments.examples3d.realtime3DCharts.RealtimeGeoid3DChartFragment\n  - $r1 : com.scichart.charting3d.visuals.SciChartSurface3D\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects to worker threads\n"
}
{
  "text_in
… (truncated for brevity)

Finding #3RealTimeWaterfall3DChartFragment\n// (Full source code omitted for brevity)\n"

{
  "text_input": "package com.scichart.examples.fragments.examples3d.realtime3DCharts;\n\n// Class: com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimeWaterfall3DChartFragment\n// (Full source code omitted for brevity)\n",
  "output": "Yes",
  "project": "examples",
  "explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimeWaterfall3DChartFragment\nMethod: void initExample(com.scichart.charting3d.visuals.SciChartSurface3D)\nStatement: $r2 \u003d new com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimeWaterfall3DChartFragment$$ExternalSyntheticLambda2\nCaptured UI objects:\n  - $r1 : com.scichart.charting3d.visuals.SciChartSurface3D\n  - r0 : com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimeWaterfall3DChartFragment\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects to worker threads\n"
… (truncated for brevity)

Finding #4RealTimePointCloud3DChartFragment\n// (Full source code omitted for brevity)\n"

{
  "text_input": "package com.scichart.examples.fragments.examples3d.realtime3DCharts;\n\n// Class: com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimePointCloud3DChartFragment\n// (Full source code omitted for brevity)\n",
  "output": "Yes",
  "project": "examples",
  "explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimePointCloud3DChartFragment\nMethod: void initExample(com.scichart.charting3d.visuals.SciChartSurface3D)\nStatement: r22 \u003d new com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimePointCloud3DChartFragment$$ExternalSyntheticLambda0\nCaptured UI objects:\n  - r0 : com.scichart.examples.fragments.examples3d.realtime3DCharts.RealTimePointCloud3DChartFragment\n  - $r1 : com.scichart.charting3d.visuals.SciChartSurface3D\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects to worker thread
… (truncated for brevity)

Finding #5Chart3DSandboxFragment

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.fragments.examples3d.aTest.Chart3DSandboxFragment
Method: void initExample(com.scichart.charting3d.visuals.SciChartSurface3D)
Statement: $r24 = new com.scichart.examples.fragments.examples3d.aTest.Chart3DSandboxFragment$$ExternalSyntheticLambda0
Captured UI objects:
  - $r1 : com.scichart.charting3d.visuals.SciChartSurface3D
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

Finding #6RenderSurfaceSandboxFragment

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.fragments.examples2d.aTest.RenderSurfaceSandboxFragment
Method: void initExample(com.scichart.examples.databinding.ExampleRenderSurfaceSandboxFragmentBinding)
Statement: $r18 = new com.scichart.examples.fragments.examples2d.aTest.RenderSurfaceSandboxFragment$$ExternalSyntheticLambda0
Captured UI objects:
  - r0 : com.scichart.examples.fragments.examples2d.aTest.RenderSurfaceSandboxFragment
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

Finding #7ECGMonitorFragment

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.fragments.featuredApps.medicalCharts.ECGMonitorFragment
Method: void initExample(com.scichart.charting.visuals.SciChartSurface)
Statement: $r6 = new com.scichart.examples.fragments.featuredApps.medicalCharts.ECGMonitorFragment$$ExternalSyntheticLambda0
Captured UI objects:
  - $r1 : com.scichart.charting.visuals.SciChartSurface
  - r0 : com.scichart.examples.fragments.featuredApps.medicalCharts.ECGMonitorFragment
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

Finding #8AnimatingLineChartFragment\n// (Full source code omitted for brevity)\n"

{
  "text_input": "package com.scichart.examples.fragments.examples2d.createCustomAnimations;\n\n// Class: com.scichart.examples.fragments.examples2d.createCustomAnimations.AnimatingLineChartFragment\n// (Full source code omitted for brevity)\n",
  "output": "Yes",
  "project": "examples",
  "explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.scichart.examples.fragments.examples2d.createCustomAnimations.AnimatingLineChartFragment\nMethod: void initExample(com.scichart.charting.visuals.SciChartSurface)\nStatement: $r6 \u003d new com.scichart.examples.fragments.examples2d.createCustomAnimations.AnimatingLineChartFragment$$ExternalSyntheticLambda2\nCaptured UI objects:\n  - r0 : com.scichart.examples.fragments.examples2d.createCustomAnimations.AnimatingLineChartFragment\n  - $r1 : com.scichart.charting.visuals.SciChartSurface\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects to worker threads\n"
}
… (truncated for brevity)

Finding #9AnimatingStackedColumnChartFragment

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.fragments.examples2d.createCustomAnimations.AnimatingStackedColumnChartFragment
Method: java.util.concurrent.ScheduledFuture createSchedule()
Statement: $r1 = new com.scichart.examples.fragments.examples2d.createCustomAnimations.AnimatingStackedColumnChartFragment$$ExternalSyntheticLambda6
Captured UI objects:
  - r0 : com.scichart.examples.fragments.examples2d.createCustomAnimations.AnimatingStackedColumnChartFragment
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

Finding #10RealtimeSeriesValuesOnAxisFragment\n// (Full source code omitted for brevity)\n"

{
  "text_input": "package com.scichart.examples.fragments.examples2d.createRealtimeCharts;\n\n// Class: com.scichart.examples.fragments.examples2d.createRealtimeCharts.RealtimeSeriesValuesOnAxisFragment\n// (Full source code omitted for brevity)\n",
  "output": "Yes",
  "project": "examples",
  "explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.scichart.examples.fragments.examples2d.createRealtimeCharts.RealtimeSeriesValuesOnAxisFragment\nMethod: void initExample(com.scichart.charting.visuals.SciChartSurface)\nStatement: $r2 \u003d new com.scichart.examples.fragments.examples2d.createRealtimeCharts.RealtimeSeriesValuesOnAxisFragment$$ExternalSyntheticLambda0\nCaptured UI objects:\n  - $r1 : com.scichart.charting.visuals.SciChartSurface\n  - r0 : com.scichart.examples.fragments.examples2d.createRealtimeCharts.RealtimeSeriesValuesOnAxisFragment\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects 
… (truncated for brevity)

Finding #11FixedWidthAxisFragment\n// (Full source code omitted for brevity)\n"

{
  "text_input": "package com.scichart.examples.fragments.examples2d.modifyAxisBehavior;\n\n// Class: com.scichart.examples.fragments.examples2d.modifyAxisBehavior.FixedWidthAxisFragment\n// (Full source code omitted for brevity)\n",
  "output": "Yes",
  "project": "examples",
  "explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.scichart.examples.fragments.examples2d.modifyAxisBehavior.FixedWidthAxisFragment\nMethod: void initExample(com.scichart.charting.visuals.SciChartSurface)\nStatement: $r19 \u003d new com.scichart.examples.fragments.examples2d.modifyAxisBehavior.FixedWidthAxisFragment$$ExternalSyntheticLambda0\nCaptured UI objects:\n  - $r1 : com.scichart.charting.visuals.SciChartSurface\n  - r0 : com.scichart.examples.fragments.examples2d.modifyAxisBehavior.FixedWidthAxisFragment\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects to worker threads\n"
}
{
  "text_input": "package com.sci
… (truncated for brevity)

Finding #12PerformanceDemoFragment

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.fragments.examples2d.createRealtimeCharts.PerformanceDemoFragment
Method: void initExample(com.scichart.charting.visuals.SciChartSurface)
Statement: $r2 = new com.scichart.examples.fragments.examples2d.createRealtimeCharts.PerformanceDemoFragment$$ExternalSyntheticLambda2
Captured UI objects:
  - r0 : com.scichart.examples.fragments.examples2d.createRealtimeCharts.PerformanceDemoFragment
  - $r1 : com.scichart.charting.visuals.SciChartSurface
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

Finding #13PinchZoomOnRealtimeChartFragment\n// (Full source code omitted for brevity)\n"

{
  "text_input": "package com.scichart.examples.fragments.examples2d.createRealtimeCharts;\n\n// Class: com.scichart.examples.fragments.examples2d.createRealtimeCharts.PinchZoomOnRealtimeChartFragment\n// (Full source code omitted for brevity)\n",
  "output": "Yes",
  "project": "examples",
  "explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.scichart.examples.fragments.examples2d.createRealtimeCharts.PinchZoomOnRealtimeChartFragment\nMethod: void initExample(com.scichart.charting.visuals.SciChartSurface)\nStatement: $r16 \u003d new com.scichart.examples.fragments.examples2d.createRealtimeCharts.PinchZoomOnRealtimeChartFragment$$ExternalSyntheticLambda0\nCaptured UI objects:\n  - $r1 : com.scichart.charting.visuals.SciChartSurface\n  - r0 : com.scichart.examples.fragments.examples2d.createRealtimeCharts.PinchZoomOnRealtimeChartFragment\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects to work
… (truncated for brevity)

Finding #14RealTimeMinMaxAnnotationFragment

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.fragments.examples2d.createRealtimeCharts.RealTimeMinMaxAnnotationFragment
Method: void initExample(com.scichart.charting.visuals.SciChartSurface)
Statement: $r6 = new com.scichart.examples.fragments.examples2d.createRealtimeCharts.RealTimeMinMaxAnnotationFragment$$ExternalSyntheticLambda1
Captured UI objects:
  - r0 : com.scichart.examples.fragments.examples2d.createRealtimeCharts.RealTimeMinMaxAnnotationFragment
  - $r1 : com.scichart.charting.visuals.SciChartSurface
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

Finding #15FifoChartsFragment\n// (Full source code omitted for brevity)\n"

{
  "text_input": "package com.scichart.examples.fragments.examples2d.createRealtimeCharts;\n\n// Class: com.scichart.examples.fragments.examples2d.createRealtimeCharts.FifoChartsFragment\n// (Full source code omitted for brevity)\n",
  "output": "Yes",
  "project": "examples",
  "explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.scichart.examples.fragments.examples2d.createRealtimeCharts.FifoChartsFragment\nMethod: void initExample(com.scichart.charting.visuals.SciChartSurface)\nStatement: $r2 \u003d new com.scichart.examples.fragments.examples2d.createRealtimeCharts.FifoChartsFragment$$ExternalSyntheticLambda1\nCaptured UI objects:\n  - $r1 : com.scichart.charting.visuals.SciChartSurface\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects to worker threads\n"
}
{
  "text_input": "package com.scichart.examples.fragments.examples2d.createRealtimeCharts;\n\n// Class: com.scichart.examples.fragmen
… (truncated for brevity)

Finding #16StartupActivity

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.StartupActivity
Method: void onCreate(android.os.Bundle)
Statement: $r12 = new com.scichart.examples.StartupActivity$ParseExampleTasks
Captured UI objects:
  - r0 : com.scichart.examples.StartupActivity
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

Finding #17HeatmapChartFragment

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.fragments.examples2d.basicChartTypes.HeatmapChartFragment
Method: void initExample(com.scichart.examples.databinding.ExampleHeatmapChartFragmentBinding)
Statement: $r3 = new com.scichart.examples.fragments.examples2d.basicChartTypes.HeatmapChartFragment$$ExternalSyntheticLambda1
Captured UI objects:
  - r21 : com.scichart.charting.visuals.SciChartSurface
  - r0 : com.scichart.examples.fragments.examples2d.basicChartTypes.HeatmapChartFragment
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

Finding #18SurfaceMeshWithMetadataProvider3DChartFragment\n// (Full source code omitted for brevity)\n"

{
  "text_input": "package com.scichart.examples.fragments.examples3d.createSurfaceMeshChart;\n\n// Class: com.scichart.examples.fragments.examples3d.createSurfaceMeshChart.SurfaceMeshWithMetadataProvider3DChartFragment\n// (Full source code omitted for brevity)\n",
  "output": "Yes",
  "project": "examples",
  "explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.scichart.examples.fragments.examples3d.createSurfaceMeshChart.SurfaceMeshWithMetadataProvider3DChartFragment\nMethod: void initExample(com.scichart.charting3d.visuals.SciChartSurface3D)\nStatement: $r21 \u003d new com.scichart.examples.fragments.examples3d.createSurfaceMeshChart.SurfaceMeshWithMetadataProvider3DChartFragment$$ExternalSyntheticLambda1\nCaptured UI objects:\n  - $r1 : com.scichart.charting3d.visuals.SciChartSurface3D\n  - r0 : com.scichart.examples.fragments.examples3d.createSurfaceMeshChart.SurfaceMeshWithMetadataProvider3DChartFragment\nRisk: UI object will be kept in memory until th
… (truncated for brevity)

Finding #19OscilloscopeFragment

Scenario 1: Worker thread holds UI object reference
Class: com.scichart.examples.fragments.featuredApps.scientificCharts.OscilloscopeFragment
Method: void initExample(com.scichart.charting.visuals.SciChartSurface)
Statement: $r6 = new com.scichart.examples.fragments.featuredApps.scientificCharts.OscilloscopeFragment$$ExternalSyntheticLambda0
Captured UI objects:
  - r0 : com.scichart.examples.fragments.featuredApps.scientificCharts.OscilloscopeFragment
  - $r1 : com.scichart.charting.visuals.SciChartSurface
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads

🟢 ViewBindingOpportunity

Manual findViewById() calls — ViewBinding migration opportunity

Finding #20ShowcaseActivity

View Binding Migration Opportunity
Class: com.scichart.examples.ShowcaseActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onPostResume
  • findViewById in onPostResume
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 #21ExampleActivity

View Binding Migration Opportunity
Class: com.scichart.examples.ExampleActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in getTargetChart
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 #22ExampleActivityBase

View Binding Migration Opportunity
Class: com.scichart.examples.ExampleActivityBase
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in openDescriptionInfoDialog
  • findViewById in setUpDrawerAndToolbar
  • findViewById in setUpDrawerAndToolbar
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 #23Example3DActivity

View Binding Migration Opportunity
Class: com.scichart.examples.Example3DActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
  • findViewById in onPostResume
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 #24ExceptionActivity

View Binding Migration Opportunity
Class: com.scichart.examples.ExceptionActivity
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

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 SciChart.Android.Examples.

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