[CSHARP-1489] Read throws NullReferenceException when using a seekable download stream Created: 04/Dec/15 Updated: 19/Apr/18 Resolved: 07/Jan/16 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | GridFS |
| Affects Version/s: | 2.1 |
| Fix Version/s: | 2.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rich Q | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 7 x64 |
||
| Description |
|
In my application, I need to support downloading arbitrary chunks of a GridFS file per request. To do this, I'm using bucket.OpenDownloadStream (setting Seekable to True in the options), and Stream.Read. I get a NullReferenceException in GridFSSeekableDownloadStream.GetSegment at:
because _chunk is null. Here is a test that can be added to GridFSDownloadStreamBaseTests
|
| Comments |
| Comment by Githook User [ 07/Jan/16 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |
| Comment by Githook User [ 07/Dec/15 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |
| Comment by Githook User [ 07/Dec/15 ] |
|
Author: {u'name': u'rich.quackenbush', u'email': u'rich.quackenbush@captiveaire.com'}Message: Fix for NullReferenceException for seekable download stream: |
| Comment by Robert Stam [ 05/Dec/15 ] |
|
Thank you for our pull request. I will be reviewing it soon. |
| Comment by Rich Q [ 04/Dec/15 ] |
|
Pull request: |