<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:06:47 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-2707] mongocxx kvp std::string runtime error in visual studio 2019 release build.</title>
                <link>https://jira.mongodb.org/browse/CXX-2707</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;I am using mongocxx in windows visual studio 2019.&lt;/p&gt;

&lt;p&gt;When i set std::string value in kvp function&apos;s first argument, rumtime error occur in &lt;font color=&quot;#FF0000&quot;&gt;&lt;b&gt;release build&lt;/b&gt;.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;When i set const char array value in kvp function&apos;s first argument, it works without runtime error.&lt;/p&gt;

&lt;p&gt;How can i use std::string in kvp function&apos;s first argument without runtime error?&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Environment&quot;&gt;&lt;/a&gt;Environment&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;mongoc : 1.23.5&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;mongocxx : 3.7.2&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;OS : Windows 10 64-bit&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;compiler : Visual studio 2019, version : 16.11.27&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;// Test is GTest&lt;/p&gt;

&lt;p&gt;TEST(MongoTest, AppendTest)&lt;/p&gt;
{
&#160; &#160; std::string data\{ &quot;abc&quot; }
&lt;p&gt;;&lt;br/&gt;
&#160; &#160; make_document(kvp(data, &quot;123&quot;));&lt;br/&gt;
}&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2384753">CXX-2707</key>
            <summary>mongocxx kvp std::string runtime error in visual studio 2019 release build.</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="13203">Gone away</resolution>
                                        <assignee username="ezra.chung@mongodb.com">Ezra Chung</assignee>
                                    <reporter username="wshan@kabaminc.com">Wansang Han [&#54620;&#50756;&#49345;]</reporter>
                        <labels>
                            <label>Bug</label>
                    </labels>
                <created>Thu, 6 Jul 2023 10:33:48 +0000</created>
                <updated>Fri, 27 Oct 2023 19:48:24 +0000</updated>
                            <resolved>Mon, 31 Jul 2023 12:01:57 +0000</resolved>
                                    <version>3.7.2</version>
                                                    <component>API</component>
                    <component>Build</component>
                    <component>Release</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5601464" author="dbeng-pm-bot" created="Mon, 31 Jul 2023 12:01:58 +0000"  >&lt;p&gt;There hasn&apos;t been any recent activity on this ticket, so we&apos;re resolving it. Thanks for reaching out! Please feel free to reopen this ticket if you&apos;re still experiencing the issue, and add a comment if you&apos;re able to provide more information.&lt;/p&gt;</comment>
                            <comment id="5576634" author="dbeng-pm-bot" created="Wed, 19 Jul 2023 13:11:06 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=wshan%40kabaminc.com&quot; class=&quot;user-hover&quot; rel=&quot;wshan@kabaminc.com&quot;&gt;wshan@kabaminc.com&lt;/a&gt;! &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-2707&quot; title=&quot;mongocxx kvp std::string runtime error in visual studio 2019 release build.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-2707&quot;&gt;&lt;del&gt;CXX-2707&lt;/del&gt;&lt;/a&gt; is awaiting your response. &lt;/p&gt;

&lt;p&gt;If this is still an issue for you, please open Jira to review the latest status and provide your feedback. Thanks!&lt;/p&gt;</comment>
                            <comment id="5557340" author="JIRAUSER1261413" created="Tue, 11 Jul 2023 14:15:43 +0000"  >&lt;p&gt;Hello, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=wshan%40kabaminc.com&quot; class=&quot;user-hover&quot; rel=&quot;wshan@kabaminc.com&quot;&gt;wshan@kabaminc.com&lt;/a&gt;. Using a &lt;tt&gt;std::string&lt;/tt&gt; as the key in a key-value pair is a feature that has been &lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/blob/16777df25be84b567fb4606a6f09569462faa4d3/src/bsoncxx/test/bson_builder.cpp#L856&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;supported and tested for a very long time&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We suspect this error may instead be caused by the use of incompatible build configurations for the bsoncxx library vs. the test application. The build configuration for a Windows application must be consistent with the build configuration of all the libraries being linked against. To compile and link the test application using the Release configuration, it must link against a bsoncxx library which was also built using the Release configuration. Specifically, the stack trace suggests this may be due to bsoncxx being built with a non-zero &lt;a href=&quot;https://learn.microsoft.com/en-us/cpp/standard-library/iterator-debug-level&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;_ITERATOR_DEBUG_LEVEL&lt;/tt&gt;&lt;/a&gt; (debug) while the test application is being built with &lt;tt&gt;_ITERATOR_DEBUG_LEVEL&lt;/tt&gt; set to 0 (release). If you want to build the test application in Release mode, ensure the bsoncxx library being linked against was also built in Release mode.&lt;/p&gt;</comment>
                            <comment id="5546735" author="dbeng-pm-bot" created="Thu, 6 Jul 2023 10:33:51 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=wshan%40kabaminc.com&quot; class=&quot;user-hover&quot; rel=&quot;wshan@kabaminc.com&quot;&gt;wshan@kabaminc.com&lt;/a&gt;, thank you for reporting this issue! The team will look into it and get back to you soon. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2407891">CXX-2726</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="460473" name="&#51228;&#47785; &#50630;&#51020;.png" size="168000" author="wshan@kabaminc.com" created="Thu, 6 Jul 2023 09:52:40 +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|i1yuv4:</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>