ControlSystemStudio / cs-studio

Control System Studio is an Eclipse-based collections of tools to monitor and operate large scale control systems, such as the ones in the accelerator community.
https://controlsystemstudio.org/
Eclipse Public License 1.0
111 stars 96 forks source link

stand alone window looses context menu #2689

Open shroffk opened 3 years ago

shroffk commented 3 years ago

with the upgrade to RHEL8 the use of standalone windows has some issues. the standalone window view does not populate correctly and all but the very first standalone window opened do not have a context menu.

org.csstudio.opibuilder.runmode.OPIShell (sendUpdateCommand) - Failed to send OPI shells changed command
org.eclipse.core.commands.ExecutionException: Error executing 'org.csstudio.opibuilder.opiShellsChanged': java.lang.NullPointerException
shroffk commented 3 years ago

@willrogers

willrogers commented 3 years ago

OK, I didn't see this.

I don't have a RHEL8 machine available at the moment, but I can ask to see if I can get one.

willrogers commented 2 years ago

I have just built the DLS product of CS-Studio on RHEL8.

Standalone windows seem to be working fine: the view shows all the windows and the context menu is working.

willrogers commented 2 years ago

Note: I am running it on the RHEL8 machine but via SSH. It's possible that this has some effect but I don't think it would relate to those queries.

kasemir commented 2 years ago

via ssh

I think that means you're using your local X window manager to handle windows, menus, popups, ... The issue as described might only appear when you use the X window manager of RHEL 8, and even there you might have a choice between gnome etc. The original comment didn't mention which exact window manger was used.

willrogers commented 2 years ago

@shroffk could try his version from a RHEL7 machine via SSH and see if he sees the same problems.

ralphlange commented 2 years ago

Still, a local VM with RHEL8 is much closer.

shroffk commented 2 years ago

I tried with x11 forwarding and the same error persists. I think the issue might be with gtk3/swt.

https://sourceforge.net/projects/cs-studio/files/nsls2-release/ you could test the latest 4.6.7 product from the above... it uses the latest version of eclipse and is built of the master branch.

If you can recreate the problem then we can compare and see what is possibly different... If you send me a link to your product I can try that too in the same environment.

shroffk commented 2 years ago

I have seen the following which leads me to believe it is a SWT/GTK3 issue

SEVERE [Thread 1] org.csstudio.logging.PluginLogListener (logging) - Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt".
org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
willrogers commented 2 years ago

I see the same problems as you when I launch your build.

shroffk commented 2 years ago

Ok, I guess that is good in away.. I am guessing when I switch to your product I should not see the same issue.

I guess the next step would be to try to figure out the differences in the swt and other graphical libraries

willrogers commented 2 years ago

This line does not look right: https://github.com/cs-studio-nsls2/org.csstudio.nsls2.product/blob/master/repository/css-nsls2.product#L14

You still seem to be trying to use GTK2.

shroffk commented 2 years ago

Ya, but the product ignores this

The Cs-studio executable launcher no longer supports running with GTK + 2.x. Continuing using GTK+ 3.x.

I think I tried changing this to 3 in a local test setup and it did not change anything

willrogers commented 2 years ago

Our feature includes more plugins than yours: https://github.com/dls-controls/org.csstudio.dls.product/blob/master/features/org.csstudio.dls.product.feature/feature.xml

If I remove openjfx.swt from our feature then I see the same problems that you are describing.