Skip to content

Fix crash on draw area task#3646

Merged
shobhitagarwal1612 merged 2 commits intomasterfrom
andreia/fix-crash-draw-area
Mar 31, 2026
Merged

Fix crash on draw area task#3646
shobhitagarwal1612 merged 2 commits intomasterfrom
andreia/fix-crash-draw-area

Conversation

@andreia-ferreira
Copy link
Copy Markdown
Collaborator

The DrawAreaTaskFragment declared a lateinit var drawAreaTaskMapFragment that is now never assigned. This is because the framgent is now created internally by TaskMapFragmentContainer. When the camera movements were collected from the VM, it tried to call moveToPosition() on the uninitialized reference and this caused a crash.

This is easily fixed by moving the collection of cameraMoveEvents to DrawAreaTaskMapFragment as this is the place where most of the other flows are being collected anyway

@shobhitagarwal1612 PTAL?

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.85%. Comparing base (3ba1d40) to head (f9f4a9b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3646   +/-   ##
=========================================
  Coverage     66.85%   66.85%           
+ Complexity     1656     1655    -1     
=========================================
  Files           357      357           
  Lines          8803     8802    -1     
  Branches       1121     1120    -1     
=========================================
  Hits           5885     5885           
+ Misses         2279     2278    -1     
  Partials        639      639           
Files with missing lines Coverage Δ
...tacollection/tasks/polygon/DrawAreaTaskFragment.kt 67.85% <ø> (+0.11%) ⬆️
...ollection/tasks/polygon/DrawAreaTaskMapFragment.kt 40.00% <100.00%> (+5.21%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shobhitagarwal1612 shobhitagarwal1612 merged commit 6eb304a into master Mar 31, 2026
9 checks passed
@shobhitagarwal1612 shobhitagarwal1612 deleted the andreia/fix-crash-draw-area branch March 31, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants