iphone - Monotouch SerializeObject randomly throws exceptions -


this following code throws exception once in while, makes harder understand problem.

getfeaturedapirequest request = new getfeaturedapirequest ();  request.requesterid = globaldata.userheykuid;  request.index = index;  request.requesterip = globaldata.userip;  try  {    string jsonreq = jsonconvert.serializeobject (request);    .    .    .  }catch (exception message) 

this stack trace 100% sure values initialized.

unhandled managed exception: object reference not set instance of object (system.nullreferenceexception) @ newtonsoft.json.serialization.jsonserializerinternalwriter.getcontractsafe (system.object value) [0x00000] in :0 @ newtonsoft.json.serialization.jsonserializerinternalwriter.serialize (newtonsoft.json.jsonwriter jsonwriter, system.object value) [0x00000] in :0 @ newtonsoft.json.jsonserializer.serializeinternal (newtonsoft.json.jsonwriter jsonwriter, system.object value) [0x00000] in :0 @ newtonsoft.json.jsonserializer.serialize (newtonsoft.json.jsonwriter jsonwriter, system.object value) [0x00000] in :0 @ newtonsoft.json.jsonconvert.serializeobject (system.object value, formatting formatting, newtonsoft.json.jsonserializersettings settings) [0x00000] in :0 @ newtonsoft.json.jsonconvert.serializeobject (system.object value) [0x00000] in :0 @ heyku.loaddatafromservermanager.loadfeaturedfeedfromserver (int32 index, heyku.handleendofloaddata handle, boolean isfirst) [0x00000] in :0 @ heyku.loaddatafromservermanager.loadinitialdatafromserver (boolean loadprofile) [0x00000] in :0 @ heyku.loaddatafromservermanager.loadinitialdatafromserver () [0x00000] in :0 @ heyku.appdelegate.m__2 () [0x00000] in :0 @ system.threading.thread.startinternal () [0x00000] in :0

thanks help


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -