You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a packaged app with PyInstaller (either onefile or dir), for each caproto read call, a new app process would spawn. For example, if 4 PV names were given and "Check PVs" button clicked, after a short while, four different manager main windows (each with its own process) would appear on top of each other.
This will happen for each PV that is tested, thus each caproto.sync.client read call, even though only one QThread is responsible for testing the PVs.
Notes
This may be caused by a weird interaction between PyInstaller's frozen code handling of multithreading/multiprocessing (?) and caproto (sync client).
Issue encountered first on NDAHEMON, then on personal desktop as well.
Bug was never encountered on developer machine (IDE or packaged app).
To see if this is a compatibility issue with NDAHEMON or with the .exe, ran the app on personal machine and issue was encountered again, so it is not an issue with NDAHEMON.
Personal machine fix (?)
After encountering the issue on the personal machine as well, downloaded code from the git repository, installed modules from requirements.exe, ran the HLM Manager with PyCharm IDE - no issues.
Closed PyCharm, uninstalled all packages from requirements from Python.
Ran packaged .exe from before - no issues: Somehow the issue was fixed on the personal desktop by fetching the code and running it via PyCharm IDE.
NDAHEMON fix (?)
Enabled gateway from work machine NDW2123, so that NDAHEMON can read PVs for the time being (until the IOC is set-up on it as well).
Added work machine's IP to NDAHEMON's EPICS_CA_ADDR_LIST. Tested it can connect to PVs using caget TE:NDW2123:HA:HLM:MOTHER_DEWAR:HE_LEVEL, it worked.
After these steps, the issue was somehow resolved on NDAHEMON as well - a new process no longer spawns on caproto read.
How to reproduce
Because the issue somehow resolved itself, the cause is uncertain.
To attempt reproduce, simply run the HLM Manager .exe, set up the DB Connection in settings, open ConfigEntry window by clicking the New/Add Config button on left of the PV Config table, write some PV names (or anything) in the Measurement PVs fields, then click the PV Connection Check button.
If establishing a HLM DB connection is not possible, remove the return statement from new_config_btn_clicked in ServiceManager\GUI\main_window.py (to be able to open the ConfigEntry dialog) then re-freeze with PyInstaller.
The text was updated successfully, but these errors were encountered:
Description
In a packaged app with PyInstaller (either onefile or dir), for each caproto
read
call, a new app process would spawn. For example, if 4 PV names were given and "Check PVs" button clicked, after a short while, four different manager main windows (each with its own process) would appear on top of each other.This will happen for each PV that is tested, thus each caproto.sync.client
read
call, even though only one QThread is responsible for testing the PVs.Notes
This may be caused by a weird interaction between PyInstaller's frozen code handling of multithreading/multiprocessing (?) and caproto (sync client).
Issue encountered first on NDAHEMON, then on personal desktop as well.
Bug was never encountered on developer machine (IDE or packaged app).
To see if this is a compatibility issue with NDAHEMON or with the .exe, ran the app on personal machine and issue was encountered again, so it is not an issue with NDAHEMON.
Personal machine fix (?)
After encountering the issue on the personal machine as well, downloaded code from the git repository, installed modules from requirements.exe, ran the HLM Manager with PyCharm IDE - no issues.
Closed PyCharm, uninstalled all packages from requirements from Python.
Ran packaged .exe from before - no issues: Somehow the issue was fixed on the personal desktop by fetching the code and running it via PyCharm IDE.
NDAHEMON fix (?)
Enabled gateway from work machine NDW2123, so that NDAHEMON can read PVs for the time being (until the IOC is set-up on it as well).
Added work machine's IP to NDAHEMON's EPICS_CA_ADDR_LIST. Tested it can connect to PVs using
caget TE:NDW2123:HA:HLM:MOTHER_DEWAR:HE_LEVEL
, it worked.After these steps, the issue was somehow resolved on NDAHEMON as well - a new process no longer spawns on caproto read.
How to reproduce
Because the issue somehow resolved itself, the cause is uncertain.
To attempt reproduce, simply run the HLM Manager .exe, set up the DB Connection in settings, open ConfigEntry window by clicking the New/Add Config button on left of the PV Config table, write some PV names (or anything) in the Measurement PVs fields, then click the PV Connection Check button.
If establishing a HLM DB connection is not possible, remove the return statement from
new_config_btn_clicked
inServiceManager\GUI\main_window.py
(to be able to open the ConfigEntry dialog) then re-freeze with PyInstaller.The text was updated successfully, but these errors were encountered: