<div>RE: <span class="Apple-style-span" style="font-size: 15px; color: rgb(31, 73, 125); ">Weird, is there a stack trace?</span></div><div><span class="Apple-style-span" style="font-size: 15px; color: rgb(31, 73, 125); ">None.</span></div>
<div><br></div><div>RE: <span class="Apple-style-span" style="font-size: 15px; color: rgb(31, 73, 125); ">Could you run w/ -X:ExceptionDetail to get the C# stack trace?</span></div>Here you go...<div><br></div><div><div>D:\&gt;ipy -X:MTA -X:ExceptionDetail stressopc.py</div>
<div>Specified cast is not valid.</div><div>   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(</div><div>   at Microsoft.Scripting.ComInterop.ComRuntimeHelpers.CheckThrowExceptio</div><div>essage)</div>
<div>   at CallSite.Target(Closure , CallSite , Object , Object , Object )</div><div>   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](Cal</div><div>   at CallSite.Target(Closure , CallSite , Object , Object , Object )</div>
<div>   at CallSite.Target(Closure , CallSite , CodeContext , Object , Object</div><div>   at IronPython.Compiler.Ast.CallExpression.Invoke2Instruction.Run(Inter</div><div>   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame fr</div>
<div>   at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0</div><div>   at IronPython.Compiler.PythonCallTargets.OriginalCallTarget2(PythonFun</div><div>   at IronPython.Runtime.PythonFunction.FunctionCaller`2.Call2(CallSite s</div>
<div>   at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](</div><div>   at IronPython.Runtime.PythonFunction.FunctionCaller`2.Default1Call2(Ca</div><div>1)</div><div>   at CallSite.Target(Closure , CallSite , CodeContext , Object , Object</div>
<div>   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](Cal</div><div>   at CallSite.Target(Closure , CallSite , CodeContext , Object , Object</div><div>   at IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(Inter</div>
<div>   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame fr</div><div>   at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)</div><div>   at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)</div>
<div>   at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)</div><div>   at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)</div><div>   at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)</div>
<div>TypeError: Specified cast is not valid.</div><div><br></div><div>This is where it fails:</div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
OPCDotNetAutomation.OPCItem.Read(self.m_opc_item,DEVICE_READ, self.val, self.tmp, self.tmp)</blockquote><div><br></div>Where:</div><div>OPCDotNetAutomation is an interop namespace</div><div>OPCItem - i think this is an interface</div>
<div>.Read - COM method</div><div><br></div><div>As you may have noticed, I am using unbound class to call .Read method of OPCItem interface(class?).</div><div><br></div><div>Regards,</div><div>Yngipy</div><div><br><div class="gmail_quote">
On Thu, Aug 19, 2010 at 2:34 PM, Dino Viehland <span dir="ltr">&lt;<a href="mailto:dinov@microsoft.com">dinov@microsoft.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Weird, is there a stack trace?  Could you run w/ -X:ExceptionDetail to get the C# stack trace?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a> [mailto:<a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a>]
<b>On Behalf Of </b>yngipy hernan<br>
<b>Sent:</b> Thursday, August 19, 2010 3:24 AM</span></p><div class="im"><br>
<b>To:</b> Discussion of IronPython<br>
<b>Subject:</b> Re: [IronPython] Chasing memory leak in IronPython scripts</div><p></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Thanks for the input Dino. I will to try to track GC Heap.</p>
</div><div><div></div><div class="h5">
<div>
<p class="MsoNormal"> </p>
</div>
<p class="MsoNormal">In the meantime, I tried -X:MTA and got this error:</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">TypeError: Specified cast is not valid.</p>
</blockquote>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Works fine without -X:MTA switch.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">-Yngipy</p>
</div>
</div></div></div>
</div>
</div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br></div>