<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:05 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>[CSHARP-1255] An ignored BsonElement with a prefix of a known BsonElement&apos;s causes an EndOfStreamException</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1255</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;This occurs when a class map is being deserialized which includes a non-mapped element which is the prefix of a mapped element. For example, given the class map:&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;   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;[BsonIgnoreExtraElements]&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;public class Test&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;	public int Longer { get; set; }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;}&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;Attempting to deserialize the document:&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;{ Long: 20 }&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;will result in an EndOfStreamException.&lt;/p&gt;</description>
                <environment>MongoDB C# Legacy Driver version 2.0</environment>
        <key id="200369">CSHARP-1255</key>
            <summary>An ignored BsonElement with a prefix of a known BsonElement&apos;s causes an EndOfStreamException</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="pgordon@truckdown.com">Peter Gordon</reporter>
                        <labels>
                    </labels>
                <created>Sun, 26 Apr 2015 16:14:28 +0000</created>
                <updated>Sat, 2 Apr 2016 19:45:27 +0000</updated>
                            <resolved>Fri, 1 May 2015 10:04:39 +0000</resolved>
                                    <version>2.0</version>
                                    <fixVersion>2.0.1</fixVersion>
                    <fixVersion>2.1</fixVersion>
                                    <component>Serialization</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="903006" author="xgen-internal-githook" created="Fri, 1 May 2015 10:04:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;craiggwilson&apos;, u&apos;name&apos;: u&apos;Craig Wilson&apos;, u&apos;email&apos;: u&apos;craiggwilson@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1255&quot; title=&quot;An ignored BsonElement with a prefix of a known BsonElement&amp;#39;s causes an EndOfStreamException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1255&quot;&gt;&lt;del&gt;CSHARP-1255&lt;/del&gt;&lt;/a&gt;: fixed issue with prefixed mapped fields interferring with other unmapped and ignored fields.&lt;br/&gt;
Branch: v2.0.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/f4b7fb1a7e5755834d270a4f802c3d71cee0b120&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/f4b7fb1a7e5755834d270a4f802c3d71cee0b120&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="902997" author="xgen-internal-githook" created="Fri, 1 May 2015 09:40:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;craiggwilson&apos;, u&apos;name&apos;: u&apos;Craig Wilson&apos;, u&apos;email&apos;: u&apos;craiggwilson@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1255&quot; title=&quot;An ignored BsonElement with a prefix of a known BsonElement&amp;#39;s causes an EndOfStreamException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1255&quot;&gt;&lt;del&gt;CSHARP-1255&lt;/del&gt;&lt;/a&gt;: fixed issue with prefixed mapped fields interferring with other unmapped and ignored fields.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/c5d064fb1f62eaef14623a0e7e8261fe2de8d35e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/c5d064fb1f62eaef14623a0e7e8261fe2de8d35e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="899029" author="pgordon@truckdown.com" created="Mon, 27 Apr 2015 18:02:05 +0000"  >&lt;p&gt;Craig,&lt;/p&gt;

&lt;p&gt;Thanks ... I can work around the problem on the short term ... I only have a small set of instances in my app where this has an impact.  I likely won&apos;t be rolling out a change to our production environment until after 2.0.1 is released anyway.  &lt;/p&gt;

&lt;p&gt;Peter  &lt;/p&gt;</comment>
                            <comment id="898995" author="craiggwilson" created="Mon, 27 Apr 2015 17:58:28 +0000"  >&lt;p&gt;Peter, &lt;/p&gt;

&lt;p&gt;Thanks for the reproduction. I narrowed it down to the problem. I&apos;ve updated the description of the ticket to be more concise about the exact issue. I couldn&apos;t think of a good workaround for this other than to (a) map the fields or (b) use a different name. I know this is an existing application, so neither of these may be valid. We&apos;ll be working on a 2.0.1 release shortly and this fix will be included.&lt;/p&gt;

&lt;p&gt;Thanks so much for the bug report and your patience,&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                            <comment id="898867" author="craiggwilson" created="Mon, 27 Apr 2015 16:06:36 +0000"  >&lt;p&gt;Thanks Peter, I&apos;ll let you know what I find.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                            <comment id="898866" author="pgordon@truckdown.com" created="Mon, 27 Apr 2015 16:06:07 +0000"  >&lt;p&gt;Test console app to reproduce error&lt;/p&gt;</comment>
                            <comment id="898863" author="pgordon@truckdown.com" created="Mon, 27 Apr 2015 16:05:35 +0000"  >&lt;p&gt;Hi Craig,&lt;/p&gt;

&lt;p&gt;It&apos;s very strange - I could have sworn that the test code I sent yesterday generated the error.  Tried again this morning in my project and sure enough ... no error.  &lt;/p&gt;

&lt;p&gt;That said - I created a very quick and small standalone console app that reproduces the error I am having.  While I thought it was related to have an array of objects not identified in the model, it seems that the issue is a little more complex than that.  The model we are having an issue with in our production system is quite complex so I simplified it as much as I could wile still having the error occur.&lt;/p&gt;

&lt;p&gt;I&apos;m attaching a zip file of the project files ... let me know if you need anything else. &lt;/p&gt;

&lt;p&gt;Thanks for looking into this. &lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;


</comment>
                            <comment id="898721" author="pgordon@truckdown.com" created="Mon, 27 Apr 2015 14:24:08 +0000"  >&lt;p&gt;I&apos;ll try to get you a small app later today or tomorrow.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="898714" author="craiggwilson" created="Mon, 27 Apr 2015 14:10:51 +0000"  >&lt;p&gt;Hi Peter,&lt;/p&gt;

&lt;p&gt;I can&apos;t reproduce this. I&apos;m working off of master. If you could either submit a test or a fully functioning console app that breaks, it would be truly appreciated. You can see my attempts here: &lt;a href=&quot;https://github.com/craiggwilson/mongo-csharp-driver/commit/06cf9ae801d464144d6dedf9349b55670425cee4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/craiggwilson/mongo-csharp-driver/commit/06cf9ae801d464144d6dedf9349b55670425cee4&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                            <comment id="898303" author="craiggwilson" created="Sun, 26 Apr 2015 19:19:25 +0000"  >&lt;p&gt;Peter,&lt;/p&gt;

&lt;p&gt;Thanks for the reproduction code above. I&apos;ll take a look tomorrow.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="204235">CSHARP-1280</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="200949">CSHARP-1261</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="72018" name="TestApp.zip" size="1469360" author="pgordon@truckdown.com" created="Mon, 27 Apr 2015 16:06:07 +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|hs7uq7:</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>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="506">C# Sprint 19</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>