On Dec 6, 2010, at 8:53:21AM, Adam Tauno Williams wrote:

> On Mon, 2010-12-06 at 00:19 -0500, Bojan Rajkovic wrote: 
>> On Dec 4, 2010, at 9:43:17AM, Adam Tauno Williams wrote:
>>> mono-core-2.6.4-2.13.x86_64
>>> Json.NET 3.5 Release 8
>>> I call the deserializer and it works - I can see the objects created
>>> (deserialized) but then the deserializer never exits/returns.
>>> List<ListEntry> listed_entries =
>>>  JsonConvert.DeserializeObject<List<ListEntry>>(payload);
>>> Console.WriteLine("Deserialization complete");
>>> ListEntry objects are created, then the program 'hangs'.
>>> "Deserialization complete" never appears.
>> Are any of your object creations throwing exceptions? I had an issue
>> like this a /while/ ago where exceptions were being thrown by the
>> object constructors, but JSON.NET was swallowing them silently.
>> If you're not sure if you're getting exceptions, try running mono
>> --trace=E:all your_app.exe to trace exception throws throughout the
>> runtime of the process.
> 
> This was exactly the issue; deserialization was failing with assigning a
> null to an int but no exception was raised.
> 
> <http://stackoverflow.com/questions/4354108/json-net-deserialization-hangs-mono>

Bingo, this is exactly what I was seeing. The weird thing is, I never was able 
to figure out why it was causing the hangs. I've long since disinherited that 
code, but maybe filing a bug with the trace might help in at least 
acknowledging and tracking the issue.

—Bojan

> 
> -- 
> Adam Tauno Williams <[email protected]> LPIC-1, Novell CLA
> <http://www.whitemiceconsulting.com>
> OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba
> 
> _______________________________________________
> Mono-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-list

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to