[CSHARP-744] ArgumentOutOfRangeException on thread Created: 20/May/13 Updated: 20/Mar/14 Resolved: 21/May/13 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.8.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Chris Robison | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 7 x64 |
||
| Description |
|
Here is what my Profile class looks like: public class Profile public string Code { get; set; } public string Name { get; set; }} I'm getting the following exception when I try and call EnsureIndex from a different thread referencing the above class: System.ArgumentOutOfRangeException Class Profile does not have a member called Code. Line 13 is this: Collection.EnsureIndex(new IndexKeysBuilder<Profile>().Ascending(p => p.Code)); When I do this from the main thread it seems to work. Not sure what the difference is. Any suggestions? |
| Comments |
| Comment by Chris Robison [ 21/May/13 ] |
|
I have found the root cause and it is not the driver. The open source MongoDB job store I'm using is apparently mapping things in such a way that interferes with the objects I'm using. Looks like I'll have to roll my own job store. |
| Comment by Craig Wilson [ 20/May/13 ] |
|
I don't have a lot of experience with Quartz.NET, but I have had some. If you could put together a sample program demonstrating the issue, we'll be able to get to an answer quicker. As I don't know what you are doing exactly, this would be very difficult to troubleshoot. It's possible quartz spins up other app domains and/or does some serialization of data between these in order to keep its jobs separate. But I won't be able to troubleshoot without your help. |
| Comment by Chris Robison [ 20/May/13 ] |
|
This stuff worked fine before I started using Quartz. |
| Comment by Chris Robison [ 20/May/13 ] |
|
I'm using it in connection with Quartz.NET. Upon further investigation, there are a lot more issues than this and I'm not completely sure if they are related at all to the driver. For instance, when I get an IQueryable reference from a collection and foreach through everything, only the object Id's are deserialized. Everything else is null. |
| Comment by Craig Wilson [ 20/May/13 ] |
|
Hi Chris, Craig |