AzurLaneAutoScript
AzurLaneAutoScript copied to clipboard
使用ldopengl截图方案时alas无法运行,点击开始后5秒报错停止
在提问之前...
- [x] 我已经搜索了现有的 issues
- [x] 我在提问题之前至少花费了 5 分钟来思考和准备
- [x] 我已经阅读了 Wiki 中的 常见问题(FAQ)
- [x] 我正在使用最新版的 Alas
描述你的问题
点击运行后马上报错,停止运行,截图方法改用DroidCast_raw后可以正常运行。另外“Alas设置”中的“模拟器控制方案”会被改成MaaTouch,之前一直用的minitouch,这次出现问题后发现会自动改成MaaTouch。
如何复现
- 前往 '...'
- 点击 '....'
- 滑动到 '....'
- 出现问题
预期行为
No response
相关 Logs
══════════════════════════════════════════════════════════════════════
START
══════════════════════════════════════════════════════════════════════
INFO 20:20:15.793 │ Start scheduler loop: alas
INFO 20:20:15.839 │ [Server] cn
INFO 20:20:15.855 │ Bind task ['General', 'Alas']
INFO 20:20:16.282 │ Server "地狱犬行动" is available.
INFO 20:20:16.287 │ Pending tasks: ['Commission', 'Research',
'Dorm', 'Reward', 'OpsiAbyssal', 'OpsiStronghold',
'OpsiObscure', 'Daily', 'Hard', 'OpsiAshAssist', 'EventSp',
'Event', 'OpsiMeowfficerFarming']
INFO 20:20:16.289 │ [Task] Commission (Enable, 2025-05-28
18:34:50)
INFO 20:20:16.291 │ Bind task ['General', 'Alas', 'Commission']
═══════════════════════════════ DEVICE ═══════════════════════════════
INFO 20:20:16.936 │ DEVICE
INFO 20:20:16.937 │ [IS_ON_PHONE_CLOUD] False
INFO 20:20:16.939 │ [AdbBinary] E:\c++\GAME\碧蓝航线\alas\AlasApp_
0.4.1_fullcn\AzurLaneAutoScript\toolkit\Lib\site-packages\adb
utils\binaries\adb.exe
INFO 20:20:16.941 │ [AdbClient] AdbClient(127.0.0.1, 5037)
INFO 20:20:16.942 │ <<< DETECT DEVICE >>>
INFO 20:20:16.943 │ Here are the available devices, copy to
Alas.Emulator.Serial to use it or set
Alas.Emulator.Serial="auto"
INFO 20:20:16.945 │ emulator-5554
INFO 20:20:16.947 │ "emulator-5554" is a `emulator-*` serial, skip
adb connect
INFO 20:20:16.948 │ [AdbDevice] AdbDevice(serial=emulator-5554)
INFO 20:20:16.949 │ [PackageName] com.bilibili.azurlane
INFO 20:20:16.950 │ [Server] cn
INFO 20:20:16.951 │ <<< MAATOUCH INIT >>>
INFO 20:20:16.951 │ Scheduler: Start task `Commission`
══════════════════════════════════════════════════════════════════════
COMMISSION
══════════════════════════════════════════════════════════════════════
INFO 20:20:16.958 │ LDOpenGL init, ld_folder=E:\leidian\LDPlayer9,
ldopengl_dll=E:\leidian\LDPlayer9\ldopengl64.dll,
instance_id=0
INFO 20:20:16.963 │ Execute:
['E:\\leidian\\LDPlayer9\\ldconsole.exe', 'list2']
INFO 20:20:17.013 │ [Device Orientation] 0 (Normal)
ERROR 20:20:17.027 │ TypeError: __init__() missing 9 required
positional arguments: 'name', 'topWnd', 'bndWnd', 'sysboot',
'playerpid', 'vboxpid', 'width', 'height', and 'dpi'
╭──────────── Traceback (most recent call last) ────────────╮
│ │
│ E:\c++\GAME\碧蓝航线\alas\AlasApp_0.4.1_fullcn\AzurLaneAu │
│ toScript\alas.py:68 in run │
│ │
│ 66 │ │ try: │
│ 67 │ │ │ if not skip_first_screenshot: │
│ ❱ 68 │ │ │ │ self.device.screenshot() │
│ 69 │ │ │ self.__getattribute__(command)() │
│ 70 │ │ │ return True │
│ │
│ ╭─────────────────────── locals ────────────────────────╮ │
│ │ command = 'commission' │ │
│ │ e = TypeError("__init__() missing │ │
│ │ 9 required positional │ │
│ │ arguments: 'name', 'topWnd', │ │
│ │ 'bndWnd', 'sysboot', │ │
│ │ 'playerpid', 'vboxpid', │ │
│ │ 'width', 'height', and │ │
│ │ 'dpi'") │ │
│ │ self = <alas.AzurLaneAutoScript │ │
│ │ object at 0x000001E3F932DE08> │ │
│ │ skip_first_screenshot = False │ │
│ ╰───────────────────────────────────────────────────────╯ │
│ E:\c++\GAME\碧蓝航线\alas\AlasApp_0.4.1_fullcn\AzurLaneAu │
│ toScript\module\device\device.py:187 in screenshot │
│ │
│ 185 │ │ │
│ 186 │ │ try: │
│ ❱ 187 │ │ │ super().screenshot() │
│ 188 │ │ except RequestHumanTakeover: │
│ 189 │ │ │ if not self.ascreencap_available: │
│ │
│ ╭─────────────────────── locals ────────────────────────╮ │
│ │ __class__ = <class 'module.device.device.Device'> │ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000001E3FA777848> │ │
│ ╰───────────────────────────────────────────────────────╯ │
│ │
│ E:\c++\GAME\碧蓝航线\alas\AlasApp_0.4.1_fullcn\AzurLaneAu │
│ toScript\module\device\screenshot.py:65 in screenshot │
│ │
│ 63 │ │ │ │ method = self.config.Emulator_Scree │
│ 64 │ │ │ method = self.screenshot_methods.get(me │
│ ❱ 65 │ │ │ self.image = method() │
│ 66 │ │ │ │
│ 67 │ │ │ if self.config.Emulator_ScreenshotDedit │
│ │
│ ╭─────────────────────── locals ────────────────────────╮ │
│ │ _ = 0 │ │
│ │ method = <bound method LDOpenGL.screenshot_ldopengl │ │
│ │ of <module.device.device.Device object at │ │
│ │ 0x000001E3FA777848>> │ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000001E3FA777848> │ │
│ ╰───────────────────────────────────────────────────────╯ │
│ │
│ E:\c++\GAME\碧蓝航线\alas\AlasApp_0.4.1_fullcn\AzurLaneAu │
│ toScript\module\device\method\ldopengl.py:332 in │
│ screenshot_ldopengl │
│ │
│ 330 │ │
│ 331 │ def screenshot_ldopengl(self): │
│ ❱ 332 │ │ image = self.ldopengl.screenshot() │
│ 333 │ │ │
│ 334 │ │ image = cv2.flip(image, 0) │
│ │
│ ╭─────────────────────── locals ────────────────────────╮ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000001E3FA777848> │ │
│ ╰───────────────────────────────────────────────────────╯ │
│ │
│ E:\c++\GAME\碧蓝航线\alas\AlasApp_0.4.1_fullcn\AzurLaneAu │
│ toScript\module\base\decorator.py:97 in __get__ │
│ │
│ 95 │ │ │ return self │
│ 96 │ │ │
│ ❱ 97 │ │ value = obj.__dict__[self.func.__name__] = │
│ 98 │ │ return value │
│ 99 │
│ │
│ ╭─────────────────────── locals ────────────────────────╮ │
│ │ cls = <class 'module.device.device.Device'> │ │
│ │ obj = <module.device.device.Device object at │ │
│ │ 0x000001E3FA777848> │ │
│ │ self = <module.base.decorator.cached_property object │ │
│ │ at 0x000001E3A9157048> │ │
│ ╰───────────────────────────────────────────────────────╯ │
│ │
│ E:\c++\GAME\碧蓝航线\alas\AlasApp_0.4.1_fullcn\AzurLaneAu │
│ toScript\module\device\method\ldopengl.py:294 in ldopengl │
│ │
│ 292 │ │ │ │ │ return LDOpenGLImpl( │
│ 293 │ │ │ │ │ │ ld_folder=folder, │
│ ❱ 294 │ │ │ │ │ │ instance_id=index, │
│ 295 │ │ │ │ │ ) │
│ 296 │ │ │ │ except (LDOpenGLIncompatible, LDOpe │
│ │
│ ╭─────────────────────── locals ────────────────────────╮ │
│ │ folder = 'E:\\leidian\\LDPlayer9' │ │
│ │ index = 0 │ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000001E3FA777848> │ │
│ ╰───────────────────────────────────────────────────────╯ │
│ │
│ E:\c++\GAME\碧蓝航线\alas\AlasApp_0.4.1_fullcn\AzurLaneAu │
│ toScript\module\device\method\ldopengl.py:210 in __init__ │
│ │
│ 208 │ │ # Get info after loading DLL, so DLL existe │
│ 209 │ │ self.console = LDConsole(ld_folder) │
│ ❱ 210 │ │ self.info = self.get_player_info_by_index(i │
│ 211 │ │ │
│ 212 │ │ self.lib.CreateScreenShotInstance.restype = │
│ │
│ ╭─────────────────────── locals ────────────────────────╮ │
│ │ instance_id = 0 │ │
│ │ ld_folder = 'E:\\leidian\\LDPlayer9' │ │
│ │ ldopengl_dll = 'E:\\leidian\\LDPlayer9\\ldopengl64.d… │ │
│ │ self = <module.device.method.ldopengl.LDOpen… │ │
│ │ object at 0x000001E3A9195088> │ │
│ ╰───────────────────────────────────────────────────────╯ │
│ │
│ E:\c++\GAME\碧蓝航线\alas\AlasApp_0.4.1_fullcn\AzurLaneAu │
│ toScript\module\device\method\ldopengl.py:229 in │
│ get_player_info_by_index │
│ │
│ 227 │ │ │ LDOpenGLError: │
│ 228 │ │ """ │
│ ❱ 229 │ │ for info in self.console.list2(): │
│ 230 │ │ │ if info.index == instance_id: │
│ 231 │ │ │ │ logger.info(f'Match LDPlayer instan │
│ │
│ ╭─────────────────────── locals ────────────────────────╮ │
│ │ instance_id = 0 │ │
│ │ self = <module.device.method.ldopengl.LDOpenG… │ │
│ │ object at 0x000001E3A9195088> │ │
│ ╰───────────────────────────────────────────────────────╯ │
│ │
│ E:\c++\GAME\碧蓝航线\alas\AlasApp_0.4.1_fullcn\AzurLaneAu │
│ toScript\module\device\method\ldopengl.py:115 in list2 │
│ │
│ 113 │ │ for row in data.strip().split(b'\n'): │
│ 114 │ │ │ info = row.strip().split(b',') │
│ ❱ 115 │ │ │ info = DataLDPlayerInfo(*info) │
│ 116 │ │ │ out.append(info) │
│ 117 │ │ return out │
│ │
│ ╭─────────────────────── locals ────────────────────────╮ │
│ │ data = b'' │ │
│ │ info = [b''] │ │
│ │ out = [] │ │
│ │ row = b'' │ │
│ │ self = <module.device.method.ldopengl.LDConsole │ │
│ │ object at 0x000001E3A9195C08> │ │
│ ╰───────────────────────────────────────────────────────╯ │
╰───────────────────────────────────────────────────────────╯
TypeError: __init__() missing 9 required positional
arguments: 'name', 'topWnd', 'bndWnd', 'sysboot',
'playerpid', 'vboxpid', 'width', 'height', and 'dpi'
INFO 20:20:17.363 │ ^ 10 1280 720 255
INFO 20:20:17.364 │ $ 255
INFO 20:20:17.365 │ MaaTouch stream connected
INFO 20:20:17.365 │ max_contact: 10; max_x: 1280; max_y: 720;
max_pressure: 255
WARNING 20:20:17.373 │ Saving error: ./log/error/1748460017373
INFO 20:20:17.580 │ No provider specified, skip sending
截图
No response
还有别的吗?
No response
有没有使用无界趣连在未解锁电脑的情况下开启雷电模拟器?或者雷电模拟器是否是最新的版本? 在电脑未解锁下启动雷电模拟器会出现很奇怪的事情,有时候会导致ldopengl起不来致使ALAS报错。 另外只有雷电较新的版本支持ldopengl,老版本不支持。 Maatouch性能和minitouch几乎一样,而且雷电模拟器官方曾亲口说特意找Maatouch开发者调试过,能保证稳定性,而minitouch则有断触的BUG,此处应该做了防呆处理。
暂时还没使用过无界趣连,雷电模拟器是最新的版本。感谢Maatouch和minitouch性能方面的解答,那我先不管它好了
在 cmd 里执行这个命令 看看结果
E:\leidian\LDPlayer9\ldconsole.exe list2
E:\leidian\LDPlayer9\ldconsole.exe list2
运行后出来的结果是这个 0,雷电模拟器,2559110,660916,1,54456,39068,1920,1080,280