<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:06 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-1261] Using _ts as element name for types participating in a class hierarchy leads to crash</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1261</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I have the following entities:&lt;/p&gt;

&lt;p&gt;  &lt;span class=&quot;error&quot;&gt;&amp;#91;BsonDiscriminator(RootClass = true)&amp;#93;&lt;/span&gt;&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;BsonKnownTypes(typeof(SysAdminRole))&amp;#93;&lt;/span&gt;&lt;br/&gt;
  public class Role : DocumentEntityBase&lt;br/&gt;
  {&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;BsonElement(&amp;quot;_ts&amp;quot;)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    public BsonTimestamp Timestamp &lt;/p&gt;
{ get; set; }&lt;br/&gt;
&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;BsonRequired&amp;#93;&lt;/span&gt;&lt;br/&gt;
    public string Name { get; set; }
&lt;p&gt;  }&lt;/p&gt;

&lt;p&gt;  public class SysAdminRole : Role&lt;br/&gt;
  {&lt;br/&gt;
  }&lt;/p&gt;

&lt;p&gt;To reproduce the error see the Add_and_read_roles test in the attached project. Note that changing the element name to s_ts does not generate exceptions anymore, as well as using other letters after _, like _c. It may be related to the fact that the element name holding the type information is named _t.&lt;/p&gt;

&lt;p&gt;Inserting entities of these types is ok, but when trying to read them, I get the following exception:&lt;/p&gt;

&lt;p&gt;System.IO.EndOfStreamException: Attempted to read past the end of the stream.&lt;br/&gt;
    at MongoDB.Bson.IO.BsonStreamExtensions.ReadBsonType(BsonStream&#160;stream)&lt;br/&gt;
   at MongoDB.Bson.IO.BsonBinaryReader.ReadBsonType()&lt;br/&gt;
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.DeserializeClass(BsonDeserializationContext&#160;context)&lt;br/&gt;
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Deserialize(BsonDeserializationContext&#160;context,&#160;BsonDeserializationArgs&#160;args)&lt;br/&gt;
   at MongoDB.Bson.Serialization.Serializers.SerializerBase`1.MongoDB.Bson.Serialization.IBsonSerializer.Deserialize(BsonDeserializationContext&#160;context,&#160;BsonDeserializationArgs&#160;args)&lt;br/&gt;
   at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize(IBsonSerializer&#160;serializer,&#160;BsonDeserializationContext&#160;context)&lt;br/&gt;
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Deserialize(BsonDeserializationContext&#160;context,&#160;BsonDeserializationArgs&#160;args)&lt;br/&gt;
   at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize(IBsonSerializer`1&#160;serializer,&#160;BsonDeserializationContext&#160;context)&lt;br/&gt;
   at MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders.ReplyMessageBinaryEncoder`1.ReadMessage()&lt;br/&gt;
   at MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders.ReplyMessageBinaryEncoder`1.MongoDB.Driver.Core.WireProtocol.Messages.Encoders.IMessageEncoder.ReadMessage()&lt;br/&gt;
   at MongoDB.Driver.Core.Connections.BinaryConnection.&amp;lt;ReceiveMessageAsync&amp;gt;d__15.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()&lt;br/&gt;
   at MongoDB.Driver.Core.WireProtocol.QueryWireProtocol`1.&amp;lt;ExecuteAsync&amp;gt;d__0.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()&lt;br/&gt;
   at MongoDB.Driver.Core.Servers.ClusterableServer.ServerChannel.&amp;lt;ExecuteProtocolAsync&amp;gt;d__25`1.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()&lt;br/&gt;
   at MongoDB.Driver.Core.Operations.FindOperation`1.&amp;lt;ExecuteAsync&amp;gt;d__2.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()&lt;br/&gt;
   at MongoDB.Driver.OperationExecutor.&amp;lt;ExecuteReadOperationAsync&amp;gt;d__0`1.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()&lt;br/&gt;
   at MongoDB.Driver.MongoCollectionImpl`1.&amp;lt;ExecuteReadOperation&amp;gt;d__35`1.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()&lt;br/&gt;
   at MongoDBTests.HierarchyTest.&amp;lt;Add_and_read_roles&amp;gt;d__5.MoveNext() in HierarchyTest.cs: line 27&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task&#160;task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()&lt;/p&gt;</description>
                <environment></environment>
        <key id="200949">CSHARP-1261</key>
            <summary>Using _ts as element name for types participating in a class hierarchy leads to crash</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="ioan.crisan">Ioan Crisan</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Wed, 29 Apr 2015 09:50:16 +0000</created>
                <updated>Wed, 29 Apr 2015 12:14:20 +0000</updated>
                            <resolved>Wed, 29 Apr 2015 12:14:01 +0000</resolved>
                                    <version>2.0</version>
                                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="900802" author="craiggwilson" created="Wed, 29 Apr 2015 12:14:01 +0000"  >&lt;p&gt;Hi loan,&lt;/p&gt;

&lt;p&gt;This is the same as &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;, which is already fixed. We&apos;ll be putting out a 2.0.1 because of this bug shortly.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="200369">CSHARP-1255</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="72277" name="MongoDBTests.zip" size="19035" author="ioan.crisan" created="Wed, 29 Apr 2015 09:50:16 +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|hs8v5b:</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>