This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: OSError: exception: access violation writing <...> (Windows 10 x64, Python 3.5.1)
Type: behavior Stage: resolved
Components: ctypes, Windows Versions: Python 3.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eryksun, iritkatriel, jk, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2016-02-10 18:36 by jk, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg260030 - (view) Author: JK (jk) Date: 2016-02-10 18:36

I came across this mysterious bug the other week, and I haven't yet found any resolution to it. In my case, I am using a proprietary 3rd party C/C++ DLL for functionality within Python, however I've come across a few others who have run into the same issue with an open source project.

My traceback is essentially:

    return cppapi.DoSomething(hAlpha, pzString1, pzString2);
OSError: exception: access violation writing 0x00000000576EE908

However, you can see a very similar scenario taking place here too:

(However, I did not see a bug report filed here on behalf of them)

This MIGHT be related to but I am not certain.

msg375663 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-08-19 17:34
Access violation is a very general error which means that a bad pointer was dereferenced in c++. This can happen in many ways. You need to provide a way to reproduce this error in order to make this an actual bug report.

In your case, it is happening when you call a function in a third party library, which could mean that this library has a bug or that you are passing bad parameters to it.

If you cannot provide more information than what is here, this ticket should be closed on the basis that there is not enough information do anything about the issue.
msg378235 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-10-08 11:20
Should this be closed? There wasn't enough information 4 years ago and I can't imagine anything happening with this now.
msg378237 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2020-10-08 11:34
I see nothing to act on in this issue. A common cause of access violations with ctypes is truncated pointer values. There's a lot of sloppy ctypes code from the 32-bit era that assumes a C int can store a pointer.
Date User Action Args
2022-04-11 14:58:27adminsetgithub: 70520
2020-10-08 11:34:43eryksunsetstatus: open -> closed

type: behavior

nosy: + eryksun
messages: + msg378237
resolution: not a bug
stage: resolved
2020-10-08 11:20:30iritkatrielsetmessages: + msg378235
2020-08-19 17:34:17iritkatrielsetnosy: + iritkatriel
messages: + msg375663
2016-02-10 18:36:38jkcreate