terryspitz
Posts: 4
Joined: Fri Dec 28, 2012 9:23 am

IronPython on mono

Sat Apr 27, 2013 10:00 am

Trouble running IronPython... does anyone have this working? See my crash dump below.

I have the latest mono install (sudo apt-get install mono-complete). I copied the 2.7.4 IronPython binaries onto the Pi and ran ipy.exe with the sample code from Wikipedia.

Any ideas?
thanks

Code: Select all

pi@raspberrypi ~/src/IronPython-2.7.3 $ mono ipy.exe
IronPython 2.7.3 (2.7.0.40) on Mono 4.0.30319.1 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
>>> clr.AddReference("System.Windows.Forms")
>>>
>>> from System.Windows.Forms import MessageBox
>>> MessageBox.Show("Hello World")
Stacktrace:

  at System.Drawing.Font.CreateFont (string,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool) <0x00143>
  at System.Drawing.Font..ctor (string,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool) <0x0007f>
  at System.Drawing.Font..ctor (string,single,string) <0x00057>
  at (wrapper remoting-invoke-with-check) System.Drawing.Font..ctor (string,single,string) <0xffffffff>
  at System.Drawing.SystemFonts.get_DefaultFont () <0x00073>
  at System.Windows.Forms.Theme..ctor () <0x0002f>
  at System.Windows.Forms.ThemeWin32Classic..ctor () <0x00013>
  at System.Windows.Forms.ThemeEngine..cctor () <0x000a3>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () <0x00007>
  at System.Windows.Forms.Control..ctor () <0x001ef>
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control..ctor () <0xffffffff>
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () <0x0002b>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at System.Windows.Forms.Control..ctor () <0x0004b>
  at System.Windows.Forms.ScrollableControl..ctor () <0x00013>
  at System.Windows.Forms.ContainerControl..ctor () <0x00023>
  at System.Windows.Forms.Form..ctor () <0x00073>
  at System.Windows.Forms.MessageBox/MessageBoxForm..ctor (System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon,bool) <0x00053>
  at System.Windows.Forms.MessageBox/MessageBoxForm..ctor (System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon) <0x00057>
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox/MessageBoxForm..ctor (System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon) <0xffffffff>
  at System.Windows.Forms.MessageBox.Show (string) <0x00063>
  at Microsoft.Scripting.Interpreter.FuncCallInstruction`2<string, System.Windows.Forms.DialogResult>.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x0007f>
  at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x0009f>
  at Microsoft.Scripting.Interpreter.LightLambda.Run4<T0, T1, T2, T3, TRet> (T0,T1,T2,T3) <0x00157>
  at System.Dynamic.UpdateDelegates.UpdateAndExecute3<T0, T1, T2, TRet> (System.Runtime.CompilerServices.CallSite,T0,T1,T2) <0x0040b>
  at (wrapper delegate-invoke) <Module>.invoke_object__this___CallSite_CodeContext_object_object (System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0xffffffff>
  at (wrapper delegate-invoke) <Module>.invoke_object__this___Func`5<CallSite, CodeContext, object, object, object>_CallSite_CodeContext_object_object (System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>,System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0xffffffff>
  at Microsoft.Scripting.Interpreter.FuncCallInstruction`6.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x001d3>
  at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x0009f>
  at Microsoft.Scripting.Interpreter.LightLambda.Run4<T0, T1, T2, T3, TRet> (T0,T1,T2,T3) <0x00157>
  at IronPython.Compiler.Ast.CallExpression/Invoke1Instruction.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x000a3>
  at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x0009f>
  at Microsoft.Scripting.Interpreter.LightLambda.Run2<T0, T1, TRet> (T0,T1) <0x000f7>
  at IronPython.Compiler.PythonScriptCode.RunWorker (IronPython.Runtime.CodeContext) <0x0006f>
  at IronPython.Compiler.PythonScriptCode.Run (Microsoft.Scripting.Runtime.Scope) <0x0004f>
  at IronPython.Hosting.PythonCommandLine/<>c__DisplayClass1.<RunOneInteraction>b__0 () <0x00087>
  at IronPython.Runtime.PythonContext.DispatchCommand (System.Action) <0x00043>
  at IronPython.Hosting.PythonCommandLine.RunOneInteraction () <0x002ab>
  at IronPython.Hosting.PythonCommandLine.TryInteractiveActionWorker () <0x0004f>
  at IronPython.Hosting.PythonCommandLine.TryInteractiveAction () <0x00037>
  at Microsoft.Scripting.Hosting.Shell.CommandLine.RunInteractiveLoop () <0x000ef>
  at IronPython.Hosting.PythonCommandLine.RunInteractive () <0x00163>
  at Microsoft.Scripting.Hosting.Shell.CommandLine.Run () <0x00097>
  at IronPython.Hosting.PythonCommandLine.Run () <0x0036f>
  at Microsoft.Scripting.Hosting.Shell.CommandLine.Run (Microsoft.Scripting.Hosting.ScriptEngine,Microsoft.Scripting.Hosting.Shell.IConsole,Microsoft.Scripting.Hosting.Shell.ConsoleOptions) <0x000d3>
  at Microsoft.Scripting.Hosting.Shell.ConsoleHost.RunCommandLine () <0x000fb>
  at Microsoft.Scripting.Hosting.Shell.ConsoleHost.ExecuteInternal () <0x000ab>
  at PythonConsoleHost.ExecuteInternal () <0x0006f>
  at Microsoft.Scripting.Hosting.Shell.ConsoleHost.Execute () <0x000bf>
  at Microsoft.Scripting.Hosting.Shell.ConsoleHost.Run (string[]) <0x00483>
  at PythonConsoleHost.Main (string[]) <0x00073>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:


Debug info from gdb:

Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x1
Cannot access memory at address 0x1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb59ff460 (LWP 13778)]
[New Thread 0xb5ce7460 (LWP 13758)]
[New Thread 0xb688a460 (LWP 13658)]
0xb6f267d0 in read () from /lib/arm-linux-gnueabihf/libpthread.so.0
  Id   Target Id         Frame
  4    Thread 0xb688a460 (LWP 13658) "mono" 0xb6f25700 in sem_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
  3    Thread 0xb5ce7460 (LWP 13758) "mono" 0xb6f27250 in nanosleep () from /lib/arm-linux-gnueabihf/libpthread.so.0
  2    Thread 0xb59ff460 (LWP 13778) "mono" 0xb6f25954 in sem_timedwait () from /lib/arm-linux-gnueabihf/libpthread.so.0
* 1    Thread 0xb6ff9000 (LWP 13657) "mono" 0xb6f267d0 in read () from /lib/arm-linux-gnueabihf/libpthread.so.0

Thread 4 (Thread 0xb688a460 (LWP 13658)):
#0  0xb6f25700 in sem_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x00195a40 in mono_sem_wait ()
#2  0x000ea384 in ?? ()
#3  0x000ea384 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0xb5ce7460 (LWP 13758)):
#0  0xb6f27250 in nanosleep () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0xb6f26044 in __pthread_enable_asynccancel () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2  0x0018fe08 in ?? ()
#3  0x0018fe08 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0xb59ff460 (LWP 13778)):
#0  0xb6f25954 in sem_timedwait () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x00195b20 in mono_sem_timedwait ()
#2  0x0015f80c in ?? ()
#3  0x0015f80c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xb6ff9000 (LWP 13657)):
#0  0xb6f267d0 in read () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0xb6f26044 in __pthread_enable_asynccancel () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2  0x00096e60 in ?? ()
#3  0x00096e60 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted

pi@raspberrypi ~/src/IronPython-2.7.3 $ dmesg | grep Linux
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.6.11+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013

pi@raspberrypi ~/src/IronPython-2.7.3 $ mono -V
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-5)

terryspitz
Posts: 4
Joined: Fri Dec 28, 2012 9:23 am

Re: IronPython on mono

Sun Apr 28, 2013 4:55 pm

http://www.raspberrypi.org/phpBB3/viewt ... 66&t=11634 says Winforms not supported on hard float Debian Wheezy.

Return to “Python”