Bug 4172 - Application with IronPython throws a Microsoft.Scripting.InvalidImplementationException on IronPython.Runtime.PythonContext
Summary: Application with IronPython throws a Microsoft.Scripting.InvalidImplementatio...
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-03-31 17:43 UTC by Ansjh
Modified: 2017-08-28 15:04 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Ansjh 2012-03-31 17:43:05 UTC
See the following link for the complete error log: http://pastebin.com/raw.php?i=Nz87bhRH

This is the code I use to create the PythonContext:

    public class Scripting {
        public ScriptRuntime Host;
        public ScriptScope Scope;
        public ScriptEngine Engine;

        // Snip...

        public Scripting() {
            Host = Python.CreateRuntime();
            Scope = Host.CreateScope(); // Exception here
            Engine = Host.GetEngine("Python");

        // Snip...

Some more info on the loaded assemblies:

"IronPython, Version=, Culture=neutral, PublicKeyToken=7f709c5b713576e1"
"Microsoft.Scripting, Version=, Culture=neutral, PublicKeyToken=7f709c5b713576e1"

Mono version:
# mono --version
Mono JIT compiler version (Debian
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            Included Boehm (with typed GC and Parallel Mark)
Comment 1 Ansjh 2012-03-31 17:45:58 UTC
Actually, from the stack it looks like it comes from Host.GetEngine("Python") instead of Host.CreateScope(). Sorry about that.
Comment 2 Ansjh 2012-03-31 18:05:10 UTC
The issue was apparently fixed by updating IronPython. Does this invalidate the bug report?
Comment 3 Zoltan Varga 2012-04-02 03:46:57 UTC