[MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-07 Thread Nic Wise
This one is confusing the hell out of me.

Works in the Simulator, but not on the device, so I assume it's a
linking or AOT problem

My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
and I've got "link sdk assemblies" for linking. I added the --aot=full
thing recently, or I get a different issue (see my other email)

Exception is:

Operation is not valid due to the current state of the object

at System.MonoType.GetGenericTypeDefinition () [0xd] in
/Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
at RestSharp.Deserializers.JsonDeserializer.m__31
(System.Type x) [0x0] in
/Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
System.Func`2 predicate, Fallback fallback) [0x00013] in
/Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
System.Func`2 predicate) [0x7] in
/Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type
type, System.Object parent) [0xc] in
/Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
at RestSharp.Deserializers.JsonDeserializer.Map (System.Object target,
IDictionary`2 data) [0x0031d] in
/Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152
at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData]
(IRestResponse response) [0x000bf] in
/Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:50
at RestSharp.RestClient.Deserialize[MetaData] (IRestRequest request,
IRestResponse raw) [0x0004a] in
/Users/nic/code/git/GitHub/RestSharp/RestSharp/RestClient.cs:505


-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Earnest: Self-employed? Track your business expenses and income.
http://earnestapp.com
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
___
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch


Re: [MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-07 Thread Nic Wise
And to fix my own issue (kinda)

This may be:

-aot "nimt-trampolines=512,"

NOTE the comma.

OR: I had a method, in a library somewhere, which was marked virtual
AND had a generic, which isn't allowed. I've removed the virtual (it's
in RestSharp, FWIW)



On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise  wrote:
> This one is confusing the hell out of me.
>
> Works in the Simulator, but not on the device, so I assume it's a
> linking or AOT problem
>
> My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
> and I've got "link sdk assemblies" for linking. I added the --aot=full
> thing recently, or I get a different issue (see my other email)
>
> Exception is:
>
> Operation is not valid due to the current state of the object
>
> at System.MonoType.GetGenericTypeDefinition () [0xd] in
> /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
> at RestSharp.Deserializers.JsonDeserializer.m__31
> (System.Type x) [0x0] in
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
> at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
> System.Func`2 predicate, Fallback fallback) [0x00013] in
> /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
> at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
> System.Func`2 predicate) [0x7] in
> /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
> at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type
> type, System.Object parent) [0xc] in
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
> at RestSharp.Deserializers.JsonDeserializer.Map (System.Object target,
> IDictionary`2 data) [0x0031d] in
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152
> at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData]
> (IRestResponse response) [0x000bf] in
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:50
> at RestSharp.RestClient.Deserialize[MetaData] (IRestRequest request,
> IRestResponse raw) [0x0004a] in
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/RestClient.cs:505
>
>
> --
> Nic Wise
> t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
> b. http://www.fastchicken.co.nz/
>
> Earnest: Self-employed? Track your business expenses and income.
> http://earnestapp.com
> Nearest Bus: find when the next bus is coming to your stop. 
> http://goo.gl/Vcz1p
> mobileAgent (for FreeAgent): get your accounts in your pocket.
> http://goo.gl/IuBU
> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
> London Bike App: Find the nearest Boris Bike, and get riding! 
> http://goo.gl/Icp2



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Earnest: Self-employed? Track your business expenses and income.
http://earnestapp.com
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
___
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch


Re: [MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-07 Thread Mikkel Lønow
Hi,

I'm having the same issue with RestSharp (but very inconsistent), although,
switching to SimpleJson (included in the project) with the #define
SIMPLE_JSON_DATACONTRACT uncommented (I'm using that anyway so I won't
loose my data to linker), somewhat solved my issue.

I'm still seeing some weird stuff (like "System.ArgumentException: failed
to convert parameters at System.Reflection.MonoMethod.Invoke..." on both
Simulator and Device), but I figured it could be my code being
incompatible, as I just updated RestSharp, which I haven't done in ages.

Mikkel

On Sat, Jul 7, 2012 at 6:58 PM, Nic Wise  wrote:

