I have a mixed windows forms + wpf application where a mdi winform on the main assembly opens a wpf window (where WpfMap is located).
I used to catch all application level unhandled exceptions with this couple of handlers:
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Helvetica}
span.s1 {color: #1e39f6}
</style>
AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf UnhandledExceptionFilter
AddHandler System.Windows.Forms.Application.ThreadException, AddressOf ApplicationThreadExceptionFilter
And they was catching everything unhandled, until now.
Today, the application is closing abruptly without firing this events and without showing any kind of error message or exception on a installation. I have been tracing the point where whatever the problem is causing this happens up to the following instruction:
WpfMap1.CurrentExtent = New RectangleShape(-120, 89, 132, -68)
Obviously a Try Catch block does not help either. It just executes this instruction as a "End"
The strange part is that there is other WpfMap property sets before that does not fail such as:
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Helvetica; color: #008f27}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Helvetica; color: #1e39f6; min-height: 12.0px}
span.s1 {color: #000000}
span.s2 {color: #1e39f6}
</style>
WpfMap1.MapUnit = GeographyUnit.DecimalDegree
WpfMap1.MapTools.PanZoomBar.IsEnabled = False
WpfMap1.MapTools.Logo.IsEnabled = False
WpfMap1.MaximumScale = 73000000
I know this is a bit of "offtopic", but.. do you know how can I debug this? What can be causing to end the app within the CurrentExtent set instruction?
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Helvetica}
span.s1 {color: #1e39f6}
</style>