Memory Access Violation - Python Net 3.0.2 - Multi-threaded Dot Net application #2444
Unanswered
crazyoutlook
asked this question in
Q&A
Replies: 2 comments
-
Hello Team, please guide me with this issue, provide some insights on how to resolve this issue. Can we do multithreading? As of now I am using SINGETON class to create only 1 object of python net. And I am using that object to make all AI Model calls. |
Beta Was this translation helpful? Give feedback.
0 replies
-
同样遇到了这个问题,多线程能力弱鸡 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Environment
Details
Running multi-threaded process in Dot net using Pythonet. I have a dot net application which used Pythonnet to invoke some python methods. As long as I am running single threaded process of my application it works fine. When I run multi-threaded application then I am getting error in Pythonnet.
Fatal error. System.AcccessViolationExcepriom: Attempted to read or write protected memory. This is often an indication that other memory is corrupt:
at Python.runtime.Runtime.PyErr_Clear()
at Python.runtime.Exception.PyErr_Clear()
at Python.Runtime.PythonEngine,Initialize(System.Collection.Generic.IEnumerable 1<System.String>
Minimal, Complete, and Verifiable example
this will help us understand the issue.
Running multi-threaded process in Dot net using Pythonet.
Fatal error. System.AcccessViolationExcepriom: Attempted to read or write protected memory. This is often an indication that other memory is corrupt:
at Python.runtime.Runtime.PyErr_Clear()
at Python.runtime.Exception.PyErr_Clear()
at Python.Runtime.PythonEngine,Initialize(System.Collection.Generic.IEnumerable 1<System.String>
Beta Was this translation helpful? Give feedback.
All reactions