Help with Thread.Join() (New Problem)

  • Thread starter Elizabeth Harmon
  • Start date
E

Elizabeth Harmon

hi all,

Just when you think you understand and are getting all this, .Net throws you
a Curve

I have the following Code

Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)

Dim connThread As Thread = New Thread(New ThreadStart(AddressOf
Transfer_Download_Data))
Dim connUpldThread As Thread = New Thread(New ThreadStart(AddressOf
Transfer_Upload_Data))




connThread.Start()
intRunningState = connThread.ThreadState
*****connThread.Join()
connUpldThread.Start()
~~~~~connUpldThread.Join()
intRunningState2 = connUpldThread.ThreadState

End Sub


For brevities sake i have shortened the code here and concerned my self with
only the part that seems Broken.(It worked Yesterday, doesnt today, I made
no changes to my computer other than to set the Interactive Users in DCOM
for Microsoft Word app that this Program uses)

When the Sub is called, there are no errors in any area until the Join() is
Called, i then get the following error message:

****************************************************************************
*******************
An unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module.

Additional information: Object reference not set to an instance of an
object.

The thread '<No Name>' (0x128) has exited with code 0 (0x0).



****************************************************************************
******************
Prior to the call, the ConnThread.Start() executes and the Thread State is
Set to Running, then the Join is Issued and it
Errors out, I hit continue and then it proceeds as normal thru the Next
Start and Join with no errors

I am sure i am missing something here, but i cannot for the life of me
figure it out. Has Anyone Had this happen to them?

TIA
Elizabeth "Samantha" Harmon
 
E

Elizabeth Harmon

There was a cookie being reference that was not set, nothing wrong with the
thread code, but thanks anyway!!!
D'OOOOOOOOOOOHHHH!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top