[CSHARP-1966] StackOverflow when expression contains IQueryable Created: 21/Apr/17 Updated: 28/Oct/23 Resolved: 07/Feb/22 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq, LINQ3 |
| Affects Version/s: | 2.2.3, 2.4.3 |
| Fix Version/s: | 2.14.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gushchin Anton | Assignee: | James Kovacs |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | triaged | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 10, MSSQL 16, .NET 4.6.1, EntityFramework 6.1.3 |
||
| Epic Link: | CSHARP-3615 |
| Description |
|
1. Create empty console application
|
| Comments |
| Comment by James Kovacs [ 07/Feb/22 ] | ||||
|
This issue has been fixed in the new LINQ provider (known as LINQ3), which is included in the 2.14 release. Configure your MongoClientSettings to use LinqProvider.V3 if you want to use this functionality. To configure a client to use the LINQ3 provider use code like the following
| ||||
| Comment by Robert Stam [ 21/Apr/17 ] | ||||
|
Sorry... just realized that the exception was a StackOverflow. That would be a really big stack trace... | ||||
| Comment by Robert Stam [ 21/Apr/17 ] | ||||
|
Can you provide a full stack trace from the exception? Looks like you've found a viable workaround: execute the Entity Framework query first before passing the resulting list to the MongoDB query. |