Esri / distance-direction-addin-dotnet

Add-in provides the ability to easily and quickly create geodesy lines, circles, ellipses and range rings.
Apache License 2.0
17 stars 22 forks source link

Holistic Testing: Possible Hang On New Pro Project when other Project Open #677

Closed csmoore closed 5 years ago

csmoore commented 5 years ago

During the end of holistic on 8/9, tester was able to a hang app while attempting to open up a project template after already working in an existing project.

To Reproduce: The hang is hard to reproduce, but these steps were performed:

  1. open a project in Pro
  2. navigate to the project page and click "New" project.
  3. click on one of the default project templates.
  4. App hangs

Versions: Pro 2.5.21273 Pro Intel 1333

Issue originally recorded as: /ArcGISPro/intel/issues/1436 by @Dbarnes1 :

Additional context Team has not been able to consistently reproduce this hang as of yet. But Russel from Core did an analysis of the hang at ArcGISPro/intel/files/14228/hang-analysis.txt and identified these issues in the DistanceAndDirection Pro Addin Code. Specifically:

Code on the GUI thread is calling get result on a task (illegal) which is queued behind the current task running on the main CIM thread. This results in a deadlock. Task.Wait and Task.Result should never be called on the GUI thread (use await).

Call stack: DistanceAndDirectionLibrary.Helpers.NotificationObject.RaisePropertyChanged(System.String) 000000f6787add10 00007ffe48d7cc74 ProAppDistanceAndDirectionModule.ViewModels.ProTabBaseViewModel.b__1_3

Happening here in DistanceAndDirection Pro Addin called from here

csmoore commented 5 years ago

PR #678 created to refactor code based on call stack and feedback on issue (I wasn't able to repro issue though)

dfoll commented 5 years ago

PR merged