[CSHARP-677] Driver causes application crash after a random amount of time Created: 08/Feb/13  Updated: 20/Mar/14  Resolved: 20/Mar/13

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

Type: Bug Priority: Critical - P2
Reporter: Ruslan Sologub Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: crash, driver
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Driver version 1.7.0.4714
Mono 2.10.8.1
Ubuntu 12.04.1 x64 Server


Attachments: Text File NullReferenceException.txt     Text File Payment.Nr.txt     Text File Session.FirstEventTime.txt    

 Description   

The application works fine for a long period of time then suddenly throws an exception (attached), and the app eventually crashes.

Before crash the exception shows that a document in database has a field (auto property in C#) of an incorrect type. For example recently it was a
DateTime FirstEventTime

{get;set;}

with a value of 0. And the exception was "Cannon cast from double to DateTime". That is, the database becomes inconsistent (no query can be performed on that collection from C#) until an update of that property or a manual document removal.

The application is multithreaded, without any JavaScript for any DB operation, only the Insert(), Update(). FindOneById() and AsQueryable() methods provided by MongoCollection<T>.

Attached are a couple of stacktraces (Payment.Nr is a string autoproperty).



 Comments   
Comment by Robert Stam [ 20/Mar/13 ]

See the discussion in Google Groups:

https://groups.google.com/forum/?fromgroups#!topic/mongodb-user/7mvt4ujkK5c

This is apparently caused by a bug in Mono which is fixed in the 3.0 version of the Mono runtime.

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