> And to fix my own issue (kinda)
>
> This may be:
>
> -aot "nimt-trampolines=512,"
>
> NOTE the comma.
>
> OR: I had a method, in a library somewhere, which was marked virtual
> AND had a generic, which isn't allowed. I've removed the virtual (it's
> in RestSharp, FWIW)
>
>
>
> On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise  wrote:
> > This one is confusing the hell out of me.
> >
> > Works in the Simulator, but not on the device, so I assume it's a
> > linking or AOT problem
> >
> > My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
> > and I've got "link sdk assemblies" for linking. I added the --aot=full
> > thing recently, or I get a different issue (see my other email)
> >
> > Exception is:
> >
> > Operation is not valid due to the current state of the object
> >
> > at System.MonoType.GetGenericTypeDefinition () [0xd] in
> > /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
> > at RestSharp.Deserializers.JsonDeserializer.m__31
> > (System.Type x) [0x0] in
> >
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
> > System.Func`2 predicate, Fallback fallback) [0x00013] in
> >
> /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
> > System.Func`2 predicate) [0x7] in
> >
> /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
> > at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type
> > type, System.Object parent) [0xc] in
> >
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
> > at RestSharp.Deserializers.JsonDeserializer.Map (System.Object target,
> > IDictionary`2 data) [0x0031d] in
> >
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152
> > at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData]
> > (IRestResponse response) [0x000bf] in
> >
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:50
> > at RestSharp.RestClient.Deserialize[MetaData] (IRestRequest request,
> > IRestResponse raw) [0x0004a] in
> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/RestClient.cs:505
> >
> >
> > --
> > Nic Wise
> > t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
> > b. http://www.fastchicken.co.nz/
> >
> > Earnest: Self-employed? Track your business expenses and income.
> > http://earnestapp.com
> > Nearest Bus: find when the next bus is coming to your stop.
> http://goo.gl/Vcz1p
> > mobileAgent (for FreeAgent): get your accounts in your pocket.
> > http://goo.gl/IuBU
> > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
> > London Bike App: Find the nearest Boris Bike, and get riding!
> http://goo.gl/Icp2
>
>
>
> --
> Nic Wise
> t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
> b. http://www.fastchicken.co.nz/
>
> Earnest: Self-employed? Track your business expenses and income.
> http://earnestapp.com
> Nearest Bus: find when the next bus is coming to your stop.
> http://goo.gl/Vcz1p
> mobileAgent (for FreeAgent): get your accounts in your pocket.
> http://goo.gl/IuBU
> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
> London Bike App: Find the nearest Boris Bike, and get riding!
> http://goo.gl/Icp2
> ___
> MonoTouch mailing list
> MonoTouch@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
___
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch


Re: [MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-07 Thread Nic Wise
yeah, me too. I just pulled in 103.1, which I think is causing issues.
I'll try the #define thing.

In RestClient.Sync.cs I had to remove the virtual from here too

public IRestResponse Execute(IRestRequest request) where T : new()
{
var raw = Execute(request);
return Deserialize(request, raw);
}



On Sat, Jul 7, 2012 at 6:17 PM, Mikkel Lønow  wrote:
> Hi,
>
> I'm having the same issue with RestSharp (but very inconsistent), although,
> switching to SimpleJson (included in the project) with the #define
> SIMPLE_JSON_DATACONTRACT uncommented (I'm using that anyway so I won't loose
> my data to linker), somewhat solved my issue.
>
> I'm still seeing some weird stuff (like "System.ArgumentException: failed to
> convert parameters at System.Reflection.MonoMethod.Invoke..." on both
> Simulator and Device), but I figured it could be my code being incompatible,
> as I just updated RestSharp, which I haven't done in ages.
>
> Mikkel
>
> On Sat, Jul 7, 2012 at 6:58 PM, Nic Wise  wrote:
>>
>> And to fix my own issue (kinda)
>>
>> This may be:
>>
>> -aot "nimt-trampolines=512,"
>>
>> NOTE the comma.
>>
>> OR: I had a method, in a library somewhere, which was marked virtual
>> AND had a generic, which isn't allowed. I've removed the virtual (it's
>> in RestSharp, FWIW)
>>
>>
>>
>> On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise  wrote:
>> > This one is confusing the hell out of me.
>> >
>> > Works in the Simulator, but not on the device, so I assume it's a
>> > linking or AOT problem
>> >
>> > My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
>> > and I've got "link sdk assemblies" for linking. I added the --aot=full
>> > thing recently, or I get a different issue (see my other email)
>> >
>> > Exception is:
>> >
>> > Operation is not valid due to the current state of the object
>> >
>> > at System.MonoType.GetGenericTypeDefinition () [0xd] in
>> > /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
>> > at RestSharp.Deserializers.JsonDeserializer.m__31
>> > (System.Type x) [0x0] in
>> >
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
>> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
>> > System.Func`2 predicate, Fallback fallback) [0x00013] in
>> >
>> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
>> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
>> > System.Func`2 predicate) [0x7] in
>> >
>> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
>> > at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type
>> > type, System.Object parent) [0xc] in
>> >
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
>> > at RestSharp.Deserializers.JsonDeserializer.Map (System.Object target,
>> > IDictionary`2 data) [0x0031d] in
>> >
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152
>> > at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData]
>> > (IRestResponse response) [0x000bf] in
>> >
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:50
>> > at RestSharp.RestClient.Deserialize[MetaData] (IRestRequest request,
>> > IRestResponse raw) [0x0004a] in
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/RestClient.cs:505
>> >
>> >
>> > --
>> > Nic Wise
>> > t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
>> > b. http://www.fastchicken.co.nz/
>> >
>> > Earnest: Self-employed? Track your business expenses and income.
>> > http://earnestapp.com
>> > Nearest Bus: find when the next bus is coming to your stop.
>> > http://goo.gl/Vcz1p
>> > mobileAgent (for FreeAgent): get your accounts in your pocket.
>> > http://goo.gl/IuBU
>> > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
>> > London Bike App: Find the nearest Boris Bike, and get riding!
>> > http://goo.gl/Icp2
>>
>>
>>
>> --
>> Nic Wise
>> t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
>> b. http://www.fastchicken.co.nz/
>>
>> Earnest: Self-employed? Track your business expenses and income.
>> http://earnestapp.com
>> Nearest Bus: find when the next bus is coming to your stop.
>> http://goo.gl/Vcz1p
>> mobileAgent (for FreeAgent): get your accounts in your pocket.
>> http://goo.gl/IuBU
>> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
>> London Bike App: Find the nearest Boris Bike, and get riding!
>> http://goo.gl/Icp2
>> ___
>> MonoTouch mailing list
>> MonoTouch@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monotouch
>
>



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Earnest: Self-employed? Track your business expenses and income.
http://earnestapp.com
Nea

