Thread is failing with no error and I have no idea why

Posted on 2007-11-19
Medium Priority
Last Modified: 2010-04-23
I am beating my head into the wall i this and cannot find an answer. i am hoping someone can tell me where i am being stupid.

I have a process that is designed to process incoming FTP files. I want to dispatch this to different threads so big files don't hamper or delay the little ones.

I have tested all my logic on the main thread and it works perfectly.
I have added a function call that creates a seperate thread and calls the function for processing.  pretty easy right.
The thread aborts or disappears when it makes a call to a web service that i have. I have no idea why it just goes poof (that is my technical term for it).  Let us not forget, the exact same code works perfectly in the main thread.  
Where do i look, what am i forgetting.

oh yea if i put a simple while loop in the thread right before the web service call the thread runs and runs just fine. of course it is no good to me because it is just printing out a debug statement.

any and all help is greatly appreciated.

Question by:Autoeforms
  • 3
  • 2
LVL 15

Expert Comment

ID: 20314821
are you calling the web service asynchronously? if you are then the thread could finish executing and terminate before the web service method's finished event is raised.

Author Comment

ID: 20314838
no sychronous.

i have debug statements after each line of code.
i make the call to the web service and it never returns.

LVL 15

Accepted Solution

Solar_Flare earned 1000 total points
ID: 20314903
do you have the webservice running locally in debug mode? if so have you set a break point in the web service method and stepped through to ensure the service returns correctly?

also, are you handling the applications unhandled thread exception event? is it raised?

Author Comment

ID: 20314941
not exactly.
i have run the entire process on the main thread correctly.
when calling on its own thread is when it fails

Author Closing Comment

ID: 31410006
i have reworked the entire code path. I will give some points for the effort

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question