Tuesday, July 27, 2010

Problem Solving

I solved a strange problem today. If you asked me how I solved it, the honest answer is, "I guessed."

I setup a replacement industrial PC for an automation system recently. After the PC was installed into system, the user found an odd behaviour on one screen. When one of the arrows on a scrollbar was pressed using the mouse, the list box would start to scroll continuously, as if in an endless loop. I hadn't tested that particular action so I could not say for sure that it worked before the PC was shipped.

Of course, the fact that they were using the mouse when they were supposed to be using a touchscreen, was very confusing. Apparently, all the touchscreens (there's more than one system) broke a long time ago and they bothered to replace them. Users. *rolls eyes*

At this point I got a break. The user wanted a backup replacement PC. After setting it up, I was able to duplicate the the problem. Yay, duplicating a problem is always good. But what the frak was going on, I had not the foggiest clue.

At first I suspected there was some bug in the GUI software that appeared because of the newer versions of Tk on the new PC. After another few hours of messing about, I had to conclude that couldn't possibly be the problem. Tk changes so little between versions, it's almost kind of sad.

I started poking around again, looking for anything that might give me direction. The 3M touchscreen installer updates the X configuration file. I noticed that the driver used an option SendCoreEvents. Hmm, what's that do? Reading the man page (yes, I read documentation. ^^) lead me to two other options CoreKeyboard and CorePointer, which, if ommitted, would default to the first keyboard and pointer. Except there were now two pointers (mouse and touchscreen) in the system.

I added the CoreKeyboard and CorePointer options to the keyboard and pointer configuration respectively, just to see what would happen. Lo and behold! The problem was fixed! My customer was very happy but found my answer to the question of how I solved it, somewhat perplexing. I'm sure people who solve strange problems regularly, would find guessing perfectly normal.

No comments:

Post a Comment