LmeSzinc / AzurLaneAutoScript

Azur Lane bot (CN/EN/JP/TW) 碧蓝航线脚本 | 无缝委托科研,全自动大世界
https://alas.azurlane.cloud
GNU General Public License v3.0
6.73k stars 793 forks source link

运行随机时间后adb必报错 #4150

Open sadmiroir opened 2 weeks ago

sadmiroir commented 2 weeks ago

在提问之前...

描述你的问题

这问题真不是一天两天了,自从八月中旬某天更新了以后基本上每隔几个小时就会莫名报错卡死找不到模拟器只能靠手动重启解决。而且这个报错时间是不定的有可能一两个小时也有可能四五个小时才出现。模拟器本身也看不出有任何问题也重装过,但是就是会突然找不到模拟器导致报错 log.zip

如何复现

  1. 前往 '...'
  2. 点击 '....'
  3. 滑动到 '....'
  4. 出现问题

预期行为

No response

相关 Logs

═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
                                                        RESTART                                                        
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
2024-09-04 07:28:39.841 | INFO | <<< APP RESTART >>>                                                                   
2024-09-04 07:28:39.843 | INFO | App stop: com.YoStarJP.AzurLane                                                       
2024-09-04 07:28:40.593 | INFO | App start: com.YoStarJP.AzurLane                                                      
2024-09-04 07:28:41.210 | INFO | <<< APP LOGIN >>>                                                                     
2024-09-04 07:28:41.253 | INFO | [Device Orientation] 0 (Normal)                                                       
2024-09-04 07:28:46.412 | INFO | [Device Orientation] 0 (Normal)                                                       
2024-09-04 07:28:51.656 | INFO | [Device Orientation] 0 (Normal)                                                       
2024-09-04 07:28:53.465 | ERROR | LZ4BlockError: Decompression failed: corrupt input or insufficient space in          
destination buffer. Error code: 450536                                                                                 
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\device\method\ascreencap.py:32 in retry_wrapper                                        │
│                                                                                                                     │
│    29 │   │   │   │   if callable(init):                                                                            │
│    30 │   │   │   │   │   retry_sleep(_)                                                                            │
│    31 │   │   │   │   │   init()                                                                                    │
│ >  32 │   │   │   │   return func(self, *args, **kwargs)                                                            │
│    33 │   │   │   # Can't handle                                                                                    │
│    34 │   │   │   except RequestHumanTakeover:                                                                      │
│    35 │   │   │   │   break                                                                                         │
│                                                                                                                     │
│ ┌──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────┐ │
│ │      _ = 0                                                                                                      │ │
│ │   args = ()                                                                                                     │ │
│ │      e = LZ4BlockError('Decompression failed: corrupt input or insufficient space in destination buffer. Error  │ │
│ │          code: 450536')                                                                                         │ │
│ │   func = <function AScreenCap.screenshot_ascreencap_nc at 0x0000024AFF6C0678>                                   │ │
│ │   init = None                                                                                                   │ │
│ │ kwargs = {}                                                                                                     │ │
│ │   self = <module.device.device.Device object at 0x0000024ADBF0E888>                                             │ │
│ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ D:\AzurLaneAutoScript\module\device\method\ascreencap.py:210 in screenshot_ascreencap_nc                            │
│                                                                                                                     │
│   207 │   │   if len(data) < 500:                                                                                   │
│   208 │   │   │   logger.warning(f'Unexpected screenshot: {data}')                                                  │
│   209 │   │                                                                                                         │
│ > 210 │   │   return self.__uncompress(data)                                                                        │
│   211                                                                                                               │
│                                                                                                                     │
│ ┌──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────┐ │
│ │ data = b'BMZ160*\x00\xd5\xb4\x0e\x00\x00\x05\x00\x00\xd0\x02\x00\x00\xfe\x15BM60*\x00\x00\x00\x00\x006\x00\x00… │ │
│ │ self = <module.device.device.Device object at 0x0000024ADBF0E888>                                               │ │
│ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\device\method\ascreencap.py:159 in __uncompress                                        │
│                                                                                                                     │
│   156 │   │                                                                                                         │
│   157 │   │   _, uncompressed_size, _, width, height = compressed_data_header                                       │
│   158 │   │   channel = 3                                                                                           │
│ > 159 │   │   data = lz4.block.decompress(raw_compressed_data[20:],                                                 │
│       uncompressed_size=uncompressed_size)                                                                          │
│   160 │   │                                                                                                         │
│   161 │   │   image = np.frombuffer(data, dtype=np.uint8)                                                           │
│   162 │   │   if image is None:                                                                                     │
│                                                                                                                     │
│ ┌──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────┐ │
│ │                      _ = 963797                                                                                 │ │
│ │                channel = 3                                                                                      │ │
│ │ compressed_data_header = array([828001602,   2764854,    963797,      1280,       720],                         │ │
│ │                          │     dtype=uint32)                                                                    │ │
│ │                 height = 720                                                                                    │ │
│ │    raw_compressed_data = b'BMZ160*\x00\xd5\xb4\x0e\x00\x00\x05\x00\x00\xd0\x02\x00\x00\xfe\x15BM60*\x00\x00\x0… │ │
│ │             screenshot = b'BMZ160*\x00\xd5\xb4\x0e\x00\x00\x05\x00\x00\xd0\x02\x00\x00\xfe\x15BM60*\x00\x00\x0… │ │
│ │                   self = <module.device.device.Device object at 0x0000024ADBF0E888>                             │ │
│ │      uncompressed_size = 2764854                                                                                │ │
│ │                  width = 1280                                                                                   │ │
│ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
LZ4BlockError: Decompression failed: corrupt input or insufficient space in destination buffer. Error code: 450536     
2024-09-04 07:28:54.605 | WARNING | Unexpected screenshot: b''                                                         
2024-09-04 07:28:54.606 | WARNING | Repositioning byte pointer failed, corrupted aScreenCap data received              
2024-09-04 07:28:54.607 | WARNING | Unexpected screenshot: b''                                                         
2024-09-04 07:28:54.608 | ERROR | AscreencapError: Repositioning byte pointer failed, corrupted aScreenCap data        
received                                                                                                               
2024-09-04 07:28:54.609 | INFO | <<< ASCREENCAP INIT >>>                                                               
2024-09-04 07:28:54.610 | INFO | cpu_arc: x86, sdk_ver: 25                                                             
2024-09-04 07:28:54.612 | INFO | pushing ./bin/ascreencap\Android_5.x-7.x\x86\ascreencap                               
2024-09-04 07:28:54.612 | INFO | Execute:                                                                              
['D:\\AzurLaneAutoScript\\toolkit\\Lib\\site-packages\\adbutils\\binaries\\adb.exe', '-s', '127.0.0.1:62001', 'push',  
'./bin/ascreencap\\Android_5.x-7.x\\x86\\ascreencap', '/data/local/tmp/ascreencap']                                    
2024-09-04 07:28:54.836 | INFO | chmod 0777 /data/local/tmp/ascreencap                                                 
2024-09-04 07:28:55.657 | WARNING | Unexpected screenshot: b''                                                         
2024-09-04 07:28:55.658 | WARNING | Repositioning byte pointer failed, corrupted aScreenCap data received              
2024-09-04 07:28:55.659 | WARNING | Unexpected screenshot: b''                                                         
2024-09-04 07:28:55.659 | ERROR | AscreencapError: Repositioning byte pointer failed, corrupted aScreenCap data        
received                                                                                                               
2024-09-04 07:28:55.661 | INFO | <<< ASCREENCAP INIT >>>                                                               
2024-09-04 07:28:55.662 | INFO | cpu_arc: x86, sdk_ver: 25                                                             
2024-09-04 07:28:55.663 | INFO | pushing ./bin/ascreencap\Android_5.x-7.x\x86\ascreencap                               
2024-09-04 07:28:55.664 | INFO | Execute:                                                                              
['D:\\AzurLaneAutoScript\\toolkit\\Lib\\site-packages\\adbutils\\binaries\\adb.exe', '-s', '127.0.0.1:62001', 'push',  
'./bin/ascreencap\\Android_5.x-7.x\\x86\\ascreencap', '/data/local/tmp/ascreencap']                                    
2024-09-04 07:28:55.758 | INFO | chmod 0777 /data/local/tmp/ascreencap                                                 
2024-09-04 07:29:01.269 | WARNING | b''                                                                                
2024-09-04 07:29:01.270 | ERROR | AdbTimeout: reverse server accept timeout                                            
2024-09-04 07:29:01.275 | INFO | disconnected 127.0.0.1:62001                                                          
2024-09-04 07:29:01.286 | INFO | connected to 127.0.0.1:62001                                                          
2024-09-04 07:29:01.287 | INFO | <<< DETECT DEVICE >>>                                                                 
2024-09-04 07:29:01.288 | INFO | Here are the available devices, copy to Alas.Emulator.Serial to use it or set         
Alas.Emulator.Serial="auto"                                                                                            
2024-09-04 07:29:01.291 | INFO | 127.0.0.1:62001                                                                       
2024-09-04 07:29:01.292 | INFO | Connecting to local emulator, using host 192.168.50.53                                
2024-09-04 07:29:01.293 | INFO | Reverse server listening on 192.168.50.53:20630, client can send data to              
192.168.50.53:20630                                                                                                    
2024-09-04 07:29:06.298 | WARNING | b'Killed \n'                                                                       
2024-09-04 07:29:06.299 | ERROR | AdbTimeout: reverse server accept timeout                                            
2024-09-04 07:29:07.303 | INFO | disconnected 127.0.0.1:62001                                                          
2024-09-04 07:29:17.307 | INFO | failed to connect to 127.0.0.1:62001                                                  
2024-09-04 07:29:17.310 | INFO | already connected to 127.0.0.1:62001                                                  
2024-09-04 07:29:17.311 | INFO | <<< DETECT DEVICE >>>                                                                 
2024-09-04 07:29:17.312 | INFO | Here are the available devices, copy to Alas.Emulator.Serial to use it or set         
Alas.Emulator.Serial="auto"

截图

No response

还有别的吗?

相关log已打包,基本看最后一段就是了都是基本完全一样的错误

weeswelai commented 2 weeks ago

3550

sadmiroir commented 1 week ago

昨天更新后这个问题更严重了,基本一两个小时必出错一次 2024-09-13_gui.txt 2024-09-13_alas.txt