<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:18:23 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>[CDRIVER-3558] Installation docs for Windows should include explicit configuration</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3558</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;Critical error detected c0000374&lt;/p&gt;

&lt;p&gt;......\mongo-c-driver-1.15.2\src\libmongoc\src\mongoc\mongoc-cursor.c:1110 _mongoc_cursor_collection(): precondition failed: *collection_len &amp;gt; 0&lt;/p&gt;</description>
                <environment>visual studio 2017  win10 x64</environment>
        <key id="1202310">CDRIVER-3558</key>
            <summary>Installation docs for Windows should include explicit configuration</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13201">Fixed</resolution>
                                        <assignee username="kevin.albertson@mongodb.com">Kevin Albertson</assignee>
                                    <reporter username="jsjfbj@163.com">shijie Jiang</reporter>
                        <labels>
                    </labels>
                <created>Fri, 28 Feb 2020 09:09:34 +0000</created>
                <updated>Sat, 28 Oct 2023 11:28:53 +0000</updated>
                            <resolved>Wed, 11 Mar 2020 21:51:34 +0000</resolved>
                                                    <fixVersion>1.17.0-beta</fixVersion>
                    <fixVersion>1.17.0</fixVersion>
                                    <component>docs</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2969212" author="xgen-internal-githook" created="Wed, 11 Mar 2020 21:51:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;kevinAlbs&apos;, &apos;name&apos;: &apos;Kevin Albertson&apos;, &apos;email&apos;: &apos;kevin.albertson@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3558&quot; title=&quot;Installation docs for Windows should include explicit configuration&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3558&quot;&gt;&lt;del&gt;CDRIVER-3558&lt;/del&gt;&lt;/a&gt; update install docs on Windows&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/745647e0932a913823a349a929f4b95a3e80d482&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/745647e0932a913823a349a929f4b95a3e80d482&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2950696" author="kevin.albertson" created="Sat, 7 Mar 2020 14:09:07 +0000"  >&lt;p&gt;Glad to help! I&apos;ve modified this ticket to update our documentation.&lt;/p&gt;</comment>
                            <comment id="2950552" author="jsjfbj@163.com" created="Sat, 7 Mar 2020 08:09:06 +0000"  >&lt;p&gt;Thank you very much&#65281;&#160;It works just as you said.&lt;/p&gt;</comment>
                            <comment id="2943811" author="kevin.albertson" created="Thu, 5 Mar 2020 14:13:06 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jsjfbj%40163.com&quot; class=&quot;user-hover&quot; rel=&quot;jsjfbj@163.com&quot;&gt;jsjfbj@163.com&lt;/a&gt;, thanks for the additional info. The output of dumpbin.exe of libmongoc-1.0.dll does indicate it&apos;s linking against the debug runtime (VCRUNTIME140D.dll). I was able to reproduce that locally with VS 2019, but specifying an explicit configuration for the installation command worked:&lt;/p&gt;

&lt;p&gt;Try installing with:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;msbuild.exe /p:Configuration=Release INSTALL.vcxproj&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;I believe that is an omission in our documentation, as our installation instructions do no include the flag in the installation command: &lt;a href=&quot;http://mongoc.org/libmongoc/current/installing.html#building-on-windows-with-visual-studio&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/installing.html#building-on-windows-with-visual-studio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know if that works, and I&apos;ll update the documentation accordingly.&lt;/p&gt;</comment>
                            <comment id="2937913" author="jsjfbj@163.com" created="Thu, 5 Mar 2020 06:47:59 +0000"  >&lt;p&gt;// MongoDB C driver&lt;br/&gt;
 cmake -G &quot;Visual Studio 15 2017 Win64&quot; &quot;-DCMAKE_BUILD_TYPE=Release&quot; &quot;-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver-Release&quot; &quot;-DCMAKE_PREFIX_PATH=C:\mongo-c-driver-Release&quot; ..&lt;br/&gt;
 msbuild.exe /p:Configuration=Release ALL_BUILD.vcxproj&lt;br/&gt;
 msbuild.exe INSTALL.vcxproj&lt;/p&gt;

&lt;p&gt;// MongoDB cxx driver&lt;br/&gt;
 cmake.exe -G &quot;Visual Studio 15 2017 Win64&quot; -DCMAKE_INSTALL_PREFIX=C:\mongo-cxx-driver-Release -DCMAKE_PREFIX_PATH=C:\mongo-c-driver-Release -DBOOST_ROOT=D:\MongoDBC\boost_1_71_0 ..&lt;br/&gt;
 msbuild.exe /p:Configuration=Release ALL_BUILD.vcxproj&lt;br/&gt;
 msbuild.exe INSTALL.vcxproj&lt;br/&gt;
 &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;251071_thumb&quot; href=&quot;https://jira.mongodb.org/secure/attachment/251071/251071_screenshot-1.png&quot; title=&quot;screenshot-1.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;251071&quot; file-preview-title=&quot;screenshot-1.png&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/thumbnail/251071/_thumb_251071.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The debug release driver compiled successfully.  The debug version works fine&#65292;but the release version doesn&apos;t&lt;/p&gt;

