kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

Catching an NPE blocking DataBrowser AND DisplayBuilder to start. #431

Closed claudio-rosati closed 6 years ago

claudio-rosati commented 6 years ago

Added try-catch block to catch an NPE blocking DataBrowser AND DisplayBuilder widgets to be loaded.

@kasemir All my last 3 PR are important to ESS, but this one is really blocking. The for (Monitor monitor : Display.getCurrent().getMonitors()) is generating the NPE that, no only prevents the DataBrowser plugin to be loaded, but then also the Display Builder to load widgets. Is it possible that the DataBrowser plugin is activated before Display.getCurrent() has a valid value?

kasemir commented 6 years ago

I appreciate that you only submit pull requests that you consider important, at least for your site. Rest assured that I, too, are interested in fixing critical bugs since I have been depending on this software in operations for more than a year. There is indeed an initialization problem, but simply skipping this code doesn't fix it. Will submit an update soon.

kasemir commented 6 years ago

Merged so you can build.

claudio-rosati commented 6 years ago

Thank you Kay. I really submit any PR on changes to Display Builder. I'm synchronised with your repository. Recently I'm doing less changes because I'm blocked in fixing a bloody bug on SVGs, and for that I'm building a test environment to be able to catch this (and future) problems (I hope none).

kasemir commented 6 years ago

See commit that performs the monitor access on the UI thread instead of skipping it.

claudio-rosati commented 6 years ago

Oh, yes this is absolutely better. Thank you.