[SERVER-280] shell crashes when calling next() on a cursor that's at the end Created: 04/Sep/09  Updated: 12/Jul/16  Resolved: 04/Sep/09

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0

Type: Bug Priority: Critical - P2
Reporter: Jason Sachs Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

WinXP


Participants:

 Description   

see transcript below:

> db.test.find()
> db.test.save(

{a: 1, b:2, c:3}

)
> db.test.save(

{r: 4, s:5, t:6}

)
> db.test.find()

{"_id" : ObjectId( "4aa12a88820c00000000615a") , "a" : 1 , "b" : 2 , "c" : 3} {"_id" : ObjectId( "4aa12a94820c00000000615b") , "r" : 4 , "s" : 5 , "t" : 6}

> k=db.test.find()

{"_id" : ObjectId( "4aa12a88820c00000000615a") , "a" : 1 , "b" : 2 , "c" : 3} {"_id" : ObjectId( "4aa12a94820c00000000615b") , "r" : 4 , "s" : 5 , "t" : 6}

> k
> k.hasNext()
false
> k.next()
/* CRASH */



 Comments   
Comment by Eliot Horowitz (Inactive) [ 15/Sep/09 ]

released in 1.1.0

Comment by Jason Sachs [ 04/Sep/09 ]

(either return null, or throw an exception that can be caught, but don't crash the program!)

Generated at Thu Feb 08 02:53:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.