I'm using Aspose.Words to convert a doc/docx file to a pdf file on ubuntu. Mono runtime has been installed. My code is below:
Document doc = new Document ("/data/upfile/test.docx");
doc.Save ("/data/upfile/test.pdf", SaveFormat.Pdf);
Somehow, when the second line of the code is executed, an error was thrown. The detail is below:
Unhandled Exception: System.ArgumentOutOfRangeException: startIndex +
length > this.length Parameter name: length at
System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in
:0 at
x6c95d9cf46ff5f25.x0d299f323d241756.x3b67e683e83cab62 (System.String
xe4115acdf4fbfccc, Int32 x961016a387451f05) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x4469479613bec4d8
(Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x7be41bff00df2c71
(Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x699caa1974f95d1a
(Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x21e4bd206d6231f8
(System.Object xa860e35844c20ac7) [0x00000] in :0
at x4adf554d20d941a6.x50e6e6d123fa4a35.xb5ef8a04e65b87e6
(System.String x1f25abf5fb75e795, System.Object xa860e35844c20ac7)
[0x00000] in :0 at
x59d6a4fc5007b7a4.xdeb77ea37ad74c56.xbbf9a1ead81dd3a1 (System.String
x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in
:0 at
x59d6a4fc5007b7a4.x487cdc969fefe3d6.xbbf9a1ead81dd3a1 (System.String
x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in
:0 at
x59d6a4fc5007b7a4.x487cdc969fefe3d6.xf3a1cfbffa44728c () [0x00000] in
:0 at
x59d6a4fc5007b7a4.x487cdc969fefe3d6.x47f176deff0d42e2 () [0x00000] in
:0 at
x59d6a4fc5007b7a4.x487cdc969fefe3d6.x83f07df6a659e05b () [0x00000] in
:0 at
x59d6a4fc5007b7a4.xcde671c53995c411.xd9db07500873ae98
(Aspose.Words.Document x3664041d21d73fdc,
x59d6a4fc5007b7a4.xdeb77ea37ad74c56 xdfde339da46db651) [0x00000] in
:0 at Aspose.Words.Document.UpdatePageLayout ()
[0x00000] in :0 at
Aspose.Words.Document.x410db0f4a89a6ef1 (Boolean x24af0daafcd8fb8c)
[0x00000] in :0 at
Aspose.Words.Document.get_xcde671c53995c411 () [0x00000] in :0 at Aspose.Words.Document.get_PageCount () [0x00000] in
:0 at
xf989f31a236ff98c.x6c74398bceb133f8.xa2e0b7f7da663553
(x28925c9b27b37a46.x8556eed81191af11 x5ac1382edb7bf2c2) [0x00000] in
:0 at Aspose.Words.Document.xf381a641001e6830
(System.IO.Stream xcf18e5243f8d5fd3, System.String xafe2f3653ee64ebc,
Aspose.Words.Saving.SaveOptions xc27f01f21f67608c) [0x00000] in
:0 at Aspose.Words.Document.Save (System.String
fileName, Aspose.Words.Saving.SaveOptions saveOptions) [0x00000] in
:0 at Aspose.Words.Document.Save (System.String
fileName, SaveFormat saveFormat) [0x00000] in :0
at MonoTest.MainClass.Main (System.String[] args) [0x00000] in
:0 [ERROR] FATAL UNHANDLED EXCEPTION:
System.ArgumentOutOfRangeException: startIndex + length > this.length
Parameter name: length at System.String.Substring (Int32 startIndex,
Int32 length) [0x00000] in :0 at
x6c95d9cf46ff5f25.x0d299f323d241756.x3b67e683e83cab62 (System.String
xe4115acdf4fbfccc, Int32 x961016a387451f05) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x4469479613bec4d8
(Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x7be41bff00df2c71
(Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x699caa1974f95d1a
(Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x21e4bd206d6231f8
(System.Object xa860e35844c20ac7) [0x00000] in :0
at x4adf554d20d941a6.x50e6e6d123fa4a35.xb5ef8a04e65b87e6
(System.String x1f25abf5fb75e795, System.Object xa860e35844c20ac7)
[0x00000] in :0 at
x59d6a4fc5007b7a4.xdeb77ea37ad74c56.xbbf9a1ead81dd3a1 (System.String
x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in
:0 at
x59d6a4fc5007b7a4.x487cdc969fefe3d6.xbbf9a1ead81dd3a1 (System.String
x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in
:0 at
x59d6a4fc5007b7a4.x487cdc969fefe3d6.xf3a1cfbffa44728c () [0x00000] in
:0 at
x59d6a4fc5007b7a4.x487cdc969fefe3d6.x47f176deff0d42e2 () [0x00000] in
:0 at
x59d6a4fc5007b7a4.x487cdc969fefe3d6.x83f07df6a659e05b () [0x00000] in
:0 at
x59d6a4fc5007b7a4.xcde671c53995c411.xd9db07500873ae98
(Aspose.Words.Document x3664041d21d73fdc,
x59d6a4fc5007b7a4.xdeb77ea37ad74c56 xdfde339da46db651) [0x00000] in
:0 at Aspose.Words.Document.UpdatePageLayout ()
[0x00000] in :0 at
Aspose.Words.Document.x410db0f4a89a6ef1 (Boolean x24af0daafcd8fb8c)
[0x00000] in :0 at
Aspose.Words.Document.get_xcde671c53995c411 () [0x00000] in :0 at Aspose.Words.Document.get_PageCount () [0x00000] in
:0 at
xf989f31a236ff98c.x6c74398bceb133f8.xa2e0b7f7da663553
(x28925c9b27b37a46.x8556eed81191af11 x5ac1382edb7bf2c2) [0x00000] in
:0 at Aspose.Words.Document.xf381a641001e6830
(System.IO.Stream xcf18e5243f8d5fd3, System.String xafe2f3653ee64ebc,
Aspose.Words.Saving.SaveOptions xc27f01f21f67608c) [0x00000] in
:0 at Aspose.Words.Document.Save (System.String
fileName, Aspose.Words.Saving.SaveOptions saveOptions) [0x00000] in
:0 at Aspose.Words.Document.Save (System.String
fileName, SaveFormat saveFormat) [0x00000] in :0
at MonoTest.MainClass.Main (System.String[] args) [0x00000] in
:0
Any advice is appreciated. Thanks.
Often inner exceptions is a very common problem for converting words documents in PDF via Aspose.
It can be due to some reasones like:
2013 MS Word office.
Some complex elements in word
Old version of Aspose.Words.dll.
Solutions:
Try to update Aspose.Words.dll to new version. If it's still not working - write to aspose forum, and this error will be fixed in new release.
Check word document itself. may be you can find something thac call this inner exception, than try to remove it and check again. If this is acceptable of course.
Related
I need help.. I checking for if user of PC connected to Internet..
It works for me.. and for many people.. But for someone no
and it's writing this into output_log.txt
ERROR:
ArgumentNullException: Argument cannot be null.
Parameter name: hostName
at System.Net.Dns.GetHostByName (System.String hostName) [0x00000] in <filename unknown>:0
at System.Net.NetworkInformation.Ping.GetNonLoopbackIP () [0x00000] in <filename unknown>:0
at System.Net.NetworkInformation.Ping.SendPrivileged (System.Net.IPAddress address, Int32 timeout, System.Byte[] buffer, System.Net.NetworkInformation.PingOptions options) [0x00000] in <filename unknown>:0
at System.Net.NetworkInformation.Ping.Send (System.Net.IPAddress address, Int32 timeout, System.Byte[] buffer, System.Net.NetworkInformation.PingOptions options) [0x00000] in <filename unknown>:0
at System.Net.NetworkInformation.Ping.Send (System.String hostNameOrAddress, Int32 timeout, System.Byte[] buffer, System.Net.NetworkInformation.PingOptions options) [0x00000] in <filename unknown>:0
at System.Net.NetworkInformation.Ping.Send (System.String hostNameOrAddress, Int32 timeout, System.Byte[] buffer) [0x00000] in <filename unknown>:0
at System.Net.NetworkInformation.Ping.Send (System.String hostNameOrAddress, Int32 timeout) [0x00000] in <filename unknown>:0
at System.Net.NetworkInformation.Ping.Send (System.String hostNameOrAddress) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Net.NetworkInformation.Ping:Send (string)
at Internet.Connection.Check () [0x00000] in <filename unknown>:0
at MyGame.Load.Loader.StartLoading () [0x00000] in <filename unknown>:0
at Loader+<Start>c__IteratorA.MoveNext () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
Code:
namespace Internet
{
using System;
using System.Net.NetworkInformation;
using UnityEngine;
public class Connection
{
public static void Check()
{
System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping();
if (ping.Send("89.203.249.74").Status != IPStatus.Success)
{
Debug.Log("NO INTERNET CONNECTION");
Application.Quit();
}
}
}
}
So Please help
I'm trying to use the Raspberry Sharp IO library to write to a pin on the Pi. But it gives me an exception on runtime. It had worked before, but doesnt any more. Why is this error being thrown?
using System;
using Raspberry.IO.GeneralPurpose;
using Raspberry.IO.GeneralPurpose.Behaviors;
using System.Threading;
namespace blinky
{
class MainClass
{
public static void Main (string[] args)
{
// Here we create a variable to address a specific pin for output
// There are two different ways of numbering pins--the physical numbering, and the CPU number
// "P1Pinxx" refers to the physical numbering, and ranges from P1Pin01-P1Pin40
var led1 = ConnectorPin.P1Pin03.Output();
// Here we create a connection to the pin we instantiated above
var connection = new GpioConnection(led1);
while(true){
// Toggle() switches the high/low (on/off) status of the pin
connection.Toggle(led1);
Thread.Sleep(250);
}
// connection.Close();
}
}
}
returns this error:
pi#Minion01 ~/blinky1/blinky1/bin/Debug $ mono ./blinky1.exe
Unhandled Exception:
Raspberry.IO.Interop.MemoryMapFailedException: Exception of type 'Raspberry.IO.Interop.MemoryMapFailedException' was thrown.
at Raspberry.IO.Interop.MemoryMap.ThrowOnError[MemoryMapFailedException] (IntPtr result) [0x00000] in <filename unknown>:0
at Raspberry.IO.Interop.MemoryMap.Create (IntPtr address, UInt32 size, MemoryProtection protection, MemoryFlags memoryflags, Int32 fileDescriptor, UInt32 offset) [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnectionDriver..ctor () [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnectionSettings.GetBestDriver (GpioConnectionDriverCapabilities capabilities) [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnectionSettings.get_DefaultDriver () [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnectionSettings..ctor () [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnection..ctor (Raspberry.IO.GeneralPurpose.GpioConnectionSettings settings, IEnumerable`1 pins) [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnection..ctor (Raspberry.IO.GeneralPurpose.PinConfiguration[] pins) [0x00000] in <filename unknown>:0
at blinky.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: Raspberry.IO.Interop.MemoryMapFailedException: Exception of type 'Raspberry.IO.Interop.MemoryMapFailedException' was thrown.
at Raspberry.IO.Interop.MemoryMap.ThrowOnError[MemoryMapFailedException] (IntPtr result) [0x00000] in <filename unknown>:0
at Raspberry.IO.Interop.MemoryMap.Create (IntPtr address, UInt32 size, MemoryProtection protection, MemoryFlags memoryflags, Int32 fileDescriptor, UInt32 offset) [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnectionDriver..ctor () [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnectionSettings.GetBestDriver (GpioConnectionDriverCapabilities capabilities) [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnectionSettings.get_DefaultDriver () [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnectionSettings..ctor () [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnection..ctor (Raspberry.IO.GeneralPurpose.GpioConnectionSettings settings, IEnumerable`1 pins) [0x00000] in <filename unknown>:0
at Raspberry.IO.GeneralPurpose.GpioConnection..ctor (Raspberry.IO.GeneralPurpose.PinConfiguration[] pins) [0x00000] in <filename unknown>:0
at blinky.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
How may i fix it?
I had tried to run this through monodevelop on the pi and also using mono filename.exe . Neither worked. But it did when I used sudo ./filename.exe.
Sorry if this is a duplicate. I'm having a hard time finding an answer because I get so much bloat of people asking how to sort lists in general in my search results.
Say I have a property like this:
public List<object> Hello { get; set; }
Say each element in the list is of the same nullable primitive data type.
So every element is a int? or every element is a decimal? or every element is a DateTime?, etc
What exactly happens if I invoke a Sort or OrderBy on this list? Does it sort based on the underlying type of each element or does it order by the string value of the property?
Let's check http://ideone.com/kcXmHE:
System.ArgumentException: Value does not fall within the expected range.
at System.String.CompareTo (System.Object value) [0x00000] in <filename unknown>:0
at System.Collections.Generic.Comparer`1+DefaultComparer[System.Object].Compare (System.Object x, System.Object y) [0x00000] in <filename unknown>:0
at System.Linq.SortSequenceContext`2[System.Object,System.Object].Compare (Int32 first_index, Int32 second_index) [0x00000] in <filename unknown>:0
at System.Array.qsort[Int32] (System.Int32[] keys, Int32 low0, Int32 high0, IComparer`1 comparer) [0x00000] in <filename unknown>:0
at System.Array.SortImpl[Int32] (System.Int32[] keys, Int32 index, Int32 length, IComparer`1 comparer) [0x00000] in <filename unknown>:0
at System.Array.Sort[Int32] (System.Int32[] array, IComparer`1 comparer) [0x00000] in <filename unknown>:0
at System.Linq.QuickSort`1[System.Object].PerformSort () [0x00000] in <filename unknown>:0
at System.Linq.QuickSort`1+<Sort>c__Iterator0[System.Object].MoveNext () [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[System.Object]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0
at System.Linq.Enumerable.ToList[Object] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
at Test.Main () [0x00000] in <filename unknown>:0
So, LINQ uses default comparer for element of list (for string value you can see System.String.CompareTo) and tries to compare with another value (of object type). And, can't do it.
If you change order of elements in initial list (http://ideone.com/foljli), you will get another stack trace:
System.ArgumentException: Object must be of type Int32.
at System.Int32.CompareTo (System.Object value) [0x00000] in <filename unknown>:0
at System.Collections.Generic.Comparer`1+DefaultComparer[System.Object].Compare (System.Object x, System.Object y) [0x00000] in <filename unknown>:0
at System.Linq.SortSequenceContext`2[System.Object,System.Object].Compare (Int32 first_index, Int32 second_index) [0x00000] in <filename unknown>:0
at System.Array.qsort[Int32] (System.Int32[] keys, Int32 low0, Int32 high0, IComparer`1 comparer) [0x00000] in <filename unknown>:0
at System.Array.SortImpl[Int32] (System.Int32[] keys, Int32 index, Int32 length, IComparer`1 comparer) [0x00000] in <filename unknown>:0
at System.Array.Sort[Int32] (System.Int32[] array, IComparer`1 comparer) [0x00000] in <filename unknown>:0
at System.Linq.QuickSort`1[System.Object].PerformSort () [0x00000] in <filename unknown>:0
at System.Linq.QuickSort`1+<Sort>c__Iterator0[System.Object].MoveNext () [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[System.Object]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0
at System.Linq.Enumerable.ToList[Object] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
at Test.Main () [0x00000] in <filename unknown>:0
Now, LINQ takes int32 and tries to compare with object. And fail again. Because int32 type has no method CompareTo(object)
The following works on vanilla .NET but throws a ReflectionTypeLoadException when I try to run it through mono:
var props = new Dictionary<string, string>();
props["CheckForSystemRuntimeDependency"] = "true";
using (var msWorkspace = MSBuildWorkspace.Create(props))
{
...
Exception is:
System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in :0
at System.Reflection.Assembly+<>c__Iterator0.MoveNext () [0x00000] in :0
at System.Linq.Enumerable+c__Iterator102[System.Reflection.TypeInfo,System.Type].MoveNext () [0x00000] in <filename unknown>:0
at System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator122[System.Reflection.Assembly,System.Type].MoveNext () [0x00000] in :0
at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor (IEnumerable1 types, System.Composition.Convention.AttributedModelProvider attributeContext) [0x00000] in <filename unknown>:0
at System.Composition.Hosting.ContainerConfiguration.CreateContainer () [0x00000] in <filename unknown>:0
at Microsoft.CodeAnalysis.Host.Mef.MefHostServices.Create (IEnumerable1 assemblies) [0x00000] in :0
at Microsoft.CodeAnalysis.Host.Mef.DesktopMefHostServices.get_DefaultServices () [0x00000] in :0
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create (IDictionary`2 properties) [0x00000] in :0
...
Is this a known problem?
For me it helped to manually add all Linq.* libraries to the Project
I have a C# code that converts a JArray object jsonArray (JSON.Net) to a list of objects jsonList (List< MyClass >):
List<MyClass> jsonList = jsonArray.ToObject<List<MyClass>> ();
The code above works fine when I run it on the main thread, but if I put the same code inside a different thread, like this:
Thread t = new Thread(delegate() {
List<MyClass> jsonList = jsonArray.ToObject<List<MyClass>> ();
});
t.Start();
I get the following error message: "System.TypeLoadException has been thrown. A type load exception has occurred".
Does anybody have any idea why this is happening? The full stack trace is below. Thanks in advance!
System.TypeLoadException: A type load exception has occurred. at
Newtonsoft.Json.Utilities.ThreadSafeStore2[System.Type,System.Type].AddValue
(System.Type key) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Utilities.ThreadSafeStore2[System.Type,System.Type].Get
(System.Type key) [0x00000] in :0 at
Newtonsoft.Json.Serialization.JsonTypeReflector.GetAssociatedMetadataType
(System.Type type) [0x00000] in :0 at
Newtonsoft.Json.Serialization.JsonTypeReflector.GetAttribute[JsonContainerAttribute]
(System.Type type) [0x00000] in :0 at
Newtonsoft.Json.Serialization.JsonTypeReflector.GetAttribute[JsonContainerAttribute]
(ICustomAttributeProvider attributeProvider) [0x00000] in :0 at
Newtonsoft.Json.Utilities.ThreadSafeStore2[System.Reflection.ICustomAttributeProvider,Newtonsoft.Json.JsonContainerAttribute].AddValue
(ICustomAttributeProvider key) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Utilities.ThreadSafeStore2[System.Reflection.ICustomAttributeProvider,Newtonsoft.Json.JsonContainerAttribute].Get
(ICustomAttributeProvider key) [0x00000] in :0 at
Newtonsoft.Json.Serialization.CachedAttributeGetter1[Newtonsoft.Json.JsonContainerAttribute].GetAttribute
(ICustomAttributeProvider type) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Serialization.JsonTypeReflector.GetJsonContainerAttribute
(System.Type type) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Serialization.JsonTypeReflector.GetJsonObjectAttribute
(System.Type type) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract
(System.Type objectType) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract
(System.Type type) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.GetContractSafe
(System.Type type) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize
(Newtonsoft.Json.JsonReader reader, System.Type objectType, Boolean
checkAdditionalContent) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.JsonSerializer.DeserializeInternal
(Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000]
in <filename unknown>:0 at
Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader
reader, System.Type objectType) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Linq.JToken.ToObject (System.Type objectType,
Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00000] in <filename
unknown>:0 at Newtonsoft.Json.Linq.JToken.ToObject (System.Type
objectType, Boolean isNullable) [0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Linq.JToken.ToObject (System.Type objectType)
[0x00000] in <filename unknown>:0 at
Newtonsoft.Json.Linq.JToken.ToObject[List1] () [0x00000] in :0 at GuiaTV.AgoraController.GetJSON () [0x00015] in
/Users/vegidio/Documents/Dev/Xamarin/GuiaTV/GuiaTV/Controllers/AgoraController.cs:24
at GuiaTV.AgoraScreen.m__2 () [0x0000d] in
/Users/vegidio/Documents/Dev/Xamarin/GuiaTV/GuiaTV/Views/AgoraScreen.cs:43
at System.Threading.Thread.StartInternal () [0x0001d] in
/Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading/Thread.cs:697
It seems you are developing a touch based applicationfor this you need the latest edition of NewtonSoft for Mono Touch.Get it from here.
If you are building it for a modern UI its very easy follow the Win 8 templates or use a Task to initiate the thread.
Try putting in a Try,Catch,Finally block to get the exception details.
If you set a breakpoint on
List<MyClass> jsonList = jsonArray.ToObject<List<MyClass>> ();
and hover that breakpoint to look at the inner exception, what does it say?
The reason I ask is because a TypeLoad exception will either throw a null or give you a message on the inner exception that could help you a little more than this stack trace.