<div>I got StackOverflowException. no <font color="#1f497d">Snippets.dll is created in my working directory.</font></div>
<div><font color="#1f497d" size="3"></font>&nbsp;</div>
<div>d:\tools\IronPython-2.0B3&gt;ipy.exe -X:ExceptionDetail -X:SaveAssemblies a.py</div>
<p>Process is terminated due to StackOverflowException.<br><br>d:\tools\IronPython-2.0B3&gt;ipy.exe&nbsp; -X:SaveAssemblies a.py</p>
<div>Process is terminated due to StackOverflowException.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div class="gmail_quote">On Wed, Jul 2, 2008 at 11:36 AM, Dino Viehland &lt;<a href="mailto:dinov@exchange.microsoft.com">dinov@exchange.microsoft.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">One more command line option – can you run with –X:SaveAssemblies?&nbsp; &nbsp;You'll get a Snippets.dll written out to disk that you could send to us and we can see why the code isn't verifiable (or you can run peverify on it and report the verification errors).&nbsp; It looks like it could be a DLR code gen bug.</span></p>

<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">&nbsp;</span></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p><b><span style="FONT-SIZE: 10pt">From:</span></b><span style="FONT-SIZE: 10pt"> <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>Liwei Peng<br>
<b>Sent:</b> Wednesday, July 02, 2008 11:33 AM<br><b>To:</b> Discussion of IronPython<br><b>Subject:</b> Re: [IronPython] 2.0 beta3: with statement: SystemError: Operation could destabilize the runtime.</span></p></div>
<div>
<div></div>
<div class="Wj3C7c">
<p>&nbsp;</p>
<div>
<p>Thanks for the help. The following is what I got:</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>d:\tools\IronPython-2.0B3&gt;ipy.exe -X:ExceptionDetail a.py<br>Operation could destabilize the runtime.<br>&nbsp;&nbsp; at _stub_$36##33(Closure , CallSite , CodeContext , Object , Object )<br>&nbsp;&nbsp; at _stub_MatchCaller(Object , CallSite , Object[] )<br>
&nbsp;&nbsp; at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)<br>&nbsp;&nbsp; at Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallSite site<br>, T0 arg0, T1 arg1, T2 arg2)<br>&nbsp;&nbsp; at S$2.Initialize(CodeContext )<br>
&nbsp;&nbsp; at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)<br>&nbsp;&nbsp; at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)<br>SystemError: Operation could destabilize the runtime.</p></div>
<div>
<p><br>Liwei</p></div>
<div>
<p>On Wed, Jul 2, 2008 at 11:20 AM, Curt Hagenlocher &lt;<a href="mailto:curt@hagenlocher.org" target="_blank">curt@hagenlocher.org</a>&gt; wrote:</p>
<div>
<p style="MARGIN-BOTTOM: 12pt">I&#39;m sorry -- Dino&#39;s right, I should have said &quot;-X:ExceptionDetail&quot;.&nbsp; Could you run again with that?</p></div>
<div>
<div>
<div>
<p>On Wed, Jul 2, 2008 at 10:36 AM, Liwei Peng &lt;<a href="mailto:liwei.peng@gmail.com" target="_blank">liwei.peng@gmail.com</a>&gt; wrote:</p>
<div>
<p>Thanks for the help. The following are more details:</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>1) d:\tools\IronPython-2.0B3&gt;ipy.exe -X:ShowClrExceptions a.py </p>
<div>
<p><br>Traceback (most recent call last):<br>&nbsp; File &quot;a.py&quot;, line 17, in a.py<br>SystemError: Operation could destabilize the runtime.</p></div>
<p>CLR Exception:<br>&nbsp;&nbsp;&nbsp; VerificationException<br>: </p>
<div>
<p style="MARGIN-BOTTOM: 12pt"><br>Operation could destabilize the runtime.</p></div>
<p>2) I didn&#39;t do anything at force IronPython to run as a 32-bit app or 64-bit app.</p></div>
<div>
<p>My OS is x64 W2K8 server. ipy.exe is a 32-bit binary.</p></div>
<div>
<p>3) MPI.net is built from CLR 2.0.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>thanks,</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p><span style="COLOR: #888888">Liwei</span></p></div>
<div>
<div>
<div>
<p>&nbsp;</p></div>
<div>
<p>On Wed, Jul 2, 2008 at 9:57 AM, Curt Hagenlocher &lt;<a href="mailto:curt@hagenlocher.org" target="_blank">curt@hagenlocher.org</a>&gt; wrote:</p>
<div>
<p>That exception isn&#39;t coming from IronPython -- not directly, anyway.&nbsp; Can you re-run with the -X:ShowClrExceptions flag?</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p style="MARGIN-BOTTOM: 12pt">Have you done anything to force IronPython to run as a 32-bit app or is it running as a 64-bit app (ie natively)?&nbsp; Is <a href="http://mpi.net/" target="_blank">MPI.NET</a> built against CLR 2.0?</p>
</div>
<div>
<div>
<div>
<p>On Wed, Jul 2, 2008 at 9:49 AM, Liwei Peng &lt;<a href="mailto:liwei.peng@gmail.com" target="_blank">liwei.peng@gmail.com</a>&gt; wrote:</p></div></div>
<blockquote style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 6pt; PADDING-BOTTOM: 0in; MARGIN-LEFT: 4.8pt; BORDER-LEFT: #cccccc 1pt solid; MARGIN-RIGHT: 0in; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">

<div>
<div>
<div>
<p>Hi,</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>I used IronPython 2.0 Beta3 using the with statement. I got the following error:</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>&gt;ipy.exe a.py</p></div>
<div>
<p>Traceback (most recent call last):<br>&nbsp; File &quot;a.py&quot;, line 17, in a.py<br>SystemError: Operation could destabilize the runtime.</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>What I did:</p></div>
<div>
<p>1) create a __future__.py file with 1 line:</p></div>
<div>
<p>with_statement=True</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p>2) run the following script. the error occured in the line &quot;with MPI.Environment(argarrayref) as mpienv:&quot;</p></div>
<p>from __future__ import with_statement<br>import sys<br>import clr<br>import System</p>
<p>sys.path.append(&quot;C:\Program Files (x86)\<a href="http://mpi.net/" target="_blank">MPI.NET</a>\Lib&quot;)<br>clr.AddReferenceToFile(&quot;MPI.dll&quot;)<br>import MPI</p>
<p>argarray = System.Array[str](sys.argv)<br>argarrayref = clr.Reference[ System.Array[str] ]( argarray )</p>
<div>
<p>with MPI.Environment(argarrayref) as mpienv:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n=100</p></div>
<div>
<p>Question: how can I fix it? thanks,</p></div>
<div>
<p>&nbsp;</p></div>
<div>
<p><span style="COLOR: #888888">Liwei</span></p></div>
<p>&nbsp;</p></div></div>
<p style="MARGIN-BOTTOM: 12pt">_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com" target="_blank">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></p>
</blockquote></div>
<p style="MARGIN-BOTTOM: 12pt"><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com" target="_blank">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></p>
</div>
<p>&nbsp;</p></div></div>
<p style="MARGIN-BOTTOM: 12pt"><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com" target="_blank">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></p>
</div>
<p>&nbsp;</p></div></div>
<p style="MARGIN-BOTTOM: 12pt"><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com" target="_blank">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></p>
</div>
<p>&nbsp;</p></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>