rward01 Posted July 17, 2003 Posted July 17, 2003 Has anyone encountered an unhandled exception being thrown while stepping through the debugger? When this happends I am inside a newly created thread and the function I am in is the one pointed at by the addressof(myThread = New System.Threading.Thread(AddressOf postdata). In this case I am in postdata. The message I am receiving while stepping through the debugger is: "An unhandled exception of type 'System.Threading.ThreadStopException' occured in CreditBureauHTTPS.exe Additional Information: Thread was being stopped." I have executed the same code with no problems on two separate machines that are identical to the one I am using. One of the machines has the same version of the IDE and Framework. I am running Visual Studio 2003 with Framework 1.1. At one point in time, I was able to use the debugger to step through. I have since uninstalled and reinstalled the IDE. No luck. Any help is greatly appreciated. Thanks in advance Quote
rward01 Posted July 18, 2003 Author Posted July 18, 2003 Oddly enough, the error message has disappeared. I do not know why. What a pain. This went on for a couple of days. Quote
rward01 Posted July 19, 2003 Author Posted July 19, 2003 It's back. Help! I was stepping through the code after working for several hours and it just started throwing the exception again. Anyone know how to trap why the thread is being stopped? I believe I have try catches where I need them, so I do not see how I could programmatically catch it. Quote
*Experts* Volte Posted July 19, 2003 *Experts* Posted July 19, 2003 Is it crashing at the same point every time? Do you have some sort of anti-virus program or something that could be attempting to stop your program's thread (unlikely...). Quote
Surge_Max Posted October 9, 2003 Posted October 9, 2003 Just to let you know I just got this problem now too; It just came out of the blue. (I've never had this problem before) I'm using VS.NET 2003 (Architect) with .NET Framework 1.1 as well... I'll keep you posted if I find a solution... Max Quote
EK1 Posted October 11, 2003 Posted October 11, 2003 Anyone figure out what this issue is? I have the same problem. Quote
AlexCode Posted October 11, 2003 Posted October 11, 2003 What about VolteFace asked? Do u have any AV or FireWall active? Did you made you thread safe? Quote Software bugs are impossible to detect by anybody except the end user.
*Experts* Volte Posted October 11, 2003 *Experts* Posted October 11, 2003 This is weird... I can't find any info on ThreadStopException in my MSDN, and Google turns up only 15 pages about it, one of them being this thread. Are you using any third party DLLs or anything? Quote
AlexCode Posted October 12, 2003 Posted October 12, 2003 Maybe de project or some code would help... Quote Software bugs are impossible to detect by anybody except the end user.
EK1 Posted October 12, 2003 Posted October 12, 2003 In form load testthread = New Thread(AddressOf test) testthread.Name = "test" testthread.Start() Private Sub test() Dim a As String = "wrew" Me.Text = "Test" 'crashes here TextBox1.Text = "test" Debug.WriteLine("test") End Sub This code works fine on my other PC and timers work fine. Quote
Administrators PlausiblyDamp Posted October 12, 2003 Administrators Posted October 12, 2003 Is the sub attempting to update the UI? If so that is probably the problem. UI elements should only be modified from the forms main thread. Search these forums for some examples on using Form.Invoke - not near VS at the moment so I can't dig up the help. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
EK1 Posted October 12, 2003 Posted October 12, 2003 Yes that's the problem, I just figured it out. It especially comes up if you have a hyperthreaded cpu. Quote
AlexCode Posted October 14, 2003 Posted October 14, 2003 I've asked you that before ... When using threads allways make them ThreadSafe, use delegates for example... specially if the thread modifies th UI... :D Quote Software bugs are impossible to detect by anybody except the end user.
willg Posted February 23, 2004 Posted February 23, 2004 (edited) smae prob not modifying ui or using threads I don't yet know how to use threads in .net so maybe I'm inadvetently doing something with them though I have no code that deals with threads at all. The class(3) containing the following code is called by a class(2) which is called by the UI form(1), with no attempt to modify or update the UI(1) directly. class3 ................ .. cls4 = New class4(temp, sOutputFile, iPageNo, iSideLength, blChosenSide) 'Thread Was Being Stopped' exception occurs here cls4.Make() ................ end class Class(2) however does raise an event that allows the UI(1) to refresh itself. class2 ................ .. Dim cls3 As new class3(sInputFile, sOutputFile) cls3.Make() cls3.dispose() cls3 = Nothing RaiseEvent done(Me, sOutputFile)' in this event's handler, the UI(1) calls its refresh method ................ end class (The identifier names have been simplified and much code ommitted for readbility) The same exception is thrown ad I don't know why. Please, help me. ps I just reallised that the acrobat interop which I'm using may be using threads. Any help with this would be great as I'm not controlling the threading in the COM if it is using it. Also the word printing system is used prior to this code which may also use threading, D'oh! Cheers Will Edited February 24, 2004 by willg Quote
gyurisc Posted July 30, 2004 Posted July 30, 2004 It might be too late but can help others. One way of overcoming this is to hide your local and auto windows in the IDE. This way I managed to step through in my code in the IDE. Quote
DigitalMatrix Posted November 22, 2004 Posted November 22, 2004 Hi everyone, I had this same error which had me going for about a day. After reading gyurisc's comment about the debugging windows, I cleared all the watches I had going in my window and all of a sudden the error disappeared and my step through performance came back. Just in case anyone else has this problem, try doing that. Thanks, Simon Quote
bonstio Posted October 25, 2005 Posted October 25, 2005 OMG this solved my problem too. What a daft problem it is though! Thanks all Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.