Re: [MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-07 Thread Nic Wise
I've bugged it:

https://bugzilla.xamarin.com/show_bug.cgi?id=6031

Feel free to add to that.

On Sat, Jul 7, 2012 at 6:27 PM, Nic Wise  wrote:
> yeah, me too. I just pulled in 103.1, which I think is causing issues.
> I'll try the #define thing.
>
> In RestClient.Sync.cs I had to remove the virtual from here too
>
> public IRestResponse Execute(IRestRequest request) where T : new()
> {
> var raw = Execute(request);
> return Deserialize(request, raw);
> }
>
>
>
> On Sat, Jul 7, 2012 at 6:17 PM, Mikkel Lønow  wrote:
>> Hi,
>>
>> I'm having the same issue with RestSharp (but very inconsistent), although,
>> switching to SimpleJson (included in the project) with the #define
>> SIMPLE_JSON_DATACONTRACT uncommented (I'm using that anyway so I won't loose
>> my data to linker), somewhat solved my issue.
>>
>> I'm still seeing some weird stuff (like "System.ArgumentException: failed to
>> convert parameters at System.Reflection.MonoMethod.Invoke..." on both
>> Simulator and Device), but I figured it could be my code being incompatible,
>> as I just updated RestSharp, which I haven't done in ages.
>>
>> Mikkel
>>
>> On Sat, Jul 7, 2012 at 6:58 PM, Nic Wise  wrote:
>>>
>>> And to fix my own issue (kinda)
>>>
>>> This may be:
>>>
>>> -aot "nimt-trampolines=512,"
>>>
>>> NOTE the comma.
>>>
>>> OR: I had a method, in a library somewhere, which was marked virtual
>>> AND had a generic, which isn't allowed. I've removed the virtual (it's
>>> in RestSharp, FWIW)
>>>
>>>
>>>
>>> On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise  wrote:
>>> > This one is confusing the hell out of me.
>>> >
>>> > Works in the Simulator, but not on the device, so I assume it's a
>>> > linking or AOT problem
>>> >
>>> > My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
>>> > and I've got "link sdk assemblies" for linking. I added the --aot=full
>>> > thing recently, or I get a different issue (see my other email)
>>> >
>>> > Exception is:
>>> >
>>> > Operation is not valid due to the current state of the object
>>> >
>>> > at System.MonoType.GetGenericTypeDefinition () [0xd] in
>>> > /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
>>> > at RestSharp.Deserializers.JsonDeserializer.m__31
>>> > (System.Type x) [0x0] in
>>> >
>>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
>>> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
>>> > System.Func`2 predicate, Fallback fallback) [0x00013] in
>>> >
>>> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
>>> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
>>> > System.Func`2 predicate) [0x7] in
>>> >
>>> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
>>> > at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type
>>> > type, System.Object parent) [0xc] in
>>> >
>>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
>>> > at RestSharp.Deserializers.JsonDeserializer.Map (System.Object target,
>>> > IDictionary`2 data) [0x0031d] in
>>> >
>>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152
>>> > at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData]
>>> > (IRestResponse response) [0x000bf] in
>>> >
>>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:50
>>> > at RestSharp.RestClient.Deserialize[MetaData] (IRestRequest request,
>>> > IRestResponse raw) [0x0004a] in
>>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/RestClient.cs:505
>>> >
>>> >
>>> > --
>>> > Nic Wise
>>> > t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
>>> > b. http://www.fastchicken.co.nz/
>>> >
>>> > Earnest: Self-employed? Track your business expenses and income.
>>> > http://earnestapp.com
>>> > Nearest Bus: find when the next bus is coming to your stop.
>>> > http://goo.gl/Vcz1p
>>> > mobileAgent (for FreeAgent): get your accounts in your pocket.
>>> > http://goo.gl/IuBU
>>> > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
>>> > London Bike App: Find the nearest Boris Bike, and get riding!
>>> > http://goo.gl/Icp2
>>>
>>>
>>>
>>> --
>>> Nic Wise
>>> t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
>>> b. http://www.fastchicken.co.nz/
>>>
>>> Earnest: Self-employed? Track your business expenses and income.
>>> http://earnestapp.com
>>> Nearest Bus: find when the next bus is coming to your stop.
>>> http://goo.gl/Vcz1p
>>> mobileAgent (for FreeAgent): get your accounts in your pocket.
>>> http://goo.gl/IuBU
>>> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
>>> London Bike App: Find the nearest Boris Bike, and get riding!
>>> http://goo.gl/Icp2
>>> ___
>>> MonoTouch mailing list
>>> MonoTouch@lists.ximian

Re: [MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-08 Thread Nic Wise
looks like its an issue in 5.2.12 as well. I've updated the bug.

I might look at the RestSharp code, and go back to using NewtonSoft's
JSON parser... never had an issue with that one

On Sat, Jul 7, 2012 at 7:35 PM, Nic Wise  wrote:
> I've bugged it:
>
> https://bugzilla.xamarin.com/show_bug.cgi?id=6031
>
> Feel free to add to that.
>
> On Sat, Jul 7, 2012 at 6:27 PM, Nic Wise  wrote:
>> yeah, me too. I just pulled in 103.1, which I think is causing issues.
>> I'll try the #define thing.
>>
>> In RestClient.Sync.cs I had to remove the virtual from here too
>>
>> public IRestResponse Execute(IRestRequest request) where T : new()
>> {
>> var raw = Execute(request);
>> return Deserialize(request, raw);
>> }
>>
>>
>>
>> On Sat, Jul 7, 2012 at 6:17 PM, Mikkel Lønow  wrote:
>>> Hi,
>>>
>>> I'm having the same issue with RestSharp (but very inconsistent), although,
>>> switching to SimpleJson (included in the project) with the #define
>>> SIMPLE_JSON_DATACONTRACT uncommented (I'm using that anyway so I won't loose
>>> my data to linker), somewhat solved my issue.
>>>
>>> I'm still seeing some weird stuff (like "System.ArgumentException: failed to
>>> convert parameters at System.Reflection.MonoMethod.Invoke..." on both
>>> Simulator and Device), but I figured it could be my code being incompatible,
>>> as I just updated RestSharp, which I haven't done in ages.
>>>
>>> Mikkel
>>>
>>> On Sat, Jul 7, 2012 at 6:58 PM, Nic Wise  wrote:

 And to fix my own issue (kinda)

 This may be:

 -aot "nimt-trampolines=512,"

 NOTE the comma.

 OR: I had a method, in a library somewhere, which was marked virtual
 AND had a generic, which isn't allowed. I've removed the virtual (it's
 in RestSharp, FWIW)



 On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise  wrote:
 > This one is confusing the hell out of me.
 >
 > Works in the Simulator, but not on the device, so I assume it's a
 > linking or AOT problem
 >
 > My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
 > and I've got "link sdk assemblies" for linking. I added the --aot=full
 > thing recently, or I get a different issue (see my other email)
 >
 > Exception is:
 >
 > Operation is not valid due to the current state of the object
 >
 > at System.MonoType.GetGenericTypeDefinition () [0xd] in
 > /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
 > at RestSharp.Deserializers.JsonDeserializer.m__31
 > (System.Type x) [0x0] in
 >
 > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
 > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
 > System.Func`2 predicate, Fallback fallback) [0x00013] in
 >
 > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
 > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
 > System.Func`2 predicate) [0x7] in
 >
 > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
 > at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type
 > type, System.Object parent) [0xc] in
 >
 > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
 > at RestSharp.Deserializers.JsonDeserializer.Map (System.Object target,
 > IDictionary`2 data) [0x0031d] in
 >
 > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152
 > at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData]
 > (IRestResponse response) [0x000bf] in
 >
 > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:50
 > at RestSharp.RestClient.Deserialize[MetaData] (IRestRequest request,
 > IRestResponse raw) [0x0004a] in
 > /Users/nic/code/git/GitHub/RestSharp/RestSharp/RestClient.cs:505
 >
 >
 > --
 > Nic Wise
 > t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
 > b. http://www.fastchicken.co.nz/
 >
 > Earnest: Self-employed? Track your business expenses and income.
 > http://earnestapp.com
 > Nearest Bus: find when the next bus is coming to your stop.
 > http://goo.gl/Vcz1p
 > mobileAgent (for FreeAgent): get your accounts in your pocket.
 > http://goo.gl/IuBU
 > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
 > London Bike App: Find the nearest Boris Bike, and get riding!
 > http://goo.gl/Icp2



 --
 Nic Wise
 t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
 b. http://www.fastchicken.co.nz/

 Earnest: Self-employed? Track your business expenses and income.
 http://earnestapp.com
 Nearest Bus: find when the next bus is coming to your stop.
 http://goo.gl/Vcz1

