Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultPrefService can throw NPE #48

Open
ctrueden opened this issue Mar 25, 2015 · 1 comment
Open

DefaultPrefService can throw NPE #48

ctrueden opened this issue Mar 25, 2015 · 1 comment
Milestone

Comments

@ctrueden
Copy link
Member

The following exception can be thrown by the DefaultPrefService when persisting values:

java.lang.NullPointerException
    at java.util.prefs.AbstractPreferences.put(AbstractPreferences.java:241)
    at org.scijava.prefs.DefaultPrefService.put(DefaultPrefService.java:183)
    at org.scijava.module.DefaultModuleService.save(DefaultModuleService.java:280)
    at org.scijava.module.process.SaveInputsPreprocessor.saveValue(SaveInputsPreprocessor.java:74)
    at org.scijava.module.process.SaveInputsPreprocessor.process(SaveInputsPreprocessor.java:65)
    at org.scijava.module.ModuleRunner.preProcess(ModuleRunner.java:104)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:156)
    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:164)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

To reproduce, open the SingleInputPreprocessorTest, remove the persist = false attribute from the private T thing parameter of HasASingleInput, and run the tests.

@ctrueden ctrueden added this to the m1 milestone Mar 25, 2015
@ctrueden
Copy link
Member Author

This is probably a SciJava Common bug, but the SingleInputPreprocessorTest provides an easy way to reproduce, and that class lives in ImageJ Common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant