Help with Thread.Join() (New Problem)

Discussion in 'ASP .Net' started by Elizabeth Harmon, Dec 2, 2003.

  1. 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
     
    Elizabeth Harmon, Dec 2, 2003
    #1
    1. Advertising

  2. NEVER MIND Re: Help with Thread.Join() (New Problem)

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

    "Elizabeth Harmon" <> wrote in message
    news:u4E4$...
    > 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
    >
    >
     
    Elizabeth Harmon, Dec 2, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Elizabeth Harmon

    Using Thread.Join()

    Elizabeth Harmon, Dec 1, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,136
    Elizabeth Harmon
    Dec 2, 2003
  2. googlepost
    Replies:
    2
    Views:
    1,624
    Roedy Green
    Jul 22, 2003
  3. Alan Silver
    Replies:
    0
    Views:
    913
    Alan Silver
    Jun 5, 2006
  4. googleboy
    Replies:
    1
    Views:
    953
    Benji York
    Oct 1, 2005
  5. Replies:
    3
    Views:
    178
Loading...

Share This Page