Skip to content

GUI Troubleshooting

Chsudeepta edited this page Oct 25, 2023 · 35 revisions

Wiki > Trouble-shooting > GUI

This page contains information on how to troubleshoot some common issues with the GUI. These are issues that occur once the GUI has started, not issues in starting the GUI. A good place to start are the log files, they are stored in ...\Instrument\Apps\Client\workspace\logs.

Runtime failure due to security manager

If you use eclipse IDE version 2022-03 to attempt to launch the GUI, you will get an error like the following:

org.osgi.framework.BundleException: Exception in org.eclipse.osgi.internal.framework.SystemBundleActivator.start() of bundle org.eclipse.osgi.
...
Caused by: org.osgi.framework.BundleException: Failed to create security manager
...
Caused by: java.lang.ClassNotFoundException: allow

The solution to this error is to use an older IDE - for example 2021-12 works without issue. Longer-term solution to this issue is to wait for the eclipse IDE team to fix this bug.

Build fails due to Tycho dependencies (e.g. equinox.ds not resolvable; this is only for the Maven build)

Try deleting the .m2 cache directory (in ibex_gui/build/.m2 for GUI/script generator or isis_css_top/.m2 for CSS) and then rebuilding.

ModuleNotFoundError: No module named 'pywin32_bootstrap'

This may be due to windows file path limits. If you are running from a deeply nested directory after build and try to access the path to python it may run over this file path limit and not be able to find it.

IOC Start/Stop list is not Populated

If the IOC Start/Stop list is blank when the instrument is running then there is a problem with the PV serving this. The PV serving it comes from the DBSRV ioc and ultimately comes from the MySQL database. Console to the BD server:

console -M localhost DBSVR

should not be producing errors (pressing return creates blank lines)

Next check that the database is up.

Target Platform Errors

In some cases when you receive a Resolving Target Definition error, this can relate to some cached files that need to be refreshed and repeatedly performing the loop of Clean project > Set as Target Platform > Reload between 3-10 times can fix this issue. Set as Target Platform and Reload are located on the target view, located at uk.ac.stfc.isis.ibex.targetplatform.target.

JAXB dependency issues

Firstly, as of the March 2020 dependency updates, make sure you have imported the uk.ac.stfc.isis.ibex.jaxb project into eclipse (check out master and pull first).

We have seen some cases of JAXB causing issues with the GUI building. Since Eclipse builds in parallel a race condition can arise between building CSS (which expects some XML classes in the standard library) and the rest of the GUI (which has XML outside of the standard library due to using Java 11). If you have a load of JAXB issues, try the following:

  1. In the project explorer delete all the plugins (Do not delete the files from disk)
  2. Restart Eclipse
  3. Select "Import Existing Projects" and select the GUI base folder
  4. Open the uk.ac.stfc.isis.ibex.targetplatform file
  5. After the project has been imported click the "reload" button and then "Set Target Platform" in the top right. Note that these two buttons do not do the same thing and it necessary to press them both in order.

This seems to be the best way to resolve this. If you have persistent issues with JAXB and this method not working, please inform the team as we would like to investigate.

Delete dotfiles

If Eclipse gets very confused with the project build, you might want to completely wipe clean all files/folders used in the project. You can create a new workspace but there are still several additional folders worth deleting if needed. In your user folder, there should be hidden "dot" folders called:

  • .m2 (contains downloaded dependencies)
  • .p2
  • .eclipse

Client fails to start at runtime

If it produces a log with:

Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"

You may have built with Java 11 but are running with Java 8 make sure the path is set correctly without Java 8 on it and that you are using the correct version at run time.

You can verify that you are using the correct java version by running java -version in a command prompt. It should return java 11 in a non-EPICS terminal, or java 8 in an epics terminal (note, you cannot launch the GUI from an EPICS terminal). If it returns the incorrect version, you can add the correct version to your PATH.

File set from project ... has no valid check configuration.

Try setting up the checkstyle.

GUI claims another instance is running upon start (but there isn't)

Navigate to: C:/Users/<username>/AppData/Local/IBEX and delete the file "instance.txt"

maven-built client can't see referenced files

Add Eclipse-BundleShape: dir in the MANIFEST.MF; see the .opis MANIFEST.MF for an example of this. This makes the maven build build the directory into a directory rather than a jar, which is sometimes necessary to let eclipse then "see" the files natively on the filesystem. If you look in the plugins/ folder of a built client you should see a folder for .opis but a .jar for most other ibex modules - except for a few that need to be built as directories, as you may be finding.

Other issues

Running debugger

The following has been done to ensure that it is possible to debug the IBEX GUI running on any particular instrument:

  1. The JDWP hook is created for a specific port on individual installations.
  2. Access to the port has been disabled by a "deny" rule in each instrument.

The following needs to be done to debug the instance:

  1. Get hold of the IP of the instrument where the IBEX GUI is running, and the port on which JDWP is enabled

  2. Run the following to disable the firewall access "deny" rule mentioned above: netsh advfirewall firewall set rule name="Block Java De-bugging" new enable=yes

  3. Set the debug configuration (Run ==> Debug Configurations... ==> Remote Java Application) on the eclipse as shown below: image

  4. Once the debug session is completed, please take care to enable the access deny rule again: netsh advfirewall firewall set rule name="Block Java De-bugging" new enable=no

Memory "leaks"

PV Manager and Observers

Clone this wiki locally