Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instacrash on hu-HU localized Windows #126

Closed
MathiasMagnus opened this issue Aug 22, 2023 · 2 comments
Closed

Instacrash on hu-HU localized Windows #126

MathiasMagnus opened this issue Aug 22, 2023 · 2 comments

Comments

@MathiasMagnus
Copy link

When run on a hu-HU (Hungarian) localized Windows, the command-line tool instacrashes with the following stack trace:

PS C:\Users\mate> amdsmi.exe
Traceback (most recent call last):
  File "main.py", line 25, in <module>
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "exceptions.py", line 22, in <module>
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "amdsmi_import\__init__.py", line 26, in <module>
  File "settings.py", line 93, in initGlobalSettings
  File "settings.py", line 33, in __init__
  File "utils.py", line 198, in get_platform_desc
  File "subprocess.py", line 550, in run
  File "subprocess.py", line 1194, in communicate
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 32: invalid start byte
[6364] Failed to execute script 'main' due to unhandled exception!

Hex 0x82 in decimal is ASCII 130, which is the letter "á", likely picked up from my name, Máté, but who knows. When changing the display language to en-US it doesn't crash. (It simply fails to return any devices.)

@MathiasMagnus
Copy link
Author

I tried tracking down the issue, but the pyInstaller compiled stack trace isn't very informative, and my attempts at decompiling them have failed, the decompiler even though it supports Python 3.11 doesn't know an opcode in the decompiled bytecode.

PS C:\Users\mate\amdsmi.exe_extracted> C:\Users\mate\Source\Repos\pycdc\.vscode\build\Release\pycdc.exe .\main.pyc
# Source Generated with Decompyle++
# File: main.pyc (Python 3.11)

Unsupported opcode: POP_JUMP_FORWARD_IF_FALSE
import sys
import re
from exceptions import *
from command import *
from device import *
import settings

def parse_gpu_index(index):
Error decompyling .\main.pyc: invalid vector subscript

If the stack trace were from the original script, I may be able to do more, or if someone tells me how to run the tools before it's packaged as an executable.

@dmitrii-galantsev
Copy link
Collaborator

We don't support windows afaik. I personally never tested it on windows. And I know other devs don't test it on windows.
Out of curiosity - why is it called amdsmi.exe?
Are you compiling it yourself?
Can be confused with https://github.com/RadeonOpenCompute/amdsmi .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants