Fix: [ALAS] Catch OSError when iter running emulators

(cherry picked from commit dc530e75386d4575a36bc52a76bf41c2aecd8898)
This commit is contained in:
LmeSzinc 2024-08-30 18:50:53 +08:00
parent c91ec3cf2b
commit 224a59b054

View File

@ -506,9 +506,10 @@ class EmulatorManager(EmulatorManagerBase):
try:
exe = proc.cmdline()
exe = exe[0].replace(r'\\', '/').replace('\\', '/')
except (psutil.AccessDenied, psutil.NoSuchProcess, IndexError):
except (psutil.AccessDenied, psutil.NoSuchProcess, IndexError, OSError):
# psutil.AccessDenied
# NoSuchProcess: process no longer exists (pid=xxx)
# OSError: [WinError 87] 参数错误。: '(originated from ReadProcessMemory)'
continue
if Emulator.is_emulator(exe):