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 #1 — RealTimeUniformMeshChart3DFragment
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 #2 — RealtimeGeoid3DChartFragment\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 #3 — RealTimeWaterfall3DChartFragment\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 #4 — RealTimePointCloud3DChartFragment\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 #5 — Chart3DSandboxFragment
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 #6 — RenderSurfaceSandboxFragment
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 #7 — ECGMonitorFragment
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 #8 — AnimatingLineChartFragment\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 #9 — AnimatingStackedColumnChartFragment
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 #10 — RealtimeSeriesValuesOnAxisFragment\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 #11 — FixedWidthAxisFragment\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 #12 — PerformanceDemoFragment
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 #13 — PinchZoomOnRealtimeChartFragment\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 #14 — RealTimeMinMaxAnnotationFragment
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 #15 — FifoChartsFragment\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 #16 — StartupActivity
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 #17 — HeatmapChartFragment
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 #18 — SurfaceMeshWithMetadataProvider3DChartFragment\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 #19 — OscilloscopeFragment
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 #20 — ShowcaseActivity
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 #21 — ExampleActivity
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 #22 — ExampleActivityBase
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 #23 — Example3DActivity
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 #24 — ExceptionActivity
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.
LeakScope: Android Lifecycle & Memory Leak Violations
Summary
LeakScope detected 24 potential issue(s) across 2 detector type(s):
ThreadedUIReferenceViewBindingOpportunityDetailed Findings
🔴
ThreadedUIReferenceWorker thread captures Activity/Fragment/View reference
Finding #1 —
RealTimeUniformMeshChart3DFragmentFinding #2 —
RealtimeGeoid3DChartFragment\n// (Full source code omitted for brevity)\n"Finding #3 —
RealTimeWaterfall3DChartFragment\n// (Full source code omitted for brevity)\n"Finding #4 —
RealTimePointCloud3DChartFragment\n// (Full source code omitted for brevity)\n"Finding #5 —
Chart3DSandboxFragmentFinding #6 —
RenderSurfaceSandboxFragmentFinding #7 —
ECGMonitorFragmentFinding #8 —
AnimatingLineChartFragment\n// (Full source code omitted for brevity)\n"Finding #9 —
AnimatingStackedColumnChartFragmentFinding #10 —
RealtimeSeriesValuesOnAxisFragment\n// (Full source code omitted for brevity)\n"Finding #11 —
FixedWidthAxisFragment\n// (Full source code omitted for brevity)\n"Finding #12 —
PerformanceDemoFragmentFinding #13 —
PinchZoomOnRealtimeChartFragment\n// (Full source code omitted for brevity)\n"Finding #14 —
RealTimeMinMaxAnnotationFragmentFinding #15 —
FifoChartsFragment\n// (Full source code omitted for brevity)\n"Finding #16 —
StartupActivityFinding #17 —
HeatmapChartFragmentFinding #18 —
SurfaceMeshWithMetadataProvider3DChartFragment\n// (Full source code omitted for brevity)\n"Finding #19 —
OscilloscopeFragment🟢
ViewBindingOpportunityManual findViewById() calls — ViewBinding migration opportunity
Finding #20 —
ShowcaseActivityFinding #21 —
ExampleActivityFinding #22 —
ExampleActivityBaseFinding #23 —
Example3DActivityFinding #24 —
ExceptionActivityHow to respond to this issue:
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.