<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:59:46 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CXX-619] mongo::GridFS::storeFile cause core dump</title>
                <link>https://jira.mongodb.org/browse/CXX-619</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;I&apos;m trying to use mongo cxx driver to load data into gridfs and find the example here: &lt;a href=&quot;http://antydba.blogspot.com/2009/10/mongodb-c-tutorial-httpwww.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://antydba.blogspot.com/2009/10/mongodb-c-tutorial-httpwww.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is my code in attachment and core dump file&lt;/p&gt;

&lt;p&gt;My host information:&lt;/p&gt;

&lt;p&gt;$ cat /etc/redhat-release&lt;br/&gt;
Red Hat Enterprise Linux Server release 6.6 (Santiago)&lt;br/&gt;
$ uname -m&lt;br/&gt;
x86_64&lt;/p&gt;


&lt;p&gt;$ g++ -v&lt;br/&gt;
Using built-in specs.&lt;br/&gt;
Target: x86_64-redhat-linux&lt;br/&gt;
Configured with: ../configure -&lt;del&gt;prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=&lt;a href=&quot;http://bugzilla.redhat.com/bugzilla&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://bugzilla.redhat.com/bugzilla&lt;/a&gt; --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable&lt;/del&gt;__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c+&lt;ins&gt;,objc,obj-c&lt;/ins&gt;+,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux&lt;br/&gt;
Thread model: posix&lt;br/&gt;
gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)&lt;/p&gt;

&lt;p&gt;$ rpm -qa | grep boost&lt;br/&gt;
boost-iostreams-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-thread-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-graph-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-system-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-regex-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-devel-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-filesystem-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-signals-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-math-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-date-time-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-test-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-program-options-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-serialization-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-wave-1.41.0-25.el6.x86_64&lt;br/&gt;
boost-python-1.41.0-25.el6.x86_64&lt;/p&gt;


&lt;p&gt;Is it a bug in the driver or do I miss anything?&lt;/p&gt;


&lt;p&gt;Thank you in advance!&lt;/p&gt;</description>
                <environment>rhel </environment>
        <key id="215037">CXX-619</key>
            <summary>mongo::GridFS::storeFile cause core dump</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="yuncong.zhang">Yuncong Zhang</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Jul 2015 16:25:29 +0000</created>
                <updated>Wed, 11 Sep 2019 19:05:00 +0000</updated>
                            <resolved>Mon, 6 Jul 2015 16:54:37 +0000</resolved>
                                    <version>legacy-1.0.3</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="958557" author="yuncong.zhang" created="Mon, 6 Jul 2015 16:51:20 +0000"  >&lt;p&gt;Hi Andrew,&lt;/p&gt;

&lt;p&gt;Thanks for the quick response. I added the line below as the first line in the main function, and compiled the application. &lt;br/&gt;
mongo::client::initialize();&lt;/p&gt;

&lt;p&gt;It works now.&lt;/p&gt;

&lt;p&gt;Thanks  you very much!&lt;/p&gt;</comment>
                            <comment id="958541" author="acm" created="Mon, 6 Jul 2015 16:34:57 +0000"  >&lt;p&gt;I took a quick look at your example, and I don&apos;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.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/wiki/Configuring-the-Legacy-Driver&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/wiki/Configuring-the-Legacy-Driver&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Could you try initializing the driver and see if that fixes the problem?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="80582" name="Makefile" size="112" author="yuncong.zhang" created="Mon, 6 Jul 2015 16:25:29 +0000"/>
                            <attachment id="80580" name="core.10935.gz" size="128473" author="yuncong.zhang" created="Mon, 6 Jul 2015 16:25:29 +0000"/>
                            <attachment id="80581" name="gridfs.cpp" size="794" author="yuncong.zhang" created="Mon, 6 Jul 2015 16:25:29 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsayhb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>