[CXX-330] Can't start example Programm from Github Tutorial Created: 09/Sep/14  Updated: 11/Sep/19  Resolved: 10/Sep/14

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: legacy-1.0.0-rc1

Type: Task Priority: Major - P3
Reporter: Kasitt [X] Assignee: Unassigned
Resolution: Done Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When i start the Tutorial Programm from Github
i get the following error:

First-chance exception at 0x000007FEFDBD940D in MongoTest1.exe: Microsoft C++ exception: mongo::MsgAssertionException at memory location 0x00000000001BEA70.
The program [8800] MongoTest1.exe has exited with code 0 (0x0).

Any idea how to fix this issue?

My Configuration:
Windows 7 64bit
Boost 1.56 64bit
current mongoC++ lagacy driver 64bit
Visual Studio Express 2013



 Comments   
Comment by Adam Midvidy [ 10/Sep/14 ]

Glad to help! I will update the example as well.

Comment by Kasitt [X] [ 10/Sep/14 ]

Thanks for your help Adam. That solves my problem. So simple .
Maybe it is a good idea to update the tutorial side

Comment by Adam Midvidy [ 09/Sep/14 ]

It looks like we failed to update the example on the wiki after adding the mongo::client::initialize() function.

Could you try calling mongo::client::initialize() at the start of the program in main() ?

Here is an example https://github.com/mongodb/mongo-cxx-driver/blob/legacy/src/mongo/client/examples/insert_demo.cpp#L32-L36

Comment by Kasitt [X] [ 09/Sep/14 ]

When i run the program direct in the windows console i get the following:

caught getnameinfo error errno:10093 Either the application has not called WSAStartup or WSAStartup failed.

Comment by Adam Midvidy [ 09/Sep/14 ]

Are you running the exact example program? The try-catch block in the example code should have printed out the what() of the exception.

Generated at Wed Feb 07 21:58:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.