AzurLaneAutoScript icon indicating copy to clipboard operation
AzurLaneAutoScript copied to clipboard

alas点击启动后几秒钟内必定卡住,夜神模拟器

Open builder0w0 opened this issue 3 years ago • 0 comments

在提问之前...

  • [X] 我已经搜索了现有的 issues
  • [X] 我在提问题之前至少花费了 5 分钟来思考和准备
  • [X] 我已经阅读了 Wiki 中的 常见问题(FAQ)
  • [X] 我正在使用最新版的 Alas

描述你的问题

更新到win22H2后,启动alas,几秒钟后模拟器必定卡住

如何复现

1.点击 '启动' 2,出现问题

预期行为

正常使用

相关 Logs

┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│                                                                                                                     │
│ F:\小工具\AzurLaneAutoScript\module\device\method\adb.py:30 in retry_wrapper                                        │
│                                                                                                                     │
│    27 │   │   │   │   if callable(init):                                                                            │
│    28 │   │   │   │   │   self.sleep(RETRY_DELAY)                                                                   │
│    29 │   │   │   │   │   init()                                                                                    │
│ >  30 │   │   │   │   return func(self, *args, **kwargs)                                                            │
│    31 │   │   │   # Can't handle                                                                                    │
│    32 │   │   │   except RequestHumanTakeover:                                                                      │
│    33 │   │   │   │   break                                                                                         │
│                                                                                                                     │
│ ┌──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────┐ │
│ │      _ = 3                                                                                                      │ │
│ │   args = ()                                                                                                     │ │
│ │      e = error("OpenCV(4.5.3)                                                                                   │ │
│ │          C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-req-build-c2l3r8zm\\opencv\\modules\\imgcodecs\\src… │ │
│ │          error: (-215:Assertion failed) !buf.empty() in function 'cv::imdecode_'\n")                            │ │
│ │   func = <function Adb.screenshot_adb at 0x000002B75E80F3A8>                                                    │ │
│ │   init = <function retry.<locals>.retry_wrapper.<locals>.init at 0x000002B75EB063A8>                            │ │
│ │ kwargs = {}                                                                                                     │ │
│ │   self = <module.device.device.Device object at 0x000002B77FC901C8>                                             │ │
│ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ F:\小工具\AzurLaneAutoScript\module\base\decorator.py:67 in wrapper                                                 │
│                                                                                                                     │
│    64 │   │   │   │   │   if not all(flag):                                                                         │
│    65 │   │   │   │   │   │   continue                                                                              │
│    66 │   │   │   │   │                                                                                             │
│ >  67 │   │   │   │   │   return record['func'](self, *args, **kwargs)                                              │
│    68 │   │   │   │                                                                                                 │
│    69 │   │   │   │   logger.warning(f'No option fits for {name}, using the last define                             │
│       func.')                                                                                                       │
│    70 │   │   │   │   return func(self, *args, **kwargs)                                                            │
│                                                                                                                     │
│ ┌──────────────────────────────────────────────────── locals ────────────────────────────────────────────────────┐  │
│ │   args = ()                                                                                                    │  │
│ │    cls = <class 'module.base.decorator.Config'>                                                                │  │
│ │   flag = [True]                                                                                                │  │
│ │   func = <function Adb.screenshot_adb at 0x000002B75E80F318>                                                   │  │
│ │ kwargs = {}                                                                                                    │  │
│ │ logger = <Logger alas (INFO)>                                                                                  │  │
│ │   name = 'screenshot_adb'                                                                                      │  │
│ │ record = {'options': {'DEVICE_OVER_HTTP': False}, 'func': <function Adb.screenshot_adb at 0x000002B75E80F168>} │  │
│ │   self = <module.device.device.Device object at 0x000002B77FC901C8>                                            │  │
│ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘  │
│                                                                                                                     │
│ F:\小工具\AzurLaneAutoScript\module\device\method\adb.py:134 in screenshot_adb                                      │
│                                                                                                                     │
│   131 │   │   if len(data) < 500:                                                                                   │
│   132 │   │   │   logger.warning(f'Unexpected screenshot: {data}')                                                  │
│   133 │   │                                                                                                         │
│ > 134 │   │   return self.__process_screenshot(data)                                                                │
│   135 │                                                                                                             │
│   136 │   @retry                                                                                                    │
│   137 │   @Config.when(DEVICE_OVER_HTTP=True)                                                                       │
│                                                                                                                     │
│ ┌───────────────────────────── locals ──────────────────────────────┐                                               │
│ │ data = b''                                                        │                                               │
│ │ self = <module.device.device.Device object at 0x000002B77FC901C8> │                                               │
│ └───────────────────────────────────────────────────────────────────┘                                               │
│                                                                                                                     │
│ F:\小工具\AzurLaneAutoScript\module\device\method\adb.py:116 in __process_screenshot                                │
│                                                                                                                     │
│   113 │   def __process_screenshot(self, screenshot):                                                               │
│   114 │   │   for method in self.__screenshot_method_fixed:                                                         │
│   115 │   │   │   try:                                                                                              │
│ > 116 │   │   │   │   result = self.__load_screenshot(screenshot, method=method)                                    │
│   117 │   │   │   │   self.__screenshot_method_fixed = [method] + self.__screenshot_method                          │
│   118 │   │   │   │   return result                                                                                 │
│   119 │   │   │   except OSError:                                                                                   │
│                                                                                                                     │
│ ┌──────────────────────────────── locals ─────────────────────────────────┐                                         │
│ │     method = 0                                                          │                                         │
│ │ screenshot = b''                                                        │                                         │
│ │       self = <module.device.device.Device object at 0x000002B77FC901C8> │                                         │
│ └─────────────────────────────────────────────────────────────────────────┘                                         │
│                                                                                                                     │
│ F:\小工具\AzurLaneAutoScript\module\device\method\adb.py:107 in __load_screenshot                                   │
│                                                                                                                     │
│   104 │   │   screenshot = remove_prefix(screenshot, b'long long=8 fun*=10\n')                                      │
│   105 │   │                                                                                                         │
│   106 │   │   image = np.frombuffer(screenshot, np.uint8)                                                           │
│ > 107 │   │   image = cv2.imdecode(image, cv2.IMREAD_COLOR)                                                         │
│   108 │   │   if image is None:                                                                                     │
│   109 │   │   │   raise OSError('Empty image')                                                                      │
│   110 │   │   image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)                                                        │
│                                                                                                                     │
│ ┌────────────── locals ───────────────┐                                                                             │
│ │      image = array([], dtype=uint8) │                                                                             │
│ │     method = 0                      │                                                                             │
│ │ screenshot = b''                    │                                                                             │
│ └─────────────────────────────────────┘                                                                             │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
error: OpenCV(4.5.3)                                                                                                   
C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-c2l3r8zm\opencv\modules\imgcodecs\src\loadsave.cpp:818: error:   
(-215:Assertion failed) !buf.empty() in function 'cv::imdecode_'                                                       
                                                                                                                       
2022-10-07 12:44:06.065 | WARNING | Unexpected screenshot: b''

截图

Snipaste_2022-10-07_12-47-19

还有别的吗?

No response

builder0w0 avatar Oct 07 '22 04:10 builder0w0