FAQ

[mongodb-user] DBClientConnection query causes assert and crash c++ driver

mongoDBCpp
Nov 22, 2011 at 6:34 am
I have my mongoclient driver running. When I launch mongo with
CreateProcess and then connect using DBClientConnection I can connect
and
query to see if an _id exists (but i know it does not, not even the
particular collection exists) there is no problem. But if I just close
my app without "disconnecting" and I leave mongod.exe running and then
relaunch my app and re-connect, when I call query to check if an _id
exists (it doesnt) it crashes.

Any ideas?

If I run the command prompt and do a "test.collection_name.find()" I
get a reference test not found (shell)1 error. Is this related ?

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
reply

Search Discussions

3 responses

  • mongoDBCpp at Nov 22, 2011 at 6:39 am
    I have my mongoclient driver running. When I launch mongo with
    CreateProcess and then connect using DBClientConnection I can add and
    query to see if an _id exists (but i know it does not, not even the
    particular collection exists) there is no problem. But if I just close
    my app without "disconnecting" and I leave mongod.exe running and then
    relaunch my app and re-connect, when I call query to check if an _id
    exists (it doesnt) it crashes.

    Any ideas?

    If I run the command prompt and do a "test.collection_name.find()" I
    get a reference test not found (shell)1 error. Is this related ?

    --
    You received this message because you are subscribed to the Google Groups "mongodb-user" group.
    To post to this group, send email to mongodb-user@googlegroups.com.
    To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
  • Eliot Horowitz at Nov 22, 2011 at 7:27 pm
    Can you send the stack trace?
    On Tue, Nov 22, 2011 at 1:33 AM, mongoDBCpp wrote:
    I have my mongoclient driver running. When I launch mongo with
    CreateProcess and then connect using DBClientConnection I can connect
    and
    query to see if an _id exists (but i know it does not, not even the
    particular collection exists) there is no problem. But if I just close
    my app without "disconnecting" and I leave mongod.exe running and then
    relaunch my app and re-connect, when I call query to check if an _id
    exists (it doesnt) it crashes.

    Any ideas?

    If I run the command prompt and do a "test.collection_name.find()" I
    get a reference test not found (shell)1 error. Is this related ?

    --
    You received this message because you are subscribed to the Google Groups "mongodb-user" group.
    To post to this group, send email to mongodb-user@googlegroups.com.
    To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "mongodb-user" group.
    To post to this group, send email to mongodb-user@googlegroups.com.
    To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
  • Beto at Nov 22, 2011 at 8:51 pm
    I figured it out -- i can't use DBClientConnection multiple times.
    I had to switch over to ScopedDbConnection.

    the problem went away.



    On Nov 22, 11:27 am, Eliot Horowitz wrote:
    Can you send the stack trace?






    On Tue, Nov 22, 2011 at 1:33 AM, mongoDBCpp wrote:
    I have my mongoclient driver running. When I launch mongo with
    CreateProcess and then connect using DBClientConnection I can connect
    and
    query to see if an _id exists (but i know it does not, not even the
    particular collection exists) there is no problem. But if I just close
    my app without "disconnecting" and I leave mongod.exe running and then
    relaunch my app and re-connect, when I call query to check if an _id
    exists (it doesnt) it crashes.
    Any ideas?
    If I run the command prompt and do a "test.collection_name.find()" I
    get a reference test not found (shell)1 error. Is this related ?
    --
    You received this message because you are subscribed to the Google Groups "mongodb-user" group.
    To post to this group, send email to mongodb-user@googlegroups.com.
    To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
    For more options, visit this group athttp://groups.google.com/group/mongodb-user?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "mongodb-user" group.
    To post to this group, send email to mongodb-user@googlegroups.com.
    To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

Related Discussions

Discussion Navigation
viewthread | post

2 users in discussion

Beto: 3 posts Eliot Horowitz: 1 post