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

OSError: exception: access violation reading 0xFFFFFFFF9419E570 in windows 10 64bite #82

Open
EchoBlam opened this issue Jan 19, 2024 · 1 comment

Comments

@EchoBlam
Copy link

D:\Programs\Python\Python37\python.exe -B "C:/Program Files/JetBrains/PyCharm/plugins/python-ce/helpers/pydev/pydevd.py" --multiprocess --qt-support=auto --client 127.0.0.1 --port 54854 --file C:\Users\lenovo\Desktop\toxygen-master\toxygen\main.py
Connected to pydev debugger (build 233.13135.95)
C:\Users\lenovo\Desktop\toxygen-master\toxygen
Traceback (most recent call last):
File "C:/Program Files/JetBrains/PyCharm/plugins/python-ce/helpers/pydev/pydevd.py", line 1534, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:\Users\lenovo\Desktop\toxygen-master\toxygen\main.py", line 487, in
main()
File "C:\Users\lenovo\Desktop\toxygen-master\toxygen\main.py", line 483, in main
toxygen.main()
File "C:\Users\lenovo\Desktop\toxygen-master\toxygen\main.py", line 108, in main
self.tox.self_set_name(bytes(_login.name, 'utf-8') if _login.name else b'Toxygen User')
File "C:\Users\lenovo\Desktop\toxygen-master\toxygen\tox.py", line 356, in self_set_name
c_size_t(len(name)), byref(tox_err_set_info))
OSError: exception: access violation reading 0xFFFFFFFF9419E570

@EchoBlam EchoBlam changed the title OSError: exception: access violation reading 0xFFFFFFFF9419E570 on windows 10 OSError: exception: access violation reading 0xFFFFFFFF9419E570 in windows 10 64bite Jan 19, 2024
@andrewlytvyn
Copy link

The error message you're seeing is an access violation, which usually occurs when your program tries to read or write to a part of memory that it shouldn't be accessing. This is often due to issues like passing invalid pointers or incorrect data types to low-level functions, particularly when dealing with C extensions or interfacing with libraries like tox in Python.

Here's a breakdown of possible causes and solutions:

1. Incorrect Pointer or Memory Handling:

  • The self_set_name method in tox.py is likely calling a C function through a Python binding. If the name variable or the tox_err_set_info reference is incorrect (for example, an invalid memory address or size mismatch), this can cause the access violation.
  • Double-check how name is being constructed and passed to c_size_t and byref. Ensure that name is valid and properly encoded as bytes.

2. Version Compatibility:

  • There might be a mismatch between the versions of the tox library you are using and your Python version. Ensure that the tox library is fully compatible with Python 3.7.
  • Try updating the tox library or Python version to see if the issue persists.

3. Platform-Specific Issues:

  • This problem could be platform-specific (e.g., occurring only on Windows). You can check for known issues on the library's GitHub or other forums.
  • If possible, try running the same code on a different operating system to see if the issue is platform-related.

4. Debugging Steps:

  • Print Debug Information: Add print statements before the line causing the issue to print out the name and the result of len(name).
  • Isolation: Try isolating the code that sets the name in a small script to see if you can reproduce the issue independently of the rest of the program.

Example Fix:

If the issue is related to the name being passed as a string when a different type is expected, you might need to correct how you're handling name:

name = _login.name.encode('utf-8') if _login.name else b'Toxygen User'
self.tox.self_set_name(name)

If this doesn't help, then the problem might be deeper in the tox library or its integration with your code, and additional debugging or even inspecting the tox source code might be necessary.

Final Step:

If none of these solutions work, consider reaching out to the maintainers of the tox library or searching for similar issues on platforms like GitHub or Stack Overflow. Providing them with the details of your environment (Python version, tox version, OS) will help diagnose the issue faster.

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