InertiaM
Well-known member
I deployed an application on a PC recently, and it 'hangs' after a period of time. Summary of the application is as follows :-
Application has a single form. The form has a ToolStrip and nothing else. All the drawing on the form is done using GDI in the Paint event.
It is also running Serial communications, which upon receipt of data from a serial barcode reader, adds the barcode to be processed to a queue. A separate thread processes the queue.
There are also threads for incoming TCP data (from another barcode reader), a thread for processing, and a thread for TCP sending.
The problem is that after say 10 barcodes, the application just hangs. White screen, hourglass, nothing else. The application is littered with loads of Try..Catch blocks which dont seem to be finding the issue. UnhandledException is also included, and this fires for certain problems, but not for the hanging issue.
It's not a problem with one specific barcode, as it will quite happily run all the barcodes I send it at different times. It seems to relate more to the 'quantity' of barcodes.
The only way of closing the application is using Task Manager, which is not closing the Serial or TCP threads properly, and therefore the application cannot be run again until the PC is logged off and back on again.
Really frustrating me any suggestions gratefully received.
Application has a single form. The form has a ToolStrip and nothing else. All the drawing on the form is done using GDI in the Paint event.
It is also running Serial communications, which upon receipt of data from a serial barcode reader, adds the barcode to be processed to a queue. A separate thread processes the queue.
There are also threads for incoming TCP data (from another barcode reader), a thread for processing, and a thread for TCP sending.
The problem is that after say 10 barcodes, the application just hangs. White screen, hourglass, nothing else. The application is littered with loads of Try..Catch blocks which dont seem to be finding the issue. UnhandledException is also included, and this fires for certain problems, but not for the hanging issue.
It's not a problem with one specific barcode, as it will quite happily run all the barcodes I send it at different times. It seems to relate more to the 'quantity' of barcodes.
The only way of closing the application is using Task Manager, which is not closing the Serial or TCP threads properly, and therefore the application cannot be run again until the PC is logged off and back on again.
Really frustrating me any suggestions gratefully received.