Error during StatusEvent handling



Hi @ctrueden, @haesleinhuepf,

I am using SCIFIO to save a file and am getting these error messages:

[ERROR] Exception during event handling:
	context = org.scijava.Context@7625f457
	consumed = false
	progress = 42
	maximum = 136
	status = Saving plane 43/136
	warning = false
	[Subscriber] org.scijava.ui.DefaultUIService [priority = 0.0]
	[Method] protected void org.scijava.ui.DefaultUIService.onEvent(
	at net.imagej.legacy.ui.LegacyStatusBar.setProgress(
	at org.scijava.ui.DefaultUIService.onEvent(
	at jdk.internal.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at org.scijava.event.DefaultEventService$ProxySubscriber.onEvent(
	at org.scijava.event.DefaultEventService$ProxySubscriber.onEvent(
	at org.bushe.swing.event.ThreadSafeEventService.publish(
	at org.scijava.event.DefaultEventBus.access$201(
	at org.scijava.event.DefaultEventBus$
	at org.scijava.thread.DefaultThreadService$
	at java.base/java.util.concurrent.Executors$
	at java.base/
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.base/java.util.concurrent.ThreadPoolExecutor$
	at java.base/

I wonder whether this is because it clashes with the new Search UI element?


At least my command with an explicit @Parameter StatusService works fine with the new search bar. The progress bar animates on its left side.



Thank you Richard!
I get the error when executing this code:

ImgSaver imgSaver = new ImgSaver( );
imgSaver.saveImg( path,  imgPlus );

I saw just now that one can give the ImgSaver a Context object in the constructor. I am assuming this is needed for it to know which StatusService to use. I guess I will try something along those lines…still learning my way through SciJava :slight_smile:


Why not use the DatasetIOService or IOService instead of ImgSaver? These services are already linked to the active application context. If you use ImgSaver, you will indeed need to pass the context to the constructor or else there will be issues.