Hi Folks,
Does anyone have a tried and true mechanism for monitoring for and
either fixing or preventing a StackOverflow exception? I'm
monitoring a processing a very long shell process (could be days),
and after unexpected periods the shell's DataAvailable event throws a
StackOverflow exception. The exception is thrown at the entry to the
DataAvailable event.
Here's my code from the DataAvailable event:
------------------------------
Dim x, y, err, mTop As integer
// mBuffer and runData are parent global variables
// thMon2 is the monitor thread for taking the runData and
updating the interface
x = 0
Self.mBuffer = Self.mBuffer + ConvertEncoding(Me.ReadAll,
Encodings.UTF8)
If InStr(self.mBuffer, "[I") <> 0 _
Or InStr(self.mBuffer, "[A") <> 0 _
Or InStr(self.mBuffer, "[Q") <> 0 Then
Debug.Print self.mBuffer
ProcAll = True // We caught a Volume completion message, so
process ALL data
End If
Self.runData = Split(Self.mBuffer, EndOfLine)
If Not ProcAll Then
// take the last line and return it to the mBuffer so the next
ReadAll() completes
// a potentially incomplete line (thanks, Joe!).
Self.mBuffer = Self.runData.Pop
End If
// Process the result
If Self.thMon2.State <> Thread.Running Then
Self.thMon2.Run
ElseIf ProcAll Then
// wait for the current thread loop to complete
While Self.thMon2.State = Thread.Running
App.DoEvents(25)
Wend
Self.thMon2.Run
End If
ProcAll = False
---------------------------------
Am I missing something? This occurs in the built Mach-O application
and in the debugger run.
Tim
--
Tim Jones [EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>