Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Random Access Violations on shutdown #1977

Open
@rohanjain101

Description

@rohanjain101

Environment

  • Pythonnet version: 3.0.0.post1
  • Python version: 3.8.10
  • Operating System: Windows 11
  • .NET Runtime: .NET Framework 472

Details

  • Describe what you were trying to get done.

    I am getting random access violations during shutdown in pythonnet. The issue can be re-produced with a C# function as simple as

public static int Add(int a, int b) => a + b;

I get the access violation; however, it is not deterministic at all. Some times, it succeeds as expected, other times I get this. Note that I am upgrading from pythonnet 2.5.2 to pythonnet 3.0.0.post1 so this code used to work. All I am doing is invoking this code from python. I am running this python code that uses pythonnet in pytest. I haven't seen this when we were using pythonnet 2.5.2.

  • If there was a crash, please include the traceback here.
UnhandledException:System.AccessViolationException:Attemptedtoreadorwriteprotectedmemory.Thisisoftenanindicationthatothermemoryiscorrupt.atPython.Runtime.Runtime.PyObject_TYPE(BorrowedReferenceop)atPython.Runtime.Runtime.NullGCHandles(IEnumerable`1objects)atPython.Runtime.Runtime.TryCollectingGarbage(Int32runs,BooleanforceBreakLoops)atPython.Runtime.Runtime.Shutdown()atPython.Runtime.PythonEngine.Shutdown()atPython.Runtime.Loader.Shutdown(IntPtrdata,Int32size)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp