DockPane Crash..AggregateException

590
2
10-19-2018 12:31 PM
DanH1
by
New Contributor II

Just added DockPane to my custom ArcGIS Pro Add-In.  My Add-In currently has 2 MapTool Buttons and a regular Button tool already defined and I'm now adding a Dockpane tool.  I'm getting an AggregateException everytime I show the Dockpane but I have not added any code beyond the boiler plate code added by the SDK template (i.e. Add/New Item/Dock Panel).  It does NOT crash when the Dockpane is first shown but if I wait about 30 seconds or less this exception is thrown:

System.AggregateException was unhandled
Message: An unhandled exception of type 'System.AggregateException' occurred in mscorlib.dll
Additional information: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.

Attached are the threads that are running when this crash happens...

0 Kudos
2 Replies
DanH1
by
New Contributor II

Ugggh!!  Found the problem!  We changed the name of the Module1 class but we never updated the Config.daml.  The first line in the Config.daml after the <modules> opening tag is an <insertModule>  tag with a className attributed that needs to match the class name.  I'm curious as to why it only crashed when the DockPane was added though.  I'm thinking that MapTool's and Button Tool's don't interact with the Module within ArcGIS API itself but something in DockPane's base class or otherwise does and this is is why the problem only showed up when we added the Dockpane.  Obviously this was a problem we created but I'm curious as to the underlying why and why we wouldn't get a more meaningful message.  Seems like an exception handler is needed within the API to handle this condition and pass back a meaningful message similar to when synchronous calls are made outside of a QueuedTask. 

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Dan,

I have informed the development team about this issue you have reported. Thanks for posting the problem you found so we can test this out.

Thanks

Uma

0 Kudos