Login  Register

Re: KeyListener problem

Posted by Kenneth Sloan-2 on Mar 18, 2020; 6:16pm
URL: http://imagej.273.s1.nabble.com/KeyListener-problem-tp5023044p5023062.html

I have solved the potential race condition by moving the:

        win = ipl.getWindow()

until AFTER several other interactions take place, all of which cannot proceed until the window is visible.  But, this has zero effect on my machine.

Another possibility was that the desired window had lost focus - but in that case (i.e., when I do it intentionally) pressing most number keys in 1-6 will invoke  some standard ImageJ shortcut,  and my "client" reports that "nothing happens" on those keypresses.

He has a new version, and if that fails I will go to watch it fail, in person.  I still can't reproduce it on my machine.

The good news is that I'm cleaning up a lot of cruft by eliminating all the possible problems.  None of them have helped, but the code is cleaner...

A nagging thought is that the plugin often works 1-4 times in a row on his machine and then fails.  Once it fails, it fails forever.  Even restarting  FIJI seems to have no effect - but re-instaling the plugin does (for at least the first invocation following installation).

Very strange!

If there are any volunteers, I can put  source code on Box and send a link (or just e-mail the source code.  It's 1 .java file (467 lines) and (in my opinion) very simple.  I'll accept all "pointing and giggling" at my bad coding style.  All it does is implement a standard stereology grid, displaying cross-hairs (using overlays) and asking the user to classify each point by typing a number from 1-6.  It really shouldn't be this difficult!

The hardest problem with intermittent bugs is replicating them!

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html