- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我知道编译器有时会忽略方法,如果它认为没有使用它们,并且您可以通过直接在代码中引用该方法来强制编译器包含它来解决这个问题。但是,在这种情况下,它似乎不起作用。
这是异常和调用堆栈:
System.ExecutionEngineException: Attempting to JIT compile method '(wrapper managed-to-native) System.Threading.Interlocked:Exchange (System.Threading.Tasks.IContinuation&,System.Threading.Tasks.IContinuation)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
at System.Threading.Tasks.TaskCompletionQueue`1[System.Threading.Tasks.IContinuation].TryGetNextCompletion (IContinuation& continuation) [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.ProcessCompleteDelegates () [0x0001b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:521
at System.Threading.Tasks.Task.HandleGenericException (System.AggregateException e) [0x0001a] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:563
at System.Threading.Tasks.Task.TrySetException (System.AggregateException aggregate) [0x0003e] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:440
at System.Threading.Tasks.TaskCompletionSource`1[System.Net.WebResponse].TrySetException (IEnumerable`1 exceptions) [0x00000] in <filename unknown>:0
at System.Threading.Tasks.TaskCompletionSource`1[System.Net.WebResponse].SetException (IEnumerable`1 exceptions) [0x00000] in <filename unknown>:0
at System.Threading.Tasks.TaskCompletionSource`1[System.Net.WebResponse].SetException (System.Exception exception) [0x00000] in <filename unknown>:0
at System.Threading.Tasks.TaskFactory`1[System.Net.WebResponse].InnerInvoke (System.Threading.Tasks.TaskCompletionSource`1 tcs, System.Func`2 endMethod, IAsyncResult l) [0x00000] in <filename unknown>:0
at System.Threading.Tasks.TaskFactory`1+<FromAsyncBeginEnd>c__AnonStorey21[System.Net.WebResponse].<>m__15 (IAsyncResult l) [0x00000] in <filename unknown>:0
at Vistian.Net.Http.HttpRequestProcessor+<BeginGetResponse>c__AnonStorey3.<>m__5 (IAsyncResult result) [0x00082] in /Users/martinstafford/Projects/Vistian/vistian/common/Vistian.Net/trunk/Vistian.Net.Portable/Http/HttpRequestProcessor.cs:441
at System.Net.WebAsyncResult.CB (System.Object unused) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebAsyncResult.cs:148
object dummy = System.Threading.Interlocked.Exchange( ref dummyLock, new object());
public static IAsyncResult BeginGetResponse(AsyncCallback callback, object state)
{
var requestProcessor = state as HttpRequestProcessor;
// create the Uri of the Host and Path in the request
// and use it to create a HttpWebRequest
Uri u = new Uri(new Uri(requestProcessor.Request.Host), requestProcessor.Request.Path);
requestProcessor.HttpWebRequest = WebRequest.Create(u) as HttpWebRequest;
// set up the header of the HttpWebRequest
requestProcessor.SetupHeader(requestProcessor.HttpWebRequest, requestProcessor.Request);
requestProcessor.WebResponse = null;
requestProcessor.RaisedException = null;
// set up an event to be used to 'timeout' the forthcoming async process
var syncRef = new System.Threading.AutoResetEvent(false);
System.Diagnostics.Debug.WriteLine(string.Format("HttpRequestProcessor.BeginGetResponse: started method={0}", requestProcessor.Request.Method));
// perform the request using the Async method
// GET and POST requests are processed differently
if (requestProcessor.Request.Method == HttpMethod.POST)
{
// create the request content using the serialiser
var bytes = requestProcessor.Encoder.Encode(requestProcessor.Request.Data, requestProcessor.Request.ContentType);
System.Diagnostics.Debug.WriteLine("HttpRequestProcessor.BeginGetResponse: BeginGetRequestStream started");
// start the async process by adding the content to the request
requestProcessor.HttpWebRequest.BeginGetRequestStream((IAsyncResult result) =>
{
// the asyncronous Get RequestStream has finished in some way
// complete the Get RequestStream process by calling EndGetRequestStream
// get the HttpWebRequest provided in the 'state' parameter and
// use it to call EndGetRequestStream
var request = result.AsyncState as HttpWebRequest;
try
{
// fill the request stream with the content
using (Stream requestStream = request.EndGetRequestStream(result))
{
requestStream.Write(bytes, 0, bytes.Length);
}
System.Diagnostics.Debug.WriteLine("HttpRequestProcessor.BeginGetResponse: EndGetRequestStream");
}
catch (Exception e)
{
// if the filling of the request stream fails, finish the Async process here
System.Diagnostics.Debug.WriteLine(string.Format("HttpRequestProcessor.BeginGetResponse: EndGetRequestSteam failed. Uri={0}", request.RequestUri));
// remember the exception, to be picked up by the subsequent call in to EndGetResponse
requestProcessor.RaisedException = e;
// clear the timeout event to indicate the async process has finished
syncRef.Set();
// call the callback as the async process is finished
callback(new AsyncResult(requestProcessor, true));
return;
}
System.Diagnostics.Debug.WriteLine("HttpRequestProcessor.BeginGetResponse: BeginGetResponse started");
// the HttpWebRequest has the request content in it
// send the request and get the response
request.BeginGetResponse((IAsyncResult responseResult) =>
{
// the Async process GetResponse has finished in some way
// get the HttpWebRequest provided as a parameter and use it
// to complete the GetRespone process
HttpWebRequest req = responseResult.AsyncState as HttpWebRequest;
try
{
requestProcessor.WebResponse = req.EndGetResponse(responseResult);
System.Diagnostics.Debug.WriteLine("HttpRequestProcessor.BeginGetResponse: EndGetResponse");
}
catch (Exception e)
{
// if getting the response fails, catch and remember the exception
// for the subsequent call in to EndGetResponse
System.Diagnostics.Debug.WriteLine(string.Format("HttpRequestProcessor.BeginGetResponse: EndGetResponse failed. Uri={0}", req.RequestUri));
requestProcessor.RaisedException = e;
}
// clear the timeout timer event
syncRef.Set();
// call the async callback
callback(new AsyncResult(requestProcessor, true));
System.Diagnostics.Debug.WriteLine("HttpRequestProcessor.BeginGetResponse: POST callback complete");
}, request);
}, requestProcessor.HttpWebRequest);
}
else
{
requestProcessor.HttpWebRequest.BeginGetResponse((IAsyncResult responseResult) =>
{
HttpWebRequest req = responseResult.AsyncState as HttpWebRequest;
try
{
requestProcessor.WebResponse = req.EndGetResponse(responseResult);
System.Diagnostics.Debug.WriteLine("HttpRequestProcessor.BeginGetResponse: EndGetResponse");
}
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine(string.Format("HttpRequestProcessor.BeginGetResponse: EndGetResponse failed. Uri={0}", req.RequestUri));
requestProcessor.RaisedException = e;
}
syncRef.Set();
callback(new AsyncResult(requestProcessor, true));
System.Diagnostics.Debug.WriteLine("HttpRequestProcessor.BeginGetResponse: GET callback complete");
}, requestProcessor.HttpWebRequest);
}
// wait for the async process to finish or timeout
if (!syncRef.WaitOne(requestProcessor.Request.Timeout))
{
// async process has time out
System.Diagnostics.Debug.WriteLine("HttpRequestProcessor.BeginGetResponse: BeginGetStreamRequest timed out");
// abort the async process and create and remember an exception
// to be picked up by the call in the EndGetResponse
requestProcessor.HttpWebRequest.Abort();
requestProcessor.RaisedException = new TimeoutException("loading request stream timed out");
}
return new AsyncResult(requestProcessor, false);
}
public static WebResponse EndGetResponse(IAsyncResult result)
{
System.Diagnostics.Debug.WriteLine("HttpRequestProcessor.EndGetResponse:");
var requestProcessor = result.AsyncState as HttpRequestProcessor;
if (requestProcessor.RaisedException != null)
{
throw requestProcessor.RaisedException;
}
return requestProcessor.WebResponse;
}
最佳答案
将此添加到构造函数做到了:
var dummy = System.Threading.Interlocked.Exchange(ref dummyTask, System.Threading.Tasks.Task.Factory.StartNew (() =>{}));
关于.net - System.ExecutionEngineException : Attempting to JIT compile method System. Threading.Interlocked:Exchange,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13709052/
我在运行 compile test:compile it:compile经常并且...希望将击键次数减少到类似 *:compile 的数量。 .不过,它似乎不起作用。 $ sbt *:compile
有人可以给我这个问题的提示(或整个解决方案!): 在 Clojurescript 项目中,如何自动将编译日期/时间硬编码在符号中,以便在使用应用程序时显示? 谢谢。 最佳答案 有多种解决方案: 使用l
我是 ember.js 框架的新手,使用 ruby on rails 和 ember.debug.js -v 1.10.1(最新版本)。我一直在网上看到 ember 更改了这个最新的补丁,但我不知
我不是 Fortran 程序员(只是短暂的经验),但我需要编译一个部分用 F77 编写的程序。在我之前有人用 Absoft 编译器编译过它,但现在我需要在另一台机器上用 g77 重复这个过程。对于 A
我运行命令 mvn clean package 我得到了上面的错误我的 pom 是: http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
我有以下问题。 我想在测试编译阶段排除一些.java文件(** / jsfunit / *。java),另一方面,我想在编译阶段包括它们(id我使用tomcat启动tomcat:运行目标) ) 我的p
符合 wikipedia A compiler is a computer program (or set of programs) that transforms source code writt
我想构建项目,但出现如下错误: 无法执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile
当我通过右键单击项目名称进行 Maven 安装时,出现以下错误: [INFO] Scanning for projects... [WARNING] [WARNING] Some proble
我是 Maven 的新手,我想将我的应用程序导入到 Maven。和以前一样,我想将我的 ejb 项目中的类引用到我的 war 项目中。我在类中没有错误,但是如果我在我的父项目上安装 maven,那么我
当我将 ASP.NET Web 应用程序部署到生产环境时,我使用配置转换来删除 debug="true"来自 .但是,就在今天,我注意到 web.config 中的另一个部分如下所示:
This question already has answers here: Maven Compilation Error: (use -source 7 or higher to enable
我正在使用 Maven 3.0.5 和 Spring Tool Source 3.2 并安装了 Maven 插件。当我尝试执行“运行方式---> Maven 安装”时,出现以下错误: [INFO] S
我试图用 AngularJS 创建我自己的递归指令,它调用自己以漂亮的 JSON 格式转换 View 中的对象。好吧,首先我使用 ng-include 调用带有模板的脚本,在其中使用 ng-if 验证
可以通过 @suppress annotation使用Google的Closure Compiler在每个文件的基础上禁止显示警告。但是,似乎无法同时抑制多个警告-例如globalThis和check
假设一个拥有 10 到 20 年经验的熟练开发人员从未构建过编译器或模拟器,哪一个会更具挑战性? 你能比较一下会成为障碍的问题吗? 谢谢。 最佳答案 仿真和编译是完全不同的,但由于两者都被认为是“低级
最近发现Vim中有一个命令叫compiler。您可以使用任何常见的编译器(例如,:compiler gcc、:compiler php 等)来调用它,但它似乎没有任何立竿见影的效果。 我在联机帮助页上
我试图从 spring.io 指南中部署最简单的应用程序 Guide 但是我有一些麻烦.. 我做了什么: 创建的项目。 (来自 spring.io 教程) 下载 heroku CLI 在 Intell
每当进行 Maven Build..>clean install 时,我都会遇到此错误。我尝试过使用不同版本的插件并添加 testFailureIgnore 属性,但问题仍然存在。请找到下面的 POM
我有一个 web 应用程序,我尝试使用 maven 进行编译,不幸的是,在执行 mvn clean package 时它不起作用。 stackoverflow 上有很多问题看起来都一样,但没有解决了我
我是一名优秀的程序员,十分优秀!