NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 1166 - Oval Profile plugin runs really slow - possible Java issue?
Oval Profile plugin runs really slow - possible Java issue?
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2015-09-29 10:53 CDT by jmesquib
Modified: 2016-01-07 15:41 CST
2 users (show)

See Also:

Description jmesquib 2015-09-29 10:53:03 CDT
Hey, 
Updated FIJI, java and restarted. Issue been around for awhile now running Oval profile plugin. Installed as, best as possible, close to directions, but directions are outdated/incomptabible with current FIJI verisions. 

Issue: Run oval profile, console opens up with message "Compiling 1 file in C:\Users\jmesquib\AppData\Local\Temp\java1874457344706705879". 
Subsequent runs of oval profile in fiji slows down to take minutes. Solve slow down by restarting FIJI. 

Any thoughts? 
Best, Joe

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 7
  os.version => 6.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: CHECK_TURNED_OFF

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\Fiji.app/java/win64/jdk1.6.0_24//jre
  imagej.dir => C:\Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20150915084157)
Fiji: http://update.fiji.sc/ (last check:20150916133657)
Comment 1 Curtis Rueden 2015-09-29 11:01:30 CDT
After compiling Oval_Profile.java to Oval_Profile.class, place the Oval_Profile.class into your plugins directory. Restart ImageJ, and it should then be available from the Plugins menu.

After doing that, do you still see slowdown when running the plugin multiple times? If so, you can diagnose what is going on as described here:

* http://imagej.net/Troubleshooting#If_ImageJ_freezes_or_hangs

If you get a stack trace during the slowdown, you can post it here and it might shed light into what is going wrong.
Comment 2 jmesquib 2015-09-29 11:34:38 CDT
Attempted recommendations. Unsure if I compiled correctly. Couldn't find how to do that in FIJI by command as compile and run is not supported. When I run the "oval profile" I see from console that it compiled it so I tracked down that .class file and transferred as recommended. 

When I run "oval profile" the console still pops up with compiling info as the first time. Recommended suggestions did not appear to change anything. 

Have added stack trace: 
"AWT-EventQueue-0" prio=6 id=15 group=main
   java.lang.Thread.State: RUNNABLE
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at java.awt.EventQueue.getNextEvent(EventQueue.java:485)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:236)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

"AWT-Shutdown" prio=5 id=12 group=main
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:265)
	at java.lang.Thread.run(Thread.java:662)

"AWT-Windows" daemon prio=6 id=13 group=main
   java.lang.Thread.State: RUNNABLE
	at sun.awt.windows.WToolkit.eventLoop(Native Method)
	at sun.awt.windows.WToolkit.run(WToolkit.java:293)
	at java.lang.Thread.run(Thread.java:662)

"Attach Listener" daemon prio=5 id=6 group=system
   java.lang.Thread.State: RUNNABLE

"DestroyJavaVM" prio=5 id=24 group=main
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 id=3 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"GC Daemon" daemon prio=2 id=22 group=system
   java.lang.Thread.State: TIMED_WAITING
	at java.lang.Object.wait(Native Method)
	at sun.misc.GC$Daemon.run(GC.java:100)

"Image Fetcher 0" daemon prio=8 id=55 group=main
   java.lang.Thread.State: TIMED_WAITING
	at java.lang.Object.wait(Native Method)
	at sun.awt.image.ImageFetcher.nextImage(ImageFetcher.java:114)
	at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:167)
	at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

"Java2D Disposer" daemon prio=10 id=11 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
	at sun.java2d.Disposer.run(Disposer.java:127)
	at java.lang.Thread.run(Thread.java:662)

"RMI Reaper" prio=5 id=21 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
	at sun.rmi.transport.ObjectTable$Reaper.run(ObjectTable.java:333)
	at java.lang.Thread.run(Thread.java:662)

"RMI TCP Accept-0" daemon prio=5 id=20 group=system
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
	at java.net.ServerSocket.implAccept(ServerSocket.java:462)
	at java.net.ServerSocket.accept(ServerSocket.java:430)
	at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:369)
	at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:341)
	at java.lang.Thread.run(Thread.java:662)

"Reference Handler" daemon prio=10 id=2 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)

"Run$_Macro$" prio=4 id=52 group=main
   java.lang.Thread.State: WAITING
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:218)
	at java.util.concurrent.FutureTask.get(FutureTask.java:83)
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:282)
	at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:161)
	at ij.IJ.runPlugIn(IJ.java)
	at ij.Executer.runCommand(Executer.java:132)
	at ij.Executer.run(Executer.java:65)
	at ij.IJ.run(IJ.java:292)
	at ij.macro.Functions.doRun(Functions.java:601)
	at ij.macro.Functions.doFunction(Functions.java:96)
	at ij.macro.Interpreter.doStatement(Interpreter.java:227)
	at ij.macro.Interpreter.doBlock(Interpreter.java:605)
	at ij.macro.Interpreter.doStatement(Interpreter.java:269)
	at ij.macro.Interpreter.doFor(Interpreter.java:527)
	at ij.macro.Interpreter.doStatement(Interpreter.java:251)
	at ij.macro.Interpreter.doStatements(Interpreter.java:215)
	at ij.macro.Interpreter.run(Interpreter.java:112)
	at ij.macro.Interpreter.run(Interpreter.java:82)
	at ij.macro.MacroRunner.run(MacroRunner.java:139)
	at java.lang.Thread.run(Thread.java:662)

"SciJava-f1a47df-Thread-0" prio=5 id=17 group=main
   java.lang.Thread.State: RUNNABLE
	at java.lang.StringBuilder.append(StringBuilder.java:119)
	at org.scijava.minimaven.Coordinate.getKey(Coordinate.java:99)
	at org.scijava.minimaven.BuildEnvironment.containsProject(BuildEnvironment.java:281)
	at org.scijava.minimaven.BuildEnvironment.containsProject(BuildEnvironment.java:277)
	at org.scijava.plugins.scripting.java.JavaEngine.fakeArtifactId(JavaEngine.java:657)
	at org.scijava.plugins.scripting.java.JavaEngine.fakeDependency(JavaEngine.java:827)
	at org.scijava.plugins.scripting.java.JavaEngine.getAllDependencies(JavaEngine.java:804)
	at org.scijava.plugins.scripting.java.JavaEngine.fakePOM(JavaEngine.java:720)
	at org.scijava.plugins.scripting.java.JavaEngine.writeTemporaryProject(JavaEngine.java:631)
	at org.scijava.plugins.scripting.java.JavaEngine.getMavenProject(JavaEngine.java:532)
	at org.scijava.plugins.scripting.java.JavaEngine.access$600(JavaEngine.java:95)
	at org.scijava.plugins.scripting.java.JavaEngine$Builder.<init>(JavaEngine.java:410)
	at org.scijava.plugins.scripting.java.JavaEngine$Builder.<init>(JavaEngine.java:372)
	at org.scijava.plugins.scripting.java.JavaEngine.compile(JavaEngine.java:198)
	at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:135)
	at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:173)
	at org.scijava.script.ScriptModule.run(ScriptModule.java:173)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
	at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

"SciJava-f1a47df-Thread-7" prio=5 id=36 group=main
   java.lang.Thread.State: RUNNABLE
	at java.lang.Thread.dumpThreads(Native Method)
	at java.lang.Thread.getAllStackTraces(Thread.java:1530)
	at org.scijava.plugins.commands.debug.DumpStack.run(DumpStack.java:80)
	at org.scijava.command.CommandModule.run(CommandModule.java:201)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
	at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

"SciJava-f1a47df-Thread-9" prio=5 id=56 group=main
   java.lang.Thread.State: RUNNABLE
	at java.lang.Object.hashCode(Native Method)
	at java.util.WeakHashMap.put(WeakHashMap.java:401)
	at org.scijava.thread.DefaultThreadService$1.run(DefaultThreadService.java:173)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

"Signal Dispatcher" daemon prio=9 id=5 group=system
   java.lang.Thread.State: RUNNABLE

"TimerQueue" daemon prio=5 id=26 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at javax.swing.TimerQueue.run(TimerQueue.java:232)
	at java.lang.Thread.run(Thread.java:662)

"zSelector" prio=5 id=43 group=main
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at ij.gui.StackWindow.run(StackWindow.java:228)
	at java.lang.Thread.run(Thread.java:662)
Comment 3 Curtis Rueden 2015-10-21 11:59:54 CDT
Thanks for the follow-up, and sorry for the delay in reply.

All that stuff about "org.scijava.minimaven" on the thread called "SciJava-f1a47df-Thread-0" tells us that for some weird reason, ImageJ is trying to compile Oval_Profile.java on the fly every time you run it.

Can you please double check that you have Oval_Profile.class in your plugins folder, and _not_ Oval_Profile.java? If Oval_Profile.java is present, please delete it or move it outside your ImageJ folder completely.

The source code for plugins should not be involved during runtime execution. We want to ensure that ImageJ has no possibility of getting confused and trying to "do too much" here.
Comment 4 jmesquib 2016-01-07 15:41:37 CST
Thanks! Resolved. You da man.