henon / Python.Included

A Python.NET based framework enabling .NET libraries to call into Python packages without depending on a local Python installation.
MIT License
313 stars 51 forks source link

Crashes under Pandas memory-intensive load #38

Closed mihakralj closed 2 years ago

mihakralj commented 2 years ago

Pandas and Pandas-TA, this is what I get when running couple more intense calculations:

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:
--------------------------------
   at Python.Runtime.Runtime.PyObject_HasAttrString(IntPtr, System.String)
--------------------------------
   at Python.Runtime.Exceptions.Shutdown()
   at Python.Runtime.Runtime.Shutdown()
   at Python.Runtime.PythonEngine.ExecuteShutdownHandlers()
   at Python.Runtime.PythonEngine.Shutdown()
   at Validation.PandasTA.Finalize()

Running small/simple Python scripts works ok.

henon commented 2 years ago

Hi, Python.Included only provides a convenient installation mechanism of Pythonnet. Your issue is way beyond my knowledge of the internals of Pythonnet. Looks to me like a pointer error which is always extremely hard to debug. Sorry that I can't help you with this.