&lt;p&gt;// test code&lt;br/&gt;
#include &amp;lt;iostream&amp;gt;&lt;br/&gt;
#include &amp;lt;bsoncxx/builder/stream/document.hpp&amp;gt;&lt;br/&gt;
#include &amp;lt;bsoncxx/builder/basic/kvp.hpp&amp;gt;&lt;br/&gt;
#include &amp;lt;bsoncxx/json.hpp&amp;gt;&lt;br/&gt;
#include &amp;lt;mongocxx/client.hpp&amp;gt;&lt;br/&gt;
#include &amp;lt;mongocxx/stdx.hpp&amp;gt;&lt;br/&gt;
#include &amp;lt;mongocxx/uri.hpp&amp;gt;&lt;br/&gt;
#include &amp;lt;mongocxx/instance.hpp&amp;gt;&lt;br/&gt;
using namespace std;&lt;br/&gt;
using namespace bsoncxx;&lt;br/&gt;
using bsoncxx::builder::basic::kvp;&lt;br/&gt;
using bsoncxx::builder::basic::make_document;&lt;br/&gt;
using bsoncxx::builder::stream::open_array;&lt;br/&gt;
using bsoncxx::builder::stream::close_array;&lt;br/&gt;
using bsoncxx::builder::stream::open_document;&lt;br/&gt;
using bsoncxx::builder::stream::close_document;&lt;br/&gt;
using bsoncxx::builder::stream::document;&lt;br/&gt;
using bsoncxx::builder::stream::finalize;&lt;/p&gt;

&lt;p&gt;int main()&lt;br/&gt;
{&lt;br/&gt;
   mongocxx::instance inst{}; &lt;br/&gt;
   mongocxx::client mgdb_connect(mongocxx::uri{ &quot;mongodb://FZJC:xxxx@127.0.0.1:27017/xxxx&quot; });&#160; // By default, a session is causally consistent.&#160; &#160; // Pass options::client_session to override causal consistency. &lt;br/&gt;
   auto session = mgdb_connect.start_session();&#160; &#160; &#160; &#160; // &lt;br/&gt;
    mongocxx::collection coll_dat_fmt = mgdb_connect&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;gkaq_db&amp;quot;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;datFormat&amp;quot;&amp;#93;&lt;/span&gt;;&lt;br/&gt;
    mongocxx::cursor cursor = coll_dat_fmt.find(session, {});&lt;br/&gt;
   for (auto doc : cursor) &lt;/p&gt;
{ 
          std::cout &amp;lt;&amp;lt; bsoncxx::to_json(doc) &amp;lt;&amp;lt; &quot;\n&quot;; 
   }
&lt;p&gt;&#160; &#160; std::cout &amp;lt;&amp;lt; &quot;Hello World!\n&quot;;&#160;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="2923084" author="kevin.albertson" created="Mon, 2 Mar 2020 16:45:09 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jsjfbj%40163.com&quot; class=&quot;user-hover&quot; rel=&quot;jsjfbj@163.com&quot;&gt;jsjfbj@163.com&lt;/a&gt;, thank you for the report! To diagnose and reproduce the issue, we may need more information.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Can you include the cmake command (and the output) you are using to build the C and C++ drivers?&lt;/li&gt;
	&lt;li&gt;It&apos;s possible the C++ driver, C driver, and your application may be linked to different forms of Windows runtime libraries, causing the crash. It may be helpful to inspect the output of dumpbin.exe to check that your application, the C driver, and C++ driver, all use the same CRT.  E.g. Using the native tools command prompt for libmongoc:
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;dumpbin.exe /DEPENDENTS libmongoc-1.0.dll&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;&lt;/li&gt;
	&lt;li&gt;If there is relevant code outside of the screenshot, can you include a code snippet to reproduce? Ideally a short, self-contained, compilable example (&lt;a href=&quot;http://sscce.org/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://sscce.org/&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1275202">CXX-1961</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="249444" name="error.png" size="11309" author="jsjfbj@163.com" created="Fri, 28 Feb 2020 09:04:20 +0000"/>
                            <attachment id="251071" name="screenshot-1.png" size="22148" author="jsjfbj@163.com" created="Thu, 5 Mar 2020 06:33:17 +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|hwkzlj:</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>