Re: [MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-08 Thread Nic Wise
It appears to be a result of a recent change in RestSharp

https://github.com/restsharp/RestSharp/issues/293

easy fix. Maybe.

On Sun, Jul 8, 2012 at 12:26 PM, Nic Wise  wrote:
> looks like its an issue in 5.2.12 as well. I've updated the bug.
>
> I might look at the RestSharp code, and go back to using NewtonSoft's
> JSON parser... never had an issue with that one
>
> On Sat, Jul 7, 2012 at 7:35 PM, Nic Wise  wrote:
>> I've bugged it:
>>
>> https://bugzilla.xamarin.com/show_bug.cgi?id=6031
>>
>> Feel free to add to that.
>>
>> On Sat, Jul 7, 2012 at 6:27 PM, Nic Wise  wrote:
>>> yeah, me too. I just pulled in 103.1, which I think is causing issues.
>>> I'll try the #define thing.
>>>
>>> In RestClient.Sync.cs I had to remove the virtual from here too
>>>
>>> public IRestResponse Execute(IRestRequest request) where T : new()
>>> {
>>> var raw = Execute(request);
>>> return Deserialize(request, raw);
>>> }
>>>
>>>
>>>
>>> On Sat, Jul 7, 2012 at 6:17 PM, Mikkel Lønow  wrote:
 Hi,

 I'm having the same issue with RestSharp (but very inconsistent), although,
 switching to SimpleJson (included in the project) with the #define
 SIMPLE_JSON_DATACONTRACT uncommented (I'm using that anyway so I won't 
 loose
 my data to linker), somewhat solved my issue.

 I'm still seeing some weird stuff (like "System.ArgumentException: failed 
 to
 convert parameters at System.Reflection.MonoMethod.Invoke..." on both
 Simulator and Device), but I figured it could be my code being 
 incompatible,
 as I just updated RestSharp, which I haven't done in ages.

 Mikkel

 On Sat, Jul 7, 2012 at 6:58 PM, Nic Wise  wrote:
