pythonnet: Using String.Format crashes inside pythonnet
Environment
- Pythonnet version: 3.x
- Python version: 3.8.10
- Operating System: Windows 11 64bit
- .NET Runtime: net6.0
Details
How to reproduce(with project Console.vsproj): @filmor
PythonEngine.Initialize();
PythonEngine.Exec("from System import String\nString.Format('{0},{1}', 1, 2)"); // crashes here
int i = Runtime.Py_Main(cmd.Length, cmd);
PythonEngine.Shutdown();
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (12 by maintainers)
Commits related to this issue
- support for BigInteger <-> PyInt fixes https://github.com/pythonnet/pythonnet/issues/1642#issuecomment-1058412759 — committed to losttech/pythonnet by lostmsu 2 years ago
- support for BigInteger <-> PyInt fixes https://github.com/pythonnet/pythonnet/issues/1642#issuecomment-1058412759 — committed to losttech/pythonnet by lostmsu 2 years ago
- make methods of PyObject inherited from its base C# classes GIL-safe fixes https://github.com/pythonnet/pythonnet/issues/1642 — committed to losttech/pythonnet by lostmsu 2 years ago
- make methods of PyObject inherited from its base C# classes GIL-safe fixes https://github.com/pythonnet/pythonnet/issues/1642 — committed to losttech/pythonnet by lostmsu 2 years ago
- make methods of PyObject inherited from its base C# classes GIL-safe fixes https://github.com/pythonnet/pythonnet/issues/1642 — committed to losttech/pythonnet by lostmsu 2 years ago
- make methods of PyObject inherited from its base C# classes GIL-safe fixes https://github.com/pythonnet/pythonnet/issues/1642 — committed to losttech/pythonnet by lostmsu 2 years ago
- make methods of PyObject inherited from its base C# classes GIL-safe fixes https://github.com/pythonnet/pythonnet/issues/1642 — committed to pythonnet/pythonnet by lostmsu 2 years ago
- support for BigInteger <-> PyInt (#1710) fixes https://github.com/pythonnet/pythonnet/issues/1642#issuecomment-1058412759 — committed to pythonnet/pythonnet by lostmsu 2 years ago
System.AccessViolationException: ‘Attempted to read or write protected memory. This is often an indication that other memory is corrupt.’ [External Code]