Hi Kenneth, I converted your test code to JavaScript, fixed problems with missing variable declarations and ran the script successfully on macOS, Linux and Windows, on my MacBook Air.
-wayne IJ.log("building dialog"); gd = new NonBlockingGenericDialog("User Paraameters"); IJ.log("created gd"); caseID = "noCaseID"; gd.addStringField("Case ID:",caseID); IJ.log("added Case ID: "+caseID); markerRoiRadius = 10; gd.addNumericField("Marker Radius(pixels):", markerRoiRadius,0); IJ.log("added Marker Radius"); dialogX = 0; dialogY = 0; gd.setLocation(dialogX,dialogY); IJ.log("setLocation "+dialogX+" "+dialogY); gd.showDialog(); IJ.log("gd.wasCanceled() =" + gd.wasCanceled()); IJ.log("getting caseID"); caseID = gd.getNextString(); IJ.log("caseID = "+caseID); markerRoiRadius = gd.getNextNumber(); IJ.log("markerRoiRadius = "+markerRoiRadius); > On Nov 14, 2024, at 3:43 PM, Kenneth Sloan <kennethrsl...@gmail.com> wrote: > > I have a plugin which has been working for 6 months. > > Today, I got a report that it failed, on both Windows and Mac machines. > > I asked for the input, and tried to replicate the problem. Its works just > fine on my MacBook Pro. > > All machines have been updated to the latest FIJI release. > > I added some logging, so the relevant code looks like this: > > // get user-specified parameters > IJ.log("building dialog"); > NonBlockingGenericDialog gdParms = new > NonBlockingGenericDialog("User Paraameters"); > IJ.log("created gdParms"); > String caseID = "noCaseID"; > gdParms.addStringField("Case ID:",caseID); > IJ.log("added Case ID: "+caseID); > gdParms.addNumericField(“Marker Radius(pixels):”, > markerRoiRadius,0); > IJ.log("added Marker Radius"); > gdParms.setLocation(dialogX,dialogY); > IJ.log("setLocation "+dialogX+" "+dialogY); > gdParms.showDialog(); > IJ.log("gdParms.wasCanceled() =" + gdParms.wasCanceled()); > if(gdParms.wasCanceled()) return; > IJ.log("getting caseID"); > caseID = gdParms.getNextString(); > IJ.log("caseID = "+caseID); > markerRoiRadius = (int)gdParms.getNextNumber(); > IJ.log("markerRoiRadius = "+markerRoiRadius); > > The Log window ends with the line: > > SetLocation 0 0 > So… the statement: > > gdParms.showDialog(); > > Appears to have been executed, but nothing appears on the screen, and the > program stalls. > > There is no relevant output in the Console window. > > We have rebooted, updated FIJI, all to no avail. > > It fails on 3 machines (2 Windows and one Mac) in a research lab in a medical > center, but works perfectly on my MacBook Pro, at home. > > The initial report claims that they were using the plugin on a series of > cases. > It worked on a bunch of cases, and then failed on the next (and has failed at > their location every time since). Ss so…no FIJI update or OS update between > the last success and the first failure. > > I’m baffled. Any ideas? > > Finally, the user reports that when the plugin stalls, all other FIJI > functions work properly. It’s as if “showDialog()” has either terminated the > plugin (without anything in the Log or Console window), or is waiting for an > input (but has not actually displayed the dialog box). I asked them to hit > ESC, which had no effect. > -- > Kenneth Sloan > kennethrsl...@gmail.com > Vision is the art of seeing what is invisible to others. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
smime.p7s
Description: S/MIME cryptographic signature