Paolo ponzano - 334 - Jan 7, 2014

Hello, In a silverlight application I got a StackOverflow exception when deserializing a 39MB XML File… is there a limit on SL component?
Thanks

paolo ponzano:

Erm I’ve noticed that if I run it without the debugger it runs…with Visual studio in debugging I got that exception.

There’s no built-in limit/restrictions in ServiceStack libraries. You can try increasing the buffer size to see if that helps, e.g:

AsyncServiceClient.BufferSize = 1024 * 16; //16kb, default is 8kb

paolo ponzano:

This applies also to 3.9.7x?

The property exists: https://github.com/ServiceStack/ServiceStack/blob/v3/src/ServiceStack.Common/ServiceClient.Web/AsyncServiceClient.cs#L47 

so it should, but I’m not sure if that’s the cause of this issue, but it may help.

paolo ponzano:

Hello Demis, in SL I use

 private static volatile ServiceStack.ServiceClient.Web.JsonServiceClient client; is this wrong?

not sure why you’re using volatile here

paolo ponzano:

On the demo I’ve made I use a signeton for the client and following the double-check locking I’ve to use volatile