>
> And to fix my own issue (kinda)
>
> This may be:
>
> -aot "nimt-trampolines=512,"
>
> NOTE the comma.
>
> OR: I had a method, in a library somewhere, which was marked virtual
> AND had a generic, which isn't allowed. I've removed the virtual (it's
> in RestSharp, FWIW)
>
>
>
> On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise  wrote:
> > This one is confusing the hell out of me.
> >
> > Works in the Simulator, but not on the device, so I assume it's a
> > linking or AOT problem
> >
> > My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
> > and I've got "link sdk assemblies" for linking. I added the --aot=full
> > thing recently, or I get a different issue (see my other email)
> >
> > Exception is:
> >
> > Operation is not valid due to the current state of the object
> >
> > at System.MonoType.GetGenericTypeDefinition () [0xd] in
> > /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
> > at RestSharp.Deserializers.JsonDeserializer.m__31
> > (System.Type x) [0x0] in
> >
> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
> > System.Func`2 predicate, Fallback fallback) [0x00013] in
> >
> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
> > System.Func`2 predicate) [0x7] in
> >
> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
> > at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type
> > type, System.Object parent) [0xc] in
> >
> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
> > at RestSharp.Deserializers.JsonDeserializer.Map (System.Object target,
> > IDictionary`2 data) [0x0031d] in
> >
> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152
> > at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData]
> > (IRestResponse response) [0x000bf] in
> >
> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:50
> > at RestSharp.RestClient.Deserialize[MetaData] (IRestRequest request,
> > IRestResponse raw) [0x0004a] in
> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/RestClient.cs:505
> >
> >
> > --
> > Nic Wise
> > t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
> > b. http://www.fastchicken.co.nz/
> >
> > Earnest: Self-employed? Track your business expenses and income.
> > http://earnestapp.com
> > Nearest Bus: find when the next bus is coming to your stop.
> > http://goo.gl/Vcz1p
> > mobileAgent (for FreeAgent): get your accounts in your pocket.
> > http://goo.gl/IuBU
> > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
> > London Bike App: Find the nearest Boris Bike, and get riding!
> > http://goo.gl/Icp2
>
>
>
> --

Re: [MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-11 Thread Nic Wise
OK, I found the problem. Well, Marek from Xamarin did. I just did the
RestSharp pull request :)

https://github.com/restsharp/RestSharp/pull/295

Basically, on line 201 of JsonDeserializer, change

var listType = type.GetInterfaces().First(x =>
x.GetGenericTypeDefinition() == typeof(IList<>));
to

var listType = type.GetInterfaces().First(x => x.IsGenericType &&
x.GetGenericTypeDefinition() == typeof(IList<>));


On Sun, Jul 8, 2012 at 2:12 PM, Nic Wise  wrote:
> It appears to be a result of a recent change in RestSharp
>
> https://github.com/restsharp/RestSharp/issues/293
>
> easy fix. Maybe.
>
> On Sun, Jul 8, 2012 at 12:26 PM, Nic Wise  wrote:
>> looks like its an issue in 5.2.12 as well. I've updated the bug.
>>
>> I might look at the RestSharp code, and go back to using NewtonSoft's
>> JSON parser... never had an issue with that one
>>
>> On Sat, Jul 7, 2012 at 7:35 PM, Nic Wise  wrote:
>>> I've bugged it:
>>>
>>> https://bugzilla.xamarin.com/show_bug.cgi?id=6031
>>>
>>> Feel free to add to that.
>>>
>>> On Sat, Jul 7, 2012 at 6:27 PM, Nic Wise  wrote:
 yeah, me too. I just pulled in 103.1, which I think is causing issues.
 I'll try the #define thing.

 In RestClient.Sync.cs I had to remove the virtual from here too

 public IRestResponse Execute(IRestRequest request) where T : new()
 {
 var raw = Execute(request);
 return Deserialize(request, raw);
 }



 On Sat, Jul 7, 2012 at 6:17 PM, Mikkel Lønow  wrote:
> Hi,
>
> I'm having the same issue with RestSharp (but very inconsistent), 
> although,
> switching to SimpleJson (included in the project) with the #define
> SIMPLE_JSON_DATACONTRACT uncommented (I'm using that anyway so I won't 
> loose
> my data to linker), somewhat solved my issue.
>
> I'm still seeing some weird stuff (like "System.ArgumentException: failed 
> to
> convert parameters at System.Reflection.MonoMethod.Invoke..." on both
> Simulator and Device), but I figured it could be my code being 
> incompatible,
> as I just updated RestSharp, which I haven't done in ages.
>
> Mikkel
>
> On Sat, Jul 7, 2012 at 6:58 PM, Nic Wise  wrote:
>>
>> And to fix my own issue (kinda)
>>
>> This may be:
>>
>> -aot "nimt-trampolines=512,"
>>
>> NOTE the comma.
>>
>> OR: I had a method, in a library somewhere, which was marked virtual
>> AND had a generic, which isn't allowed. I've removed the virtual (it's
>> in RestSharp, FWIW)
>>
>>
>>
>> On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise  wrote:
>> > This one is confusing the hell out of me.
>> >
>> > Works in the Simulator, but not on the device, so I assume it's a
>> > linking or AOT problem
>> >
>> > My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
>> > and I've got "link sdk assemblies" for linking. I added the --aot=full
>> > thing recently, or I get a different issue (see my other email)
>> >
>> > Exception is:
>> >
>> > Operation is not valid due to the current state of the object
>> >
>> > at System.MonoType.GetGenericTypeDefinition () [0xd] in
>> > /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
>> > at RestSharp.Deserializers.JsonDeserializer.m__31
>> > (System.Type x) [0x0] in
>> >
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
>> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
>> > System.Func`2 predicate, Fallback fallback) [0x00013] in
>> >
>> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
>> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
>> > System.Func`2 predicate) [0x7] in
>> >
>> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
>> > at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type
>> > type, System.Object parent) [0xc] in
>> >
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
>> > at RestSharp.Deserializers.JsonDeserializer.Map (System.Object target,
>> > IDictionary`2 data) [0x0031d] in
>> >
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152
>> > at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData]
>> > (IRestResponse response) [0x000bf] in
>> >
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:50
>> > at RestSharp.RestClient.Deserialize[MetaData] (IRestRequest request,
>> > IRestResponse raw) [0x0004a] in
>> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/RestClient.cs:505
>> >
>> >
>> > --
>> > Nic Wise
>> > t.  +44 7788 592 806 | @fastc

