Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
if I use link sdk assemblies only, I get "Attempting to JIT compile method" exception. It works fine on simulator.
If I use don't link option, it works fine but the app size becomes around 38mb.
simulator size : 7 mb.
I think the following code is throwing exception, if I don't use don't link
public class XmlRpcBeginAttribute : Attribute
mi = this.GetType().GetMethod(request.method);
// exceptions thrown during an MethodInfo.Invoke call are
// package as inner of
reto = mi.Invoke(this, request.args);
Could you create a small, compilable (at least a complete method) test case that fails for sure, with the exception ? and also include the full message / stacktrace (in case it's not directly related to the method, but it's callers).
Please see the attached test file.
When I click on the test xml on device
ct 11 14:05:30 unknown kernel <Debug>: launchd Container: /private/var/mobile/Applications/51EBBFD5-E4A6-4C77-A676-82148A3D6F27  (sandbox)
Oct 11 14:05:31 unknown UIKitApplication:testapp[0xb225] <Notice>: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper remoting-invoke-with-check) testxml.WP:.ctor ()' while running with --aot-only.
Oct 11 14:05:31 unknown UIKitApplication:testapp[0xb225] <Notice>: at TestApp.TestAppViewController.Onclick (MonoTouch.Foundation.NSObject sender) [0x00000] in <filename unknown>:0
Another issue not related : When I tap on the test photo button and try to scroll it crahes on
iOS 5 iPAd Device but not in simulator
crash report for process TestApp
Oct 11 13:52:13 unknown com.apple.launchd <Warning>: (UIKitApplication:testapp[0x9f88]) Job appears to have crashed: Abort trap: 6
Oct 11 13:52:13 unknown SpringBoard <Warning>: Application 'TestApp' exited abnormally with signal 6: Abort trap: 6
Oct 11 13:52:13 unknown ReportCrash <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/TestApp_2011-10-11-135213_Green-Beans-iPad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Oct 11 13:54:13 unknown SpringBoard <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
Oct 11 13:54:13 unknown SpringBoard <Notice>: MultitouchHID: detection mode: 0->255
Oct 11 13:59:23 unknown SpringBoard <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=1
Oct 11 13:59:23 unknown SpringBoard <Notice>: MultitouchHID: detection mode: 255->0 (deferring until bootloaded)
Oct 11 13:59:23 unknown kernel <Debug>: set_crc_notification_state 0
Oct 11 13:59:23 unknown SpringBoard <Notice>: MultitouchHID: device bootloaded
Oct 11 13:59:23 unknown SpringBoard <Notice>: MultitouchHID: detection mode: 0->0
Oct 11 14:01:25 unknown SpringBoard <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
Oct 11 14:01:25 unknown SpringBoard <Notice>: MultitouchHID: detection mode: 0->255
test case provided in comment #3
Art, please fill a separate bug report for the "Test Photo" issue (you can link to the attachment in this bug report).
I think I've found the issue. Can you confirm to me that the (non linked) test case fails with:
testxml.XmlRpc.XmlRpcIllFormedXmlException: Response from server does not contain valid XML. ---> System.Xml.XmlException: Text node cannot appear in this state. Line 1, position 1.
at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000] in <filename unknown>:0
at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0
at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0
at testxml.XmlRpc.XmlRpcSerializer.DeserializeResponse (System.IO.Stream stm, System.Type svcType) [0x000a6] in /Users/sebastienpouliot/Downloads/Test/testxml/XmlRpcSerializer.cs:517
--- End of inner exception stack trace ---
at testxml.XmlRpc.XmlRpcSerializer.DeserializeResponse (System.IO.Stream stm, System.Type svcType) [0x000c6] in /Users/sebastienpouliot/Downloads/Test/testxml/XmlRpcSerializer.cs:522
at testxml.XmlRpc.XmlRpcClientProtocol.ReadResponse (testxml.XmlRpc.XmlRpcRequest req, System.Net.WebResponse webResp, System.IO.Stream respStm, System.Type returnType) [0x00066] in /Users/sebastienpouliot/Downloads/Test/testxml/XmlRpcClientProtocol.cs:494
at testxml.XmlRpc.XmlRpcClientProtocol.Invoke (System.Object clientObj, System.Reflection.MethodInfo mi, System.Object parameters) [0x001f9] in /Users/sebastienpouliot/Downloads/Test/testxml/XmlRpcClientProtocol.cs:209
at testxml.XmlRpc.XmlRpcClientProtocol.Invoke (System.Object clientObj, System.String methodName, System.Object parameters) [0x0000a] in /Users/sebastienpouliot/Downloads/Test/testxml/XmlRpcClientProtocol.cs:119
at testxml.XmlRpc.XmlRpcClientProtocol.Invoke (System.String MethodName, System.Object Parameters) [0x00000] in /Users/sebastienpouliot/Downloads/Test/testxml/XmlRpcClientProtocol.cs:110
at testxml.WP.NewPost (Int32 blogid, System.String username, System.String password, Post content, Boolean publish) [0x00000] in /Users/sebastienpouliot/Downloads/Test/testxml/client/wordpress.cs:303
at testxml.WP.NewPost (Post content, Boolean publish) [0x00000] in /Users/sebastienpouliot/Downloads/Test/testxml/client/wordpress.cs:288
at TestApp.TestAppViewController.Onclick (MonoTouch.Foundation.NSObject sender) [0x00088] in /Users/sebastienpouliot/Downloads/Test/TestApp/TestAppViewController.cs:64
as I now have the same behavior with linked (or not) application. Thanks!
Yes I am getting same error. Because it isn't not a valid username.
As long you aren't getting the "JIT compile method" error, it is working.
I found what is causing the image picker issue. iOS5 picker call back is in the different thread. I used InvokeOnMainthread and it working now.
Thanks for the confirmation. The issue comes from:
Missing method System.Runtime.Remoting.Messaging.ReturnMessage::.ctor(object,object,int,LogicalCallContext,IMethodCallMessage) in assembly /Users/sebastienpouliot/Downloads/Test/TestApp/bin/iPhone/Debug/TestApp.app/mscorlib.dll, referenced in assembly /Users/sebastienpouliot/Downloads/Test/TestApp/bin/iPhone/Debug/TestApp.app/testxml.dll
that the linker eliminates since a large part of this code does not, under most circumtance, work properly (without code generation) on iOS devices. That's an exception to the general rule.
I'll add a linker option (in future MT releases) to disable the extra code removal. That will make .app larger than fully linked (but smaller than non-linked).
In the mean time you can try "Link SDK assemblies only" and add "--linkskip=mscorlib" in the "additional mtouch arguments". That will link every SDK assembly, except mscorlib (smaller app than non-linked, still larger than my fix will allow, but available right now :-).
Newer MonoTouch releases will allow you to specify "--nolinkaway" as an "additional mtouch arguments" (Project Options, iPhone Build) to get the best behavior.
I am not sure I posted this.
I tried using --linkskip=mscorlib" but my app size is still more than 50mb.
will the new version make it smaller. The sim version of the app size is less than
7mb. I am not sure if it is related but I am getting the memory warning more often with iOS5 sdk.
I am sorry. I looked at the wrong dir. It is 18mb and working fine.
Final size is hard to predict since it's application dependent (linker will only remove what's used).
It should be between your current working, when --linkskip=mscorlib is used, size (18mb) and the unworking one, --linksdkonly (device builds, you can't compare to the simulator which uses the JIT versus AOT).