﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Question about the Strataframe UnhandledExceptionFound</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 02:03:20 GMT</lastBuildDate><ttl>20</ttl><item><title>Question about the Strataframe UnhandledExceptionFound</title><link>http://forum.strataframe.net/FindPost10242.aspx</link><description>I am trying to figure out what all the UnhandledException Catches, and looking at the help file, it seems to catch, well everything.&amp;nbsp; The only problem I'm having, is I from time to time on certain computer, is a UnhandledException error, with a Thread was being aborted message, giving a &lt;/P&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;P&gt;System.Threading.ThreadAbortException: Thread was being aborted.&lt;/P&gt;&lt;P&gt;&amp;nbsp; at Microfour.Strataframe.Messaging.WaitWindowDialog.OnPaint(PaintEventARgs e)&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&amp;nbsp;&lt;/P&gt;&lt;P&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;I tried adding another handler for any ThreadExceptions, but that doesn't seem to be catching anything at all.&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;FONT color=#008000 size=2&gt;&lt;P&gt;''-- Create the Thread Exception Delegate&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'Dim loThreadHandler As New System.Threading.ThreadExceptionEventHandler(AddressOf Application_ThreadException)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;P&gt;'-- Add the Event Handler &lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;AddHandler&lt;/FONT&gt;&lt;FONT size=2&gt; Application.ThreadException, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;AddressOf&lt;/FONT&gt;&lt;FONT size=2&gt; Application_ThreadException&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;I tried this with and without using a Delegate in the Sub Main procedure, but the ThreadAbortExceptions still generate windows unhandled exceptions.&amp;nbsp; If continue is pressed, the function finishes, the waitwindow goes away and everything seems to run fine.&lt;/P&gt;&lt;P&gt;Any idea on how/why to catch ThreadAbortExceptions, and why these pass by the general UnhandledException ?&lt;/P&gt;&lt;P&gt;Robin Giltner&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;-- sorry, really strugling with delegates, threads, event handlers and exceptions on this one&lt;/FONT&gt;</description><pubDate>Fri, 20 Jul 2007 08:41:53 GMT</pubDate><dc:creator>Robin J Giltner</dc:creator></item><item><title>RE: Question about the Strataframe UnhandledExceptionFound</title><link>http://forum.strataframe.net/FindPost10487.aspx</link><description>We're going to have to revisit the WaitWindow, because there is a Try/Catch within that method that starts at the top of the method and ends at the bottom of the method, and we're still not catching it, so it's being thrown either before the code enters the try or after it passes the catch.&amp;nbsp; So, it will need to be reworked to close the thread some other way than aborting it.</description><pubDate>Fri, 20 Jul 2007 08:41:53 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Question about the Strataframe UnhandledExceptionFound</title><link>http://forum.strataframe.net/FindPost10445.aspx</link><description>Here is a screencap of the exception window, and the details contained.&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Robin Giltner</description><pubDate>Thu, 19 Jul 2007 09:08:52 GMT</pubDate><dc:creator>Robin J Giltner</dc:creator></item><item><title>RE: Question about the Strataframe UnhandledExceptionFound</title><link>http://forum.strataframe.net/FindPost10375.aspx</link><description>The problem is that when a thread is aborted, it tears down any of the wrapping handles that .NET has in place... so, the AppDomain.ThreadException event doesn't fire (which is one of the ones that's handled by our UnhandledException method there in AppMain).&amp;nbsp; I'll bet it coming from the Wait&amp;#119;indow... we've had problems with it in the past.&amp;nbsp; It generally manifests on computers that are newer, just like you said, with either Hyper Threading, or dual-core, or multi-proc.&amp;nbsp; Although I haven't seen it in a while, so I thought we squashed it.&amp;nbsp; Does it give you the stack trace for the problem?&amp;nbsp; Id sure like to see the whole thing.</description><pubDate>Tue, 17 Jul 2007 13:53:32 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Question about the Strataframe UnhandledExceptionFound</title><link>http://forum.strataframe.net/FindPost10354.aspx</link><description>Sorry for the delay in response, I've been trying to write a sample app that exhibits the same behaviour but am unable to.&amp;nbsp; The application I'm attatching uses the same functions, methods, delegates and objects as our main app does, but this one doesn't seem to throw that error.&lt;P&gt;One big problem with diagnosing this Exception was that it only happens on the newest computers in the test lab, and then its very random.&amp;nbsp; Somtimes the exception gets throw, but most times the processes run without a hitch.&amp;nbsp; And since it isn't reproduceable on our development machines it's been very hard to track down.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Robin Giltner</description><pubDate>Tue, 17 Jul 2007 12:24:01 GMT</pubDate><dc:creator>Robin J Giltner</dc:creator></item><item><title>RE: Question about the Strataframe UnhandledExceptionFound</title><link>http://forum.strataframe.net/FindPost10253.aspx</link><description>Well, first of all, if you can give us the code you are executing to create the AbortThreadException we will try to reproduce it here and make sure there is not a bug in the WaitWindow class.&lt;/P&gt;&lt;P&gt;As for threads, this is a more length discussion. :)&amp;nbsp; UnhandledExceptions are exactly that, they catch everything that is not implicity handled.....except, for those thrown on another thread.&amp;nbsp; When an exception is thrown on another thread you may never see the error or you may see another unhandled exception error displayed that is not the actual exception that threw the wrench in the gears.&amp;nbsp; If you can catch the exception on the thread it was thrown and then pass it up, you can then see it on the main thread.&amp;nbsp; But if this is happening within the WaitWindow control I would like to try to reproduce it first if we can so that we can plug the whole within the WaitWindow dialog.</description><pubDate>Fri, 13 Jul 2007 09:26:57 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>