Home All Groups Group Topic Archive Search About

multithreading app not working correctly when installed

Author
17 Nov 2004 1:44 AM
Jennifer
I have a multithreaded app that works fine when running within VB.NET, but
when I try and install it, there is a point in the code where it just stops
working. it doesn't error out, but stops running the code. The RunEntry()
method calls methods from an instance of RunService(). It does it about 4
times down the line and then when RunEntry() tries to call again it just
stops running the code. The instance of RunService is still in scope but it
doesn't even get to the method it's supposed to call(i have verified this
with msgbox). I thought it might be a timing issue but I dont have any shared
variables that i'm using between the classes. could it be anything OTHER than
deadlocking or a race condition. This is the background thread and the
primary thread is just the GUI and is doing absolutely nothing at the time.

i am so incredibly stuck and this project is already taking me longer than
it should have....HELP!!

Author
17 Nov 2004 7:43 PM
Don McNamara
Is your background thread using/calling/updating windows forms controls?
Windows Forms controls behave very strangely when used from threads other
than the main UI thread. If this is the case, you have to invoke to get back
to the UI thread.  Let me know, and I can post an example if you need it.

Show quote
"Jennifer" <Jenni***@discussions.microsoft.com> wrote in message
news:79430404-332F-4488-B4BB-4BF720539D32@microsoft.com...
> I have a multithreaded app that works fine when running within VB.NET, but
> when I try and install it, there is a point in the code where it just
stops
> working. it doesn't error out, but stops running the code. The RunEntry()
> method calls methods from an instance of RunService(). It does it about 4
> times down the line and then when RunEntry() tries to call again it just
> stops running the code. The instance of RunService is still in scope but
it
> doesn't even get to the method it's supposed to call(i have verified this
> with msgbox). I thought it might be a timing issue but I dont have any
shared
> variables that i'm using between the classes. could it be anything OTHER
than
> deadlocking or a race condition. This is the background thread and the
> primary thread is just the GUI and is doing absolutely nothing at the
time.
>
> i am so incredibly stuck and this project is already taking me longer than
> it should have....HELP!!

AddThis Social Bookmark Button