BCDA-APS / epics-bluesky-vm

Simulate a beam line using EPICS IOCs, GUIs, Bluesky and related components.
Other
1 stars 0 forks source link

caQtDM userCalcs10.ui does not display all widgets #3

Closed prjemian closed 3 years ago

prjemian commented 3 years ago

Clipboard01

Expecting more content, like this MEDM display Clipboard02

prjemian commented 3 years ago

... with correct MEDM fonts (#4):

Clipboard02

prjemian commented 3 years ago

Looks like a failure of the caInclude widget.

prjemian commented 3 years ago

Confirmed that in the caQtDM logs (in main window):

01-04-2021 10:06:40 Controlsystem plugins: attempt to load from /usr/local/epics/extensions/lib/linux-x86_64/controlsystems
01-04-2021 10:06:40 Epics3Plugin: epics version: EPICS 7.0.5
01-04-2021 10:06:40 caQtDM will suspend epics connections for data in invisible tabs while CAQTDM_OPTIMIZE_EPICS3CONNECTIONS not set to TRUE 
01-04-2021 10:06:40 Info: plugin archiveSF loaded
01-04-2021 10:06:40 Info: plugin demo loaded
01-04-2021 10:06:40 Info: plugin environment loaded
01-04-2021 10:06:40 Info: plugin epics3 loaded
01-04-2021 10:06:40 environment variable CAQTDM_TIMEOUT_HOURS could be set for quitting caQtDM automatically after some time
01-04-2021 10:06:42 special macro CAQTDM_INTERNAL_UIPATH set to /tmp/docker_ioc/iocgp/xxx-R6-1/xxxApp/op/ui/ 
01-04-2021 10:06:42 last file: /tmp/docker_ioc/iocgp/xxx-R6-1/xxxApp/op/ui/xxx.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 sorry -- specified file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui is not a med or edm file
01-04-2021 10:07:20 could not load include file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
01-04-2021 10:07:20 special macro CAQTDM_INTERNAL_UIPATH set to /tmp/docker_ioc/synapps-6.1/screens/ui/ 
01-04-2021 10:07:20 last file: /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs10.ui, macro: P=gp:
prjemian commented 3 years ago

File exists and looks ok. Something else wrong?

(base) apsu@apsu-beamline-simulator:~$ file /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
/tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui: XML 1.0 document, ASCII text
[3]+  Done                    geany /usr/local/epics/synApps/support/calc-R3-7-4/calcApp/op/ui/autoconvert/userCalcs_line.ui
(base) apsu@apsu-beamline-simulator:~$ head /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
    <property name="geometry">
        <rect>
            <x>1446</x>
            <y>245</y>
            <width>215</width>
            <height>20</height>
prjemian commented 3 years ago

When called from command line directly, the single-line UI file is found and displays properly:

caQtDM -macro "P=gp:,N=1" /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui

which logs this line amongst the other info:

file "/tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs_line.ui" will be loaded macro= "P=gp:,N=1"

Clipboard02

prjemian commented 3 years ago

Start userCalcs10.ui from the command line shows the .ui file is looking to include .adl files (which are not found in this directory):

(base) apsu@apsu-beamline-simulator:~$ caQtDM -macro "P=gp:" /tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs10.ui &
[3] 11736
(base) apsu@apsu-beamline-simulator:~$ qt5ct: using qt5ct plugin
caQtDM -- file <caQtDM_stylesheet.qss> could not be loaded, is 'CAQTDM_DISPLAY_PATH' <> defined?
-macro
caQtDM -- macro <P=gp:>
/tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs10.ui
caQtDM -- file = </tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs10.ui>
...
file "/tmp/docker_ioc/synapps-6.1/screens/ui/userCalcs10.ui" will be loaded macro= "P=gp:"
libpng warning: iCCP: known incorrect sRGB profile
sorry, file "userCalcs_line.adl"  does not exist
sorry, file "userCalcs_line.adl"  does not exist
sorry, file "userCalcs_line.adl"  does not exist
sorry, file "userCalcs_line.adl"  does not exist
sorry, file "userCalcs_line.adl"  does not exist
sorry, file "userCalcs_line.adl"  does not exist
sorry, file "userCalcs_line.adl"  does not exist
sorry, file "userCalcs_line.adl"  does not exist
sorry, file "userCalcs_line.adl"  does not exist
sorry, file "userCalcs_line.adl"  does not exist
prjemian commented 3 years ago

That's a different problem since that directory is not on the display path when starting without a script that sets the display path. Try again, starting in the directory (created by the docker starter script) where all the .ui files are found.

This time, the original error message again, 10 times (once per row):

01-04-2021 10:27:43 sorry -- specified file userCalcs_line.ui is not a med or edm file
01-04-2021 10:27:43 could not load include file userCalcs_line.ui
prjemian commented 3 years ago

WHEN the corresponding .adl file is copied into the /tmp/docker_ioc/synapps-6.1/screens/ui/ directory, the caInclude widget works properly. Looks like a problem with caQtDM that happens when a .adl file is requested and not found but a .ui file is available. The .ui file is not recognized as a caQtDM file.

prjemian commented 3 years ago

Note that older version (4.1.6) does not show this problem, we wait for more information regarding caQtDM.

prjemian commented 3 years ago

As noted, for now

use a sed command to replace .adl with .ui in all caQtDM screens in this container.

prjemian commented 3 years ago
cd /tmp/docker_ioc/synapps-6.1/screens/ui
for f in $(ls *.ui); do
    echo Converting $f ...
    sed -i s:'.adl':'.ui':g ./$f
done
prjemian commented 3 years ago

Add locally to ~/bin/start_xxx.sh and ~/bin/start_adsim.sh. Also add to upstream docker repository: https://github.com/prjemian/epics-docker

prjemian commented 3 years ago

This is fixed upstream: https://github.com/caqtdm/caqtdm/issues/56#issuecomment-814307766