Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to compile libraries with monotouch (getting error : attempting to JIT-compile with --aot-only)
    text
    copied!<p>I'm trying to use <strong>DotNetZip</strong> (<a href="http://dotnetzip.codeplex.com/" rel="nofollow">http://dotnetzip.codeplex.com/</a>) in a monotouch project.</p> <p>I have re-compiled it for <strong>monotouch</strong>, by making two new monotouch projects under MonoDevelop (one for ZLib and the other for DotNetZip), putting the code inside, removing code that references Windows Forms, and setting <strong>Compile Target</strong> = <strong>Library</strong> in the project options.</p> <p>I set the active configuration in MonoDevelop to "Release - iPhone" before compiling. </p> <p>Then, I referenced the resulting DLLs in my main monotouch project.</p> <p>That works fine when running in the simulator, but when I try to debug this on the actual device (an iPod Touch 4 in my case), I get an error at runtime:</p> <p><strong>System.ExecutionEngineException has been thrown</strong></p> <p><strong>Attempting to JIT compile method 'Vortaro.SearchTableViewSource:.ctor (Vortaro.SearchViewController)' while running with --aot-only.</strong></p> <p>That happens on this line:</p> <pre><code>using (ZipFile zip = ZipFile.Read ("dictionary.zip")) { </code></pre> <p>--</p> <p>I also tested with a simple example that only does this when a button is clicked: </p> <pre><code>ZipFile.Read ("dictionary.zip"); </code></pre> <p>and I get this error:</p> <p><strong>Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method 'Ionic.Zip.ZipContainer:.ctor (object)' while running with --aot-only.</strong></p> <p><strong>at Ionic.Zip.ZipEntry.ReadDirEntry (Ionic.Zip.ZipFile zf) [0x000b5] in /Users/(...)/ZipDirEntry.cs:199</strong></p> <p>When I look at the constructor to which the error points, I fail to see anything that could cause the JIT compilation:</p> <pre><code>public ZipContainer(Object o) { _zf = (o as ZipFile); _zos = (o as ZipOutputStream); _zis = (o as ZipInputStream); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload