[CSHARP-424] When attempting to serialize an object with circular references detect that and throw a catchable exception instead of a fatal StackOverflowException Created: 30/Mar/12  Updated: 02/Apr/15  Resolved: 01/Apr/12

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.4
Fix Version/s: 1.4.1

Type: Improvement Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CSHARP-416 StackoverflowException occours when I... Closed
is related to CSHARP-278 Document potential stack overflow in ... Closed

 Description   

A StackOverflowException can't be caught and is fatal to the process.



 Comments   
Comment by Robert Stam [ 01/Apr/12 ]

BsonWriter now enforces a maximum serialization depth of 100 (configurable) to detect likely circular references and throws a BsonSerializationException instead of a StackOverflowException.

Generated at Wed Feb 07 21:36:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.