AzurLaneAutoScript icon indicating copy to clipboard operation
AzurLaneAutoScript copied to clipboard

游戏加加导致Alas闪退

Open LspColor opened this issue 3 years ago • 5 comments

在提问之前...

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

描述你的问题

今天上午还能正常的运行,今天晚上打开alas就会闪退(指alas闪退),模拟器使用的是蓝叠国际32位

如何复现

1.打开Alas 2.Alas成功显示出操作画面 3.Alas闪退

预期行为

No response

相关 Logs

═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
                                                      COMMISSION                                                       
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
2022-12-27 18:57:57.567 | INFO | [Screen_size] 1280x720                                                                
2022-12-27 18:57:57.572 | ERROR | OSError: [Errno 22] Invalid argument                                                 
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│                                                                                                                     │
│ E:\AzurLaneAutoScript\alas.py:62 in run                                                                             │
│                                                                                                                     │
│    59 │                                                                                                             │
│    60 │   def run(self, command):                                                                                   │
│    61 │   │   try:                                                                                                  │
│ >  62 │   │   │   self.device.screenshot()                                                                          │
│    63 │   │   │   self.__getattribute__(command)()                                                                  │
│    64 │   │   │   return True                                                                                       │
│    65 │   │   except TaskEnd:                                                                                       │
│                                                                                                                     │
│ ┌───────────────────────────── locals ─────────────────────────────┐                                                │
│ │ command = 'commission'                                           │                                                │
│ │       e = OSError(22, 'Invalid argument')                        │                                                │
│ │    self = <alas.AzurLaneAutoScript object at 0x00000216CB583D88> │                                                │
│ └──────────────────────────────────────────────────────────────────┘                                                │
│ E:\AzurLaneAutoScript\module\device\device.py:62 in screenshot                                                      │
│                                                                                                                     │
│    59 │   │   │   np.ndarray:                                                                                       │
│    60 │   │   """                                                                                                   │
│    61 │   │   self.stuck_record_check()                                                                             │
│ >  62 │   │   super().screenshot()                                                                                  │
│    63 │   │   if self.handle_night_commission():                                                                    │
│    64 │   │   │   super().screenshot()                                                                              │
│    65                                                                                                               │
│                                                                                                                     │
│ ┌──────────────────────────────── locals ────────────────────────────────┐                                          │
│ │ __class__ = <class 'module.device.device.Device'>                      │                                          │
│ │      self = <module.device.device.Device object at 0x00000216CCFD51C8> │                                          │
│ └────────────────────────────────────────────────────────────────────────┘                                          │
│                                                                                                                     │
│ E:\AzurLaneAutoScript\module\base\timer.py:13 in function_timer                                                     │
│                                                                                                                     │
│    10 │   │                                                                                                         │
│    11 │   │   result = function(*args, **kwargs)                                                                    │
│    12 │   │   t1 = time.time()                                                                                      │
│ >  13 │   │   print('%s: %s s' % (function.__name__, str(round(t1 - t0, 10))))                                      │
│    14 │   │   return result                                                                                         │
│    15 │                                                                                                             │
│    16 │   return function_timer                                                                                     │
│                                                                                                                     │
│ ┌───────────────────────────────── locals ─────────────────────────────────┐                                        │
│ │     args = (<module.device.device.Device object at 0x00000216CCFD51C8>,) │                                        │
│ │ function = <function Screenshot.screenshot at 0x00000216EF67C5E8>        │                                        │
│ │   kwargs = {}                                                            │                                        │
│ │   result = array([[[41, 48, 49],                                         │                                        │
│ │            │   │   [41, 44, 41],                                         │                                        │
│ │            │   │   [33, 40, 41],                                         │                                        │
│ │            │   │   ...,                                                  │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8,  8,  8]],                                        │                                        │
│ │            │                                                             │                                        │
│ │            │      [[41, 48, 57],                                         │                                        │
│ │            │   │   [41, 44, 49],                                         │                                        │
│ │            │   │   [41, 44, 49],                                         │                                        │
│ │            │   │   ...,                                                  │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8,  8,  8]],                                        │                                        │
│ │            │                                                             │                                        │
│ │            │      [[41, 48, 49],                                         │                                        │
│ │            │   │   [41, 44, 49],                                         │                                        │
│ │            │   │   [33, 44, 49],                                         │                                        │
│ │            │   │   ...,                                                  │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8,  8,  8]],                                        │                                        │
│ │            │                                                             │                                        │
│ │            │      ...,                                                   │                                        │
│ │            │                                                             │                                        │
│ │            │      [[ 8, 12,  8],                                         │                                        │
│ │            │   │   [ 8, 12,  8],                                         │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   ...,                                                  │                                        │
│ │            │   │   [ 8, 12,  8],                                         │                                        │
│ │            │   │   [ 8, 12,  8],                                         │                                        │
│ │            │   │   [ 8, 12,  8]],                                        │                                        │
│ │            │                                                             │                                        │
│ │            │      [[ 8, 12,  8],                                         │                                        │
│ │            │   │   [ 8, 12,  8],                                         │                                        │
│ │            │   │   [ 8, 12,  8],                                         │                                        │
│ │            │   │   ...,                                                  │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8, 12,  8],                                         │                                        │
│ │            │   │   [ 8, 12,  8]],                                        │                                        │
│ │            │                                                             │                                        │
│ │            │      [[ 8, 12,  8],                                         │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8, 12,  8],                                         │                                        │
│ │            │   │   ...,                                                  │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8,  8,  8],                                         │                                        │
│ │            │   │   [ 8, 12,  8]]], dtype=uint8)                          │                                        │
│ │       t0 = 1672138677.127702                                             │                                        │
│ │       t1 = 1672138677.5726807                                            │                                        │
│ └──────────────────────────────────────────────────────────────────────────┘                                        │
│                                                                                                                     │
│ E:\AzurLaneAutoScript\toolkit\lib\site-packages\colorama\ansitowin32.py:47 in write                                 │
│                                                                                                                     │
│    44 │   │   return self.__dict__                                                                                  │
│    45 │                                                                                                             │
│    46 │   def write(self, text):                                                                                    │
│ >  47 │   │   self.__convertor.write(text)                                                                          │
│    48 │                                                                                                             │
│    49 │   def isatty(self):                                                                                         │
│    50 │   │   stream = self.__wrapped                                                                               │
│                                                                                                                     │
│ ┌───────────────────────────────── locals ─────────────────────────────────┐                                        │
│ │ self = <colorama.ansitowin32.StreamWrapper object at 0x00000216EF507FC8> │                                        │
│ │ text = 'screenshot: 0.444978714 s'                                       │                                        │
│ └──────────────────────────────────────────────────────────────────────────┘                                        │
│                                                                                                                     │
│ E:\AzurLaneAutoScript\toolkit\lib\site-packages\colorama\ansitowin32.py:170 in write                                │
│                                                                                                                     │
│   167 │                                                                                                             │
│   168 │   def write(self, text):                                                                                    │
│   169 │   │   if self.strip or self.convert:                                                                        │
│ > 170 │   │   │   self.write_and_convert(text)                                                                      │
│   171 │   │   else:                                                                                                 │
│   172 │   │   │   self.wrapped.write(text)                                                                          │
│   173 │   │   │   self.wrapped.flush()                                                                              │
│                                                                                                                     │
│ ┌──────────────────────────────── locals ────────────────────────────────┐                                          │
│ │ self = <colorama.ansitowin32.AnsiToWin32 object at 0x00000216EF501288> │                                          │
│ │ text = 'screenshot: 0.444978714 s'                                     │                                          │
│ └────────────────────────────────────────────────────────────────────────┘                                          │
│                                                                                                                     │
│ E:\AzurLaneAutoScript\toolkit\lib\site-packages\colorama\ansitowin32.py:198 in write_and_convert                    │
│                                                                                                                     │
│   195 │   │   │   self.write_plain_text(text, cursor, start)                                                        │
│   196 │   │   │   self.convert_ansi(*match.groups())                                                                │
│   197 │   │   │   cursor = end                                                                                      │
│ > 198 │   │   self.write_plain_text(text, cursor, len(text))                                                        │
│   199 │                                                                                                             │
│   200 │                                                                                                             │
│   201 │   def write_plain_text(self, text, start, end):                                                             │
│                                                                                                                     │
│ ┌───────────────────────────────── locals ─────────────────────────────────┐                                        │
│ │ cursor = 0                                                               │                                        │
│ │   self = <colorama.ansitowin32.AnsiToWin32 object at 0x00000216EF501288> │                                        │
│ │   text = 'screenshot: 0.444978714 s'                                     │                                        │
│ └──────────────────────────────────────────────────────────────────────────┘                                        │
│                                                                                                                     │
│ E:\AzurLaneAutoScript\toolkit\lib\site-packages\colorama\ansitowin32.py:204 in write_plain_text                     │
│                                                                                                                     │
│   201 │   def write_plain_text(self, text, start, end):                                                             │
│   202 │   │   if start < end:                                                                                       │
│   203 │   │   │   self.wrapped.write(text[start:end])                                                               │
│ > 204 │   │   │   self.wrapped.flush()                                                                              │
│   205 │                                                                                                             │
│   206 │                                                                                                             │
│   207 │   def convert_ansi(self, paramstring, command):                                                             │
│                                                                                                                     │
│ ┌──────────────────────────────── locals ─────────────────────────────────┐                                         │
│ │   end = 25                                                              │                                         │
│ │  self = <colorama.ansitowin32.AnsiToWin32 object at 0x00000216EF501288> │                                         │
│ │ start = 0                                                               │                                         │
│ │  text = 'screenshot: 0.444978714 s'                                     │                                         │
│ └─────────────────────────────────────────────────────────────────────────┘                                         │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
OSError: [Errno 22] Invalid argument                                                                                   
2022-12-27 18:57:57.939 | WARNING | Saving error: ./log/error/1672138677939                                            






═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
                                                         START                                                         
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
2022-12-27 20:07:30.424 | INFO | <<< WEBUI CONFIGS >>>                                                                 
2022-12-27 20:07:30.428 | INFO | [Theme] dark                                                                          
2022-12-27 20:07:30.430 | INFO | [Language] zh-CN                                                                      
2022-12-27 20:07:30.432 | INFO | [Password] False                                                                      
2022-12-27 20:07:30.433 | INFO | [CDN] False                                                                           
2022-12-27 20:07:30.435 | INFO | [Electron] True                                                                       
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
                                                         START                                                         
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
2022-12-27 20:07:30.619 | INFO | Add task <check_update (delay=300)>                                                   
2022-12-27 20:07:30.621 | INFO | Add task <schedule_update (delay=86400)>                                              
2022-12-27 20:07:30.623 | INFO | Start task handler                                                                    
2022-12-27 20:07:30.625 | INFO | "E:/AzurLaneAutoScript/toolkit/Git/mingw64/bin/git.exe" fetch origin master           
2022-12-27 20:07:30.626 | INFO | <<< RESTART ALAS >>>                                                                  
2022-12-27 20:07:30.629 | INFO | Start alas complete                                                                   
2022-12-27 20:07:31.251 | INFO | [Server] cn                                                                           
2022-12-27 20:07:31.262 | INFO | Using template config, which is read only                                             
2022-12-27 20:07:31.383 | INFO | [ success ]                                                                           
2022-12-27 20:07:31.469 | INFO | No update                                                                             
2022-12-27 20:07:31.513 | INFO | Init config watcher done.                                                             
2022-12-27 20:07:31.772 | INFO | Init config watcher done.                                                             
2022-12-27 20:07:31.774 | INFO | Add task <Switch_state_refresh (delay=2)>                                             
2022-12-27 20:07:31.775 | INFO | Add task <Switch_visibility_state_refresh (delay=15)>                                 
2022-12-27 20:07:31.778 | INFO | Add task <Switch_update_state_refresh (delay=1)>                                      
2022-12-27 20:07:31.781 | INFO | Start task handler                                                                    
2022-12-27 20:07:33.905 | INFO | [Server] cn                                                                           
2022-12-27 20:07:33.921 | INFO | Bind task {'', 'Alas', 'General'}                                                     
2022-12-27 20:07:34.131 | INFO | Init config watcher done.                                                             
2022-12-27 20:07:34.237 | INFO | Add task <Switch_scheduler_btn_refresh (delay=1)>                                     
2022-12-27 20:07:34.239 | INFO | Add task <Switch_log_scroll_btn_refresh (delay=1)>                                    
2022-12-27 20:07:34.242 | INFO | Add task <alas_update_overview_task (delay=10)>                                       
2022-12-27 20:07:34.245 | INFO | Add task <put_log (delay=0.25)>                                                       
2022-12-27 20:07:36.434 | INFO | Task <Switch_scheduler_btn_refresh (delay=1)> removed.                                
2022-12-27 20:07:36.447 | INFO | Task <Switch_log_scroll_btn_refresh (delay=1)> removed.                               
2022-12-27 20:07:36.451 | INFO | Task <alas_update_overview_task (delay=10)> removed.                                  
2022-12-27 20:07:36.455 | INFO | Task <put_log (delay=0.25)> removed.                                                  
2022-12-27 20:07:36.479 | INFO | End of task handler loop                                                              
2022-12-27 20:07:36.485 | INFO | Finish task handler

截图

No response

还有别的吗?

No response

LspColor avatar Dec 27 '22 12:12 LspColor

重新启动程序和电脑未能解决问题

LspColor avatar Dec 27 '22 12:12 LspColor

这确实是个很奇怪的问题,总之先试试把杀毒软件都关了

SaiCateDoan avatar Dec 27 '22 12:12 SaiCateDoan

如果未能解决问题,可以提供一下更多的log,我需要检查这个错误是发生在固定位置还是随机发生

SaiCateDoan avatar Dec 27 '22 13:12 SaiCateDoan

今天睡觉前试了试,原因好像是由于一个游戏监控软件(游戏加加)导致的,我把它关闭后以上问题就解决了,log的话我不知道如何提供更多。

LspColor avatar Dec 27 '22 16:12 LspColor

但是在出现这个问题前我也是一直在使用这个软件(并没有更新之类的调试)莫名奇妙的

LspColor avatar Dec 27 '22 16:12 LspColor