- Notifications
You must be signed in to change notification settings - Fork757
Closed
Milestone
Description
Environment
- Pythonnet version: 3.0.0-preview2021-12-25
- Python version: 3.9.10
- Operating System: Windows 10
- .NET Runtime: 4.7.2
Details
- Describe what you were trying to get done.
Embed python into C# using 32bit python.
- What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
Example assumespython3.9.10 32bit embed to be extracted to./python
Python.Runtime.Runtime.PythonDLL="./python/python39.dll";Python.Runtime.PythonEngine.PythonHome=./python/python39.dll;Python.Runtime.PythonEngine.PythonPath=$"{PythonEngine.PythonPath}{Path.PathSeparator}.";Python.Runtime.PythonEngine.Initialize();
Last line causes an access violation after preview2021-12-25 (preview2021-12-03 works).
python3.9.10 64bit embed version of python does not cause the same issue.
- If there was a crash, please include the traceback here.
System.AccessViolationException: Attempted to read or write protected memory.Thisisoften an indication that othermemoryiscorrupt.atPython.Runtime.Runtime.PyType_FromSpecWithBases(NativeTypeSpec&spec,BorrowedReferencebases) at Python.Runtime.PyType.FromSpec(TypeSpecspec,PyTuplebases) at Python.Runtime.TypeManager.CreateMetatypeWithGCHandleOffset() at Python.Runtime.TypeManager.CreateMetaType(Typeimpl,SlotsHolder&slotsHolder) at Python.Runtime.MetaType.Initialize() at Python.Runtime.Runtime.Initialize(BooleaninitSigs) at Python.Runtime.PythonEngine.Initialize(IEnumerable`1args,BooleansetSysArgv,BooleaninitSigs) at Python.Runtime.PythonEngine.Initialize()
Metadata
Metadata
Assignees
Labels
No labels