[CSHARP-1230] NullReferenceException on Find() operation. Created: 03/Apr/15 Updated: 05/Apr/19 Resolved: 27/Jan/16 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | BSON |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Blocker - P1 |
| Reporter: | mtred | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | driver, query, question | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 7, MS Visual Studio 2013, MongoServer v2.4.6, MongoDriver v2.0 |
||
| Attachments: |
|
| Description |
|
I installed mongocsharpdriver v2.0, but on one operation in my project: i catched exception: But, if i changed this operation like this: Also, this operation working properly on driver version 1.8 and version 1.10. |
| Comments |
| Comment by mtred [ 09/Apr/15 ] |
|
UPDATE: Added example console code with errors. (MongoServer 2.4.6, MongoDriver 2.0) After removing attribute [BsonSerializer] in the class definition - all working good. Thanks for all |
| Comment by mtred [ 08/Apr/15 ] |
|
My project old. There installed driver version 1.8 and everything works fine. After the transfer to version 2.0 i have many errors - BsonSerializer, Collection.Aggregate, and this error - NullException on Find() operation. I changed methods with BsonSerializer, Collection.Aggregate - i think, worked well, but not understand why catched exception on Find() operation. |
| Comment by Craig Wilson [ 08/Apr/15 ] |
|
Hi mtred, Thanks for the follow-up. I saw a comment that said you were good (and then was deleted), so I wasn't sure what was going on. I'm still not completely clear on what is being done to cause this problem. If you could create a simple little console program that causes this exception, it would be immensely helpful in getting it fixed. Thanks, |
| Comment by mtred [ 08/Apr/15 ] |
|
Hi Craig, I think, I found problem on this issue, but i don't know how to solve it. The fact that the data are subjected to search in Query are not like IENumerable, but ENUM. "Cannot convert lambda expression to delegate type 'System.Func<Transfer.Common.Status,System.Collections.Generic.IEnumerable<string>>' because some of the return types in the block are not implicitly convertible to the delegate return type ...\Common\StatusAccessor.cs" |
| Comment by Craig Wilson [ 06/Apr/15 ] |
|
Hi mtred, Thanks for the report. Given the stack trace, we are going to need a lot more information to reproduce this. Can you provide a breaking test or some code in a console program that causes the issue? Particularly, since this happens when automapping a class, we need to see your class definition(s). Thanks, |