Re: [MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-11 Thread Mikkel Lønow
Awesome! Well done, Nic!

Cheers

On Wed, Jul 11, 2012 at 8:52 PM, Nic Wise  wrote:

> OK, I found the problem. Well, Marek from Xamarin did. I just did the
> RestSharp pull request :)
>
> https://github.com/restsharp/RestSharp/pull/295
>
> Basically, on line 201 of JsonDeserializer, change
>
> var listType = type.GetInterfaces().First(x =>
> x.GetGenericTypeDefinition() == typeof(IList<>));
> to
>
> var listType = type.GetInterfaces().First(x => x.IsGenericType &&
> x.GetGenericTypeDefinition() == typeof(IList<>));
>
>
> On Sun, Jul 8, 2012 at 2:12 PM, Nic Wise  wrote:
> > It appears to be a result of a recent change in RestSharp
> >
> > https://github.com/restsharp/RestSharp/issues/293
> >
> > easy fix. Maybe.
> >
> > On Sun, Jul 8, 2012 at 12:26 PM, Nic Wise 
> wrote:
> >> looks like its an issue in 5.2.12 as well. I've updated the bug.
> >>
> >> I might look at the RestSharp code, and go back to using NewtonSoft's
> >> JSON parser... never had an issue with that one
> >>
> >> On Sat, Jul 7, 2012 at 7:35 PM, Nic Wise 
> wrote:
> >>> I've bugged it:
> >>>
> >>> https://bugzilla.xamarin.com/show_bug.cgi?id=6031
> >>>
> >>> Feel free to add to that.
> >>>
> >>> On Sat, Jul 7, 2012 at 6:27 PM, Nic Wise 
> wrote:
>  yeah, me too. I just pulled in 103.1, which I think is causing issues.
>  I'll try the #define thing.
> 
>  In RestClient.Sync.cs I had to remove the virtual from here too
> 
>  public IRestResponse Execute(IRestRequest request) where T :
> new()
>  {
>  var raw = Execute(request);
>  return Deserialize(request, raw);
>  }
> 
> 
> 
>  On Sat, Jul 7, 2012 at 6:17 PM, Mikkel Lønow 
> wrote:
> > Hi,
> >
> > I'm having the same issue with RestSharp (but very inconsistent),
> although,
> > switching to SimpleJson (included in the project) with the #define
> > SIMPLE_JSON_DATACONTRACT uncommented (I'm using that anyway so I
> won't loose
> > my data to linker), somewhat solved my issue.
> >
> > I'm still seeing some weird stuff (like "System.ArgumentException:
> failed to
> > convert parameters at System.Reflection.MonoMethod.Invoke..." on both
> > Simulator and Device), but I figured it could be my code being
> incompatible,
> > as I just updated RestSharp, which I haven't done in ages.
> >
> > Mikkel
> >
> > On Sat, Jul 7, 2012 at 6:58 PM, Nic Wise 
> wrote:
> >>
> >> And to fix my own issue (kinda)
> >>
> >> This may be:
> >>
> >> -aot "nimt-trampolines=512,"
> >>
> >> NOTE the comma.
> >>
> >> OR: I had a method, in a library somewhere, which was marked virtual
> >> AND had a generic, which isn't allowed. I've removed the virtual
> (it's
> >> in RestSharp, FWIW)
> >>
> >>
> >>
> >> On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise 
> wrote:
> >> > This one is confusing the hell out of me.
> >> >
> >> > Works in the Simulator, but not on the device, so I assume it's a
> >> > linking or AOT problem
> >> >
> >> > My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
> >> > and I've got "link sdk assemblies" for linking. I added the
> --aot=full
> >> > thing recently, or I get a different issue (see my other email)
> >> >
> >> > Exception is:
> >> >
> >> > Operation is not valid due to the current state of the object
> >> >
> >> > at System.MonoType.GetGenericTypeDefinition () [0xd] in
> >> >
> /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
> >> > at RestSharp.Deserializers.JsonDeserializer.m__31
> >> > (System.Type x) [0x0] in
> >> >
> >> >
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
> >> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
> >> > System.Func`2 predicate, Fallback fallback) [0x00013] in
> >> >
> >> >
> /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
> >> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
> >> > System.Func`2 predicate) [0x7] in
> >> >
> >> >
> /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
> >> > at RestSharp.Deserializers.JsonDeserializer.BuildList (System.Type
> >> > type, System.Object parent) [0xc] in
> >> >
> >> >
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
> >> > at RestSharp.Deserializers.JsonDeserializer.Map (System.Object
> target,
> >> > IDictionary`2 data) [0x0031d] in
> >> >
> >> >
> /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:152
> >> > at RestSharp.Deserializers.JsonDeserializer.Deserialize[MetaData]
> >> > (IRestResponse response) [0x000bf] in
> >> >
> >> >
> /Users/nic/code/git/GitHub/Res

Re: [MonoTouch] Runtime issue with current beta (5.3): "Operation is not valid due to the current state of the object"

2012-07-11 Thread Nic Wise
I can't take the credit - I just did the paperwork. It was Marek who
did the hard yards


urgh. a sports metaphore. Sorry.

On Wed, Jul 11, 2012 at 9:18 PM, Mikkel Lønow  wrote:
> Awesome! Well done, Nic!
>
> Cheers
>
>
> On Wed, Jul 11, 2012 at 8:52 PM, Nic Wise  wrote:
>>
>> OK, I found the problem. Well, Marek from Xamarin did. I just did the
>> RestSharp pull request :)
>>
>> https://github.com/restsharp/RestSharp/pull/295
>>
>> Basically, on line 201 of JsonDeserializer, change
>>
>> var listType = type.GetInterfaces().First(x =>
>> x.GetGenericTypeDefinition() == typeof(IList<>));
>> to
>>
>> var listType = type.GetInterfaces().First(x => x.IsGenericType &&
>> x.GetGenericTypeDefinition() == typeof(IList<>));
>>
>>
>> On Sun, Jul 8, 2012 at 2:12 PM, Nic Wise  wrote:
>> > It appears to be a result of a recent change in RestSharp
>> >
>> > https://github.com/restsharp/RestSharp/issues/293
>> >
>> > easy fix. Maybe.
>> >
>> > On Sun, Jul 8, 2012 at 12:26 PM, Nic Wise 
>> > wrote:
>> >> looks like its an issue in 5.2.12 as well. I've updated the bug.
>> >>
>> >> I might look at the RestSharp code, and go back to using NewtonSoft's
>> >> JSON parser... never had an issue with that one
>> >>
>> >> On Sat, Jul 7, 2012 at 7:35 PM, Nic Wise 
>> >> wrote:
>> >>> I've bugged it:
>> >>>
>> >>> https://bugzilla.xamarin.com/show_bug.cgi?id=6031
>> >>>
>> >>> Feel free to add to that.
>> >>>
>> >>> On Sat, Jul 7, 2012 at 6:27 PM, Nic Wise 
>> >>> wrote:
>>  yeah, me too. I just pulled in 103.1, which I think is causing
>>  issues.
>>  I'll try the #define thing.
>> 
>>  In RestClient.Sync.cs I had to remove the virtual from here too
>> 
>>  public IRestResponse Execute(IRestRequest request) where T :
>>  new()
>>  {
>>  var raw = Execute(request);
>>  return Deserialize(request, raw);
>>  }
>> 
>> 
>> 
>>  On Sat, Jul 7, 2012 at 6:17 PM, Mikkel Lønow 
>>  wrote:
>> > Hi,
>> >
>> > I'm having the same issue with RestSharp (but very inconsistent),
>> > although,
>> > switching to SimpleJson (included in the project) with the #define
>> > SIMPLE_JSON_DATACONTRACT uncommented (I'm using that anyway so I
>> > won't loose
>> > my data to linker), somewhat solved my issue.
>> >
>> > I'm still seeing some weird stuff (like "System.ArgumentException:
>> > failed to
>> > convert parameters at System.Reflection.MonoMethod.Invoke..." on
>> > both
>> > Simulator and Device), but I figured it could be my code being
>> > incompatible,
>> > as I just updated RestSharp, which I haven't done in ages.
>> >
>> > Mikkel
>> >
>> > On Sat, Jul 7, 2012 at 6:58 PM, Nic Wise 
>> > wrote:
>> >>
>> >> And to fix my own issue (kinda)
>> >>
>> >> This may be:
>> >>
>> >> -aot "nimt-trampolines=512,"
>> >>
>> >> NOTE the comma.
>> >>
>> >> OR: I had a method, in a library somewhere, which was marked
>> >> virtual
>> >> AND had a generic, which isn't allowed. I've removed the virtual
>> >> (it's
>> >> in RestSharp, FWIW)
>> >>
>> >>
>> >>
>> >> On Sat, Jul 7, 2012 at 3:46 PM, Nic Wise 
>> >> wrote:
>> >> > This one is confusing the hell out of me.
>> >> >
>> >> > Works in the Simulator, but not on the device, so I assume it's a
>> >> > linking or AOT problem
>> >> >
>> >> > My mtouch params are: -aot "nimt-trampolines=1024" --aot=full
>> >> > and I've got "link sdk assemblies" for linking. I added the
>> >> > --aot=full
>> >> > thing recently, or I get a different issue (see my other email)
>> >> >
>> >> > Exception is:
>> >> >
>> >> > Operation is not valid due to the current state of the object
>> >> >
>> >> > at System.MonoType.GetGenericTypeDefinition () [0xd] in
>> >> >
>> >> > /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:673
>> >> > at RestSharp.Deserializers.JsonDeserializer.m__31
>> >> > (System.Type x) [0x0] in
>> >> >
>> >> >
>> >> > /Users/nic/code/git/GitHub/RestSharp/RestSharp/Deserializers/JsonDeserializer.cs:201
>> >> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
>> >> > System.Func`2 predicate, Fallback fallback) [0x00013] in
>> >> >
>> >> >
>> >> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:812
>> >> > at System.Linq.Enumerable.First[Type] (IEnumerable`1 source,
>> >> > System.Func`2 predicate) [0x7] in
>> >> >
>> >> >
>> >> > /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:843
>> >> > at RestSharp.Deserializers.JsonDeserializer.BuildList
>> >> > (System.Type
>> >> > type, System.Object parent) [0xc] in
>> >> >
>> >> >
>> >> > /Users/nic/code/git/Gi