[IronPython] CallTarget0

Dino Viehland dinov at exchange.microsoft.com
Wed Jun 21 19:16:53 CEST 2006


Thanks for the stack trace.  I've opened CodePlex bug 537 to track the issue.  We should fail much more gracefully here.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrzej Krzywda
Sent: Wednesday, June 21, 2006 10:06 AM
To: Discussion of IronPython
Subject: Re: [IronPython] CallTarget0

Thanks Dino.

Here is the actual stack trace:

 >>> form.Invoke(DoSomething)
Object reference not set to an instance of an object.
   at IronPython.Runtime.Operations.Ops.GetDelegate(Object o, Type
delegateType)

   at IronPython.Runtime.Converter.TryConvertToDelegate(Object value, Type to, C onversion& conversion)
   at IronPython.Runtime.Converter.ConvertToDelegate(Object value, Type to)
   at IronPython.Runtime.NewConverter.ConvertToDelegate(Object o, Type t)
   at Invoke##18(ICallerContext , Object , Object )
   at
IronPython.Runtime.Calls.CallTargetWithContext2.Invoke(ICallerContext cont ext, Object arg0, Object arg1)
   at
IronPython.Runtime.Calls.FastCallableWithContextAny.CallInstance(ICallerCo
ntext context, Object arg0, Object arg1)
   at IronPython.Runtime.Calls.BoundBuiltinFunction.Call(ICallerContext
context,
 Object arg0)
   at IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext
context,
Object func, Object arg0)
   at <stdin>##17(ModuleScope )
   at IronPython.Runtime.CompiledCodeDelegate.Invoke(ModuleScope
moduleScope)
   at IronPython.Runtime.CompiledCode.Run(ModuleScope moduleScope)
   at IronPython.Hosting.PythonEngine.ExecuteToConsole(String text, ModuleScope
defaultScope)
   at IronPythonConsole.PythonCommandLine.DoOneInteractive(ModuleScope
topFrame)

   at
IronPythonConsole.PythonCommandLine.<RunInteractiveLoop>b__6(Boolean& cont
inueInteractionArgument)
   at
IronPythonConsole.PythonCommandLine.TryInteractiveAction(InteractiveAction
 interactiveAction, Boolean& continueInteraction)
SystemError: Object reference not set to an instance of an object.
 >>>

Dino Viehland wrote:
> CallTarget0 has actually just moved to IronPython.Runtime.Calls (we used to have over 200 classes in IronPython.Runtime which was just too many).
>
> The exception you're getting is still potentially interesting - could you send us the stack trace when running w/ -X:ExceptionDetail ?
>
> -----Original Message-----
> From: users-bounces at lists.ironpython.com
> [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrzej
> Krzywda
> Sent: Wednesday, June 21, 2006 9:52 AM
> To: users at lists.ironpython.com
> Subject: [IronPython] CallTarget0
>
> Hi,
>
> We are in the process of upgrading an application from IronPython Beta 5 to Beta 8.  Previously it would execute certain functions on the thread belonging to our GUI controls:
>
>     def DoSomething()
>         pass
>
>     form.Invoke(CallTarget0(DoSomething))
>
> In beta 8, the CallTarget0 class has been removed - what should we replace it with?  We tried simply passing the function to the Invoke() method, but this failed with "SystemError: Object reference not set to an instance of an object."
>
>
> Regards,
>
> Andrzej Krzywda
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>

_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list