[Environment]
Symbol MC9000k scanner running Windows Mobile 2003.
C# .Net (.Net CF) with OpenNetCf 1.2 installed.
Latest Symbol SDK driving the scan engine stuff.
[Application]
I've extracted the barcode scanner handling stuff from one of the Symbol SDK
examples, and using their .Net classes, drive the scanning engine in my
application.
Basically the program has a main screen which allows you to perform
differing actions, all of which involved the scanner. Tapping a button
launches a new form, which initialises the scanner and asks the user for a
type of barcode to scan...
There are eight forms in all, each creating their own instance of the scan
engine on load and destroying it on closing. Each has an event handler that
is unique in handling the data that is scanned.
[Problem]
Every now and again, at completely random intervals, the scanner will just
stop working. Pressing the trigger button doesn't scan anything. If you exit
the form you're on and go into another one (reinitialising a new scanner
object instance) nothing happens. I've put debug log trace statements
everywhere that log the details to a file to make sure that only one scanner
object is in existence at anyone time, and that any errors are reported.
When the scanner goes wrong, the log file tells me the application was still
merrily destroying and creating the scanner object with no exceptions, and
all the reader object correctly created.
The work around I have is a restart button that quits the program, and
relaunches itself. The scanner will now work when going to a dialog.
Although it works, but it's not solving the problem.
Does anyone have any ideas, or has anyone come across this sort of thing
before?
Any help in how to debug this, or direction as to what the problem is would
be greatly appreciated!