Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird recursive issue in startup #2224

Open
filmor opened this issue Aug 17, 2023 · 0 comments
Open

Weird recursive issue in startup #2224

filmor opened this issue Aug 17, 2023 · 0 comments
Labels

Comments

@filmor
Copy link
Member

filmor commented Aug 17, 2023

I'll have to find out whether I can reproduce this, but we are seeing this great error in startup/shutdown in production (Windows, .NET Framework, x64, pythonnet 3.0.1):

Failed to initialize pythonnet: System.NullReferenceException: Object reference not set to an instance of an object.
   at Python.Runtime.ImportHook.UpdateCLRModuleDict()
   at Python.Runtime.ImportHook.GetCLRModule()
   at Python.Runtime.PythonEngine.InitExt()
   at Python.Runtime.Loader.Initialize(IntPtr data, Int32 size)
   at Python.Runtime.ImportHook.UpdateCLRModuleDict()
   at Python.Runtime.ImportHook.GetCLRModule()
   at Python.Runtime.PythonEngine.InitExt()
   at Python.Runtime.Loader.Initialize(IntPtr data, Int32 size)
Failed to shutdown pythonnet: System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Python.Runtime.PythonException.TryDecodePyErr(BorrowedReference typeRef, BorrowedReference valRef, BorrowedReference tbRef)
   at Python.Runtime.PythonException.FetchCurrentOrNull(ExceptionDispatchInfo& dispatchInfo)
   at Python.Runtime.PythonException.ThrowLastAsClrException()
   at Python.Runtime.NewReferenceExtensions.BorrowOrThrow(NewReference& reference)
   at Python.Runtime.PyModule.Import(String name)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Python.Runtime.PythonException.TryDecodePyErr(BorrowedReference typeRef, BorrowedReference valRef, BorrowedReference tbRef)
   at Python.Runtime.PythonException.FetchCurrentOrNull(ExceptionDispatchInfo& dispatchInfo)
   at Python.Runtime.PythonException.ThrowLastAsClrException()
   at Python.Runtime.NewReferenceExtensions.BorrowOrThrow(NewReference& reference)
   at Python.Runtime.PyObject.ToString()
   at Python.Runtime.InternString.Shutdown()
   at Python.Runtime.Runtime.Shutdown()
   at Python.Runtime.PythonEngine.Shutdown()
   at Python.Runtime.Loader.Shutdown(IntPtr data, Int32 size)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Python.Runtime.PythonException.TryDecodePyErr(BorrowedReference typeRef, BorrowedReference valRef, BorrowedReference tbRef)
   at Python.Runtime.PythonException.FetchCurrentOrNull(ExceptionDispatchInfo& dispatchInfo)
   at Python.Runtime.PythonException.ThrowLastAsClrException()
   at Python.Runtime.NewReferenceExtensions.BorrowOrThrow(NewReference& reference)
   at Python.Runtime.PyModule.Import(String name)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Python.Runtime.PythonException.TryDecodePyErr(BorrowedReference typeRef, BorrowedReference valRef, BorrowedReference tbRef)
   at Python.Runtime.PythonException.FetchCurrentOrNull(ExceptionDispatchInfo& dispatchInfo)
   at Python.Runtime.PythonException.ThrowLastAsClrException()
   at Python.Runtime.NewReferenceExtensions.BorrowOrThrow(NewReference& reference)
   at Python.Runtime.PyObject.ToString()
   at Python.Runtime.InternString.Shutdown()
   at Python.Runtime.Runtime.Shutdown()
   at Python.Runtime.PythonEngine.Shutdown()
   at Python.Runtime.Loader.Shutdown(IntPtr data, Int32 size)Exception ignored in atexit callback: <function unload at 0x0000014BC4288E50>
@filmor filmor added the bug label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant