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

Crash when using pythonnet with nuitka #904

Closed
@ftreurni

Description

@ftreurni

Environment

  • Pythonnet version: 2.4.0
  • Python version: Python 2.7.13
  • Operating System: Windows 10

Details

  • Describe what you were trying to get done.

    I want to use a .net library that I access through pythonnet in combination with a library that was compiled with Nuitka (the contents of the library do not seem to matter, nor the version of Nuitka). However, when I import the module in the pyd first, calling 'import clr' after that crashes pythonnet and then Python.

I was wondering if this is a known issue/how easy it would be to fix it/if there would be some straightforward workaround so the order of imports would not matter?

importfooimportclr

Will crash pythonnet and then Python. Changing the order of the imports will make it work, however it will make working with the .net library very annoying.

Relevant files are in the zip:
minimal_example.zip

  • If there was a crash, please include the traceback here.
UnhandledException:System.Reflection.TargetInvocationException:Exceptionhasbeenthrownbythetargetofaninvocation.--->System.AccessViolationException:Attemptedtoreadorwriteprotectedmemory.Thisisoftenanindicationthatothermemoryiscorrupt.atPython.Runtime.Runtime.PyModule_GetDict(IntPtrmodule)atPython.Runtime.PythonEngine.Initialize(IEnumerable`1args,BooleansetSysArgv,BooleaninitSigs)atPython.Runtime.PythonEngine.InitExt()---Endofinnerexceptionstacktrace---atSystem.RuntimeMethodHandle.InvokeMethod(Objecttarget,Object[]arguments,Signaturesig,Booleanconstructor)atSystem.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Objectobj,Object[]parameters,Object[]arguments)atSystem.Reflection.RuntimeMethodInfo.Invoke(Objectobj,BindingFlagsinvokeAttr,Binderbinder,Object[]parameters,CultureInfoculture)atSystem.RuntimeType.InvokeMember(Stringname,BindingFlagsbindingFlags,Binderbinder,Objecttarget,Object[]providedArgs,ParameterModifier[]modifiers,CultureInfoculture,String[]namedParams)atclrModule.initclr()

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