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

Workspace Resource NullPointerException #553

Open
dxmaxwell opened this issue Oct 18, 2019 · 5 comments
Open

Workspace Resource NullPointerException #553

dxmaxwell opened this issue Oct 18, 2019 · 5 comments

Comments

@dxmaxwell
Copy link

dxmaxwell commented Oct 18, 2019

When running the latest version of CS-Studio, I get the following exceptions:

2019-10-15 17:47:05.072 WARNING [Thread 37] org.csstudio.display.builder.model.persist.WidgetColorService (lambda$0) - Cannot load colors from /etc/cs-studio/color.def
java.lang.NullPointerException
        at org.csstudio.display.builder.model.util.WorkspaceResourceHelperImpl.openWorkspaceResource(WorkspaceResourceHelperImpl.java:92)
        at org.csstudio.display.builder.model.util.ModelResourceUtil.openResourceStream(ModelResourceUtil.java:434)
        at org.csstudio.display.builder.rcp.Plugin.lambda$0(Plugin.java:44)
        at org.csstudio.display.builder.model.persist.WidgetColorService.lambda$0(WidgetColorService.java:60)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)


2019-10-15 17:47:05.074 WARNING [Thread 38] org.csstudio.display.builder.model.persist.WidgetFontService (lambda$0) - Cannot load fonts from /etc/cs-studio/font.def
java.lang.NullPointerException
        at org.csstudio.display.builder.model.util.WorkspaceResourceHelperImpl.openWorkspaceResource(WorkspaceResourceHelperImpl.java:92)
        at org.csstudio.display.builder.model.util.ModelResourceUtil.openResourceStream(ModelResourceUtil.java:434)
        at org.csstudio.display.builder.rcp.Plugin.lambda$1(Plugin.java:47)
        at org.csstudio.display.builder.model.persist.WidgetFontService.lambda$0(WidgetFontService.java:59)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

As you can see from the stacktrace, the exception is thrown here, which seems to rely on getRawLocationURI() to always return a value (instead of null).

But more problematic is that after c9b090f, the method openWorkspaceResource() never returns null and as a result file system resources (outside the workspace) will not get loaded.

@dxmaxwell
Copy link
Author

@kasemir - Is this the place to report issues with Display Builder, there seems to be a (partial) copy of this repository over in Phoebus?

@kasemir
Copy link
Owner

kasemir commented Oct 23, 2019

This is the display builder repo which was developed for the Eclipse/RCP based CS-Studio, using Java 8.
Around May 2019, the Eclipse/RCP based CS-Studio was updated to use Java 9/10/11/12.
This display builder repo has not been updated to use Java 9/10/11/12, i.e. it will not "work" with the current Eclipse-based CS-Studio. This is mostly because I for example have been unable to build a runnable version of the SNS product based on Eclipse/RCP since May. Got to the stage where it compiles, but won't run. So don't have a development setup that would allow me to make this repo compile and run with the Eclipse/RCP based CS-Studio under Java 9/10/11/12. The RCP build setup has simply gotten too complicated.

Meanwhile, the Phoebus repo contains most CS-Studio components, including the Display Builder, for Java 11/12. It builds within a few minutes via maven or ant or Eclipse or IntelliJ or ..
Going forward, many sites that use the Display Builder thus concentrate on Phoebus:

  • SNS is exclusively using Phoebus
  • I think so is ESS
  • BNL plans to transition via a dual product that contains the Eclipse/RCP based CS-Studio for BOY, but starting Phoebus for probe, data browser, .. (see recent EPICS meeting)

@kasemir
Copy link
Owner

kasemir commented Oct 23, 2019

I've updated the Readme.md to reflect the current state

@dxmaxwell
Copy link
Author

Not sure exactly how he did it, but Eric left me a CS Studio v4.6 product that runs on Java 11, and includes this version of Display Builder. The product also provides simple integration with Phoebus, which I think Kunal has developed. Thanks for the update.

@kasemir
Copy link
Owner

kasemir commented Oct 23, 2019

Yes, not sure. For this to compile and run with Java 11 and the JavaFX 11(or 12) that goes with it, some of the tweaks related to "Skins" as in #378 would be required. If you have the exact sources that were used to build, please diff against this repo and make pull requests.

Because of the Java FX changes and difficulties getting the JFX libs onto the Eclipse class path, Kunal's approach removes everything based on JavaFX from the Eclipse-based CS-Studio, and instead invokes the Phoebus counterpart via the transition plugins.

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

2 participants