Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TabSheets and Threads 2

Status
Not open for further replies.

teubenragee

Programmer
May 22, 2001
27
0
0
DE
I've got a PageControl in my main form with 5 TabSheets!
One of these is there to acquit errors...
Errors are controled by a thread that waits an event.
When The event is set The active sheet is errors and messages appear in a Memo, buttons are enabled by the event

When an error occurs, all is right but My appli "locks": that is to say I can't do anything (The processor does nothing during this "lock" and memory is not all taken, so it is not an infinite while command or something like that)

So why could it "lock"?
 
To analyze the problem is very difficult from far, but it sounds like a dead lock. (perhaps caused by an error exception)



hnd
hasso55@yahoo.com

 
How are you trapping the errors? Is it possible that something is expecting a user's answer to an error message that isn't being display (e.g., a MessageBox)? James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
I just change an int and enable two buttons for the user answer... (+ changing the active tabsheet) that's all!
No exception, no loop, no answer expected... (I've just checked all this)
 
Lets dig into this a little. Are these hardware errors, software errors, OS errors, or errors caused by the users? I'm trying to figure out who is generating the error, hardware, OS, software (compiler, etc.), or something else.

Another question is are you compiling this program with debug option on?
James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
The error is generated by the user: for example a client who has just disconnected...
The question I ask to the user is : "Is the link out of order? or will the client reconnect?"

Two choices: Wait for the client reconnection or kill the client in the server memory

Just after I ask the question... The programm locks

The only running function there is a wait function (for the next error)

 
It looks like your thread is not accepting any input. Have you synchronized it with the other threads?
James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Yes, I have to synchronize it with the main thread to get errors, so there is an event that I wait... When I get it.. I change my int value, I dislay my message and I wait for the next time the event is pulsed
 
Ok I've found what was wrong: I had to add a sleep command between The part I display messages, and the part I Return to the waiting function.
Thank You
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top