cannot decode Clash Royale sc files
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with xcoder/features/sc/decode.py and xcoder/features/cut_sprites.py, especially render_objects where the traceback shows the failure while saving shape 0. Reproduce with 55_CannoneerTaunt_FG.sc and inspect the generated shape dimensions; done means the SC file is processed without the Pillow crash and the expected sprite output is produced.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
what I did:
- placed
55_CannoneerTaunt_FG.scfrom Clash Royale apk intoIn-Compressed, then ran the program.
=> choosing1does nothing, choosing3crashes. (logs below in code tags) - I also placed the same file into
In-Decompressed
=> choosing1or3does nothing. - I tried with other SC files from the same apk too.
-----------------------------------------------------------------------------------------------------------------------
Your choice: 1
-----------------------------------------------------------------------------------------------------------------------
[INFO] Completed in 0.00 seconds!
Press Enter to continue...
-----------------------------------------------------------------------------------------------------------------------
Your choice: 3
-----------------------------------------------------------------------------------------------------------------------
[INFO] File: 55_CannoneerTaunt_FG.sc. Collecting information...
[INFO] ZSTD compression detected
[0%] Cutting sprites... (1/208)[ERROR] ERROR! (builtins.SystemError: tile cannot extend outside image)
Traceback (most recent call last):
File "C:\Users\<username>\AppData\Local\pypoetry\Cache\virtualenvs\xcoder-bYim4_8o-py3.13\Lib\site-packages\PIL\ImageFile.py", line 643, in _save
fh = fp.fileno()
└ <PIL.PngImagePlugin._idat object at 0x000002207B92ABA0>
AttributeError: '_idat' object has no attribute 'fileno'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\src\XCoder-2.7.6\xcoder\__main__.py", line 44, in <module>
main()
└ <function main at 0x000002207AE3A200>
File "C:\src\XCoder-2.7.6\xcoder\__main__.py", line 34, in main
handler()
└ <function decode_and_render_objects at 0x000002207B86DEE0>
> File "C:\src\XCoder-2.7.6\xcoder\features\sc\decode.py", line 78, in decode_and_render_objects
render_objects(swf, objects_output_folder)
│ │ └ WindowsPath('SC/Out-Sprites/55_CannoneerTaunt_FG')
│ └ <xcoder.swf.SupercellSWF object at 0x000002207B929400>
└ <function render_objects at 0x000002207B86DF80>
File "C:\src\XCoder-2.7.6\xcoder\features\cut_sprites.py", line 46, in render_objects
rendered_shape.save(f"{output_folder}/shapes/{shape.id}.png")
│ │ │ │ └ 0
│ │ │ └ <xcoder.objects.shape.shape.Shape object at 0x000002207B929A90>
│ │ └ WindowsPath('SC/Out-Sprites/55_CannoneerTaunt_FG')
│ └ <function Image.save at 0x000002207B8BA8E0>
└ <PIL.Image.Image image mode=RGBA size=0x0 at 0x2207B927390>
File "C:\Users\<username>\AppData\Local\pypoetry\Cache\virtualenvs\xcoder-bYim4_8o-py3.13\Lib\site-packages\PIL\Image.py", line 2581, in save
save_handler(self, fp, filename)
│ │ │ └ 'SC\\Out-Sprites\\55_CannoneerTaunt_FG/shapes/0.png'
│ │ └ <_io.BufferedRandom name='SC\\Out-Sprites\\55_CannoneerTaunt_FG/shapes/0.png'>
│ └ <PIL.Image.Image image mode=RGBA size=0x0 at 0x2207B927390>
└ <function _save at 0x000002207BA12B60>
File "C:\Users\<username>\AppData\Local\pypoetry\Cache\virtualenvs\xcoder-bYim4_8o-py3.13\Lib\site-packages\PIL\PngImagePlugin.py", line 1492, in _save
ImageFile._save(
│ └ <function _save at 0x000002207B87A200>
└ <module 'PIL.ImageFile' from 'C:\\Users\\<username>\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\xcoder-bYim4_8o-py3.13\\Lib\\...
File "C:\Users\<username>\AppData\Local\pypoetry\Cache\virtualenvs\xcoder-bYim4_8o-py3.13\Lib\site-packages\PIL\ImageFile.py", line 647, in _save
_encode_tile(im, fp, tile, bufsize, None, exc)
│ │ │ │ └ 65536
│ │ │ └ [_Tile(codec_name='zip', extents=(0, 0, 0, 0), offset=0, args='RGBA')]
│ │ └ <PIL.PngImagePlugin._idat object at 0x000002207B92ABA0>
│ └ <PIL.Image.Image image mode=RGBA size=0x0 at 0x2207B927390>
└ <function _encode_tile at 0x000002207B8A47C0>
File "C:\Users\<username>\AppData\Local\pypoetry\Cache\virtualenvs\xcoder-bYim4_8o-py3.13\Lib\site-packages\PIL\ImageFile.py", line 665, in _encode_tile
encoder.setimage(im.im, extents)
│ │ │ │ └ (0, 0, 0, 0)
│ │ │ └ <property object at 0x000002207B8B0F90>
│ │ └ <PIL.Image.Image image mode=RGBA size=0x0 at 0x2207B927390>
│ └ <method 'setimage' of 'ImagingEncoder' objects>
└ <ImagingEncoder object at 0x000002207AF97EA0>
SystemError: tile cannot extend outside image
[INFO] Completed in 0.27 seconds!
Press Enter to continue...
- Ngôn ngữ chính
- Python
- Star
- 80
- Fork
- 7
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của xcoder-tool/XCoder
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
xcoder-tool/XCoder#84 ·
-
problems executing scripts Đang mởquestion
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 32/100
xcoder-tool/XCoder#35 · 1 bình luận ·
-
enhancement
xcoder-tool/XCoder#2 · 1 người được giao ·
Tất cả issue của xcoder-tool/XCoder
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
zostera/django-bootstrap4#894 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3276 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#117848 ·