[CXX-619] mongo::GridFS::storeFile cause core dump Created: 06/Jul/15 Updated: 11/Sep/19 Resolved: 06/Jul/15 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | legacy-1.0.3 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Yuncong Zhang | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
rhel |
||
| Attachments: |
|
| Description |
|
I'm trying to use mongo cxx driver to load data into gridfs and find the example here: http://antydba.blogspot.com/2009/10/mongodb-c-tutorial-httpwww.html Here is my code in attachment and core dump file My host information: $ cat /etc/redhat-release $ g++ -v $ rpm -qa | grep boost Is it a bug in the driver or do I miss anything? Thank you in advance! |
| Comments |
| Comment by Yuncong Zhang [ 06/Jul/15 ] |
|
Hi Andrew, Thanks for the quick response. I added the line below as the first line in the main function, and compiled the application. It works now. Thanks you very much! |
| Comment by Andrew Morrow (Inactive) [ 06/Jul/15 ] |
|
I took a quick look at your example, and I don't see that you are calling mongo::client::Initialize anywhere. You must initialize the driver before using it. Please see this document for additional information. https://github.com/mongodb/mongo-cxx-driver/wiki/Configuring-the-Legacy-Driver Could you try initializing the driver and see if that fixes the problem? |