Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1348

Single Subdoc Operation With Short Results Throw NRE Reading Content

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.1
    • Component/s: library
    • Labels:
      None
    • Environment:
      .Net Core running in Docker and Windows 10
      Couchbase Server 4.6.0 running in Windows 10

      Description

      Steps to reproduce:

      1. Disable enhanced durability
      2. Create document with a small integer value
      3. Use MutateInBuilder to build a subdocument operation with just one Counter operation against the value
      4. Execute the operation
      5. Call Content on the operation giving the same subdoc path
      6. Receive a null reference exception

      Or, for lookups:

      1. Enhanced durability is not a factor, fails in both cases
      2. Create document with a small integer value
      3. Use LookupInBuilder to build a get operation against the value
      4. Execute the operation
      5. Call Content on the operation giving the same subdoc path
      6. Receive a null reference exception

      System.NullReferenceException: Object reference not set to an instance of an object.
      at Couchbase.DocumentFragment`1.Content[TContent](String path)

      This problem doesn't occur if you have more than one operation in the mutation.  The "Bytes" value on fragement value within the DocumentResult<T> is null.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

            Hide
            btburnett3 Brant Burnett added a comment -

            Based on code review, this bug may not appear if the counter is several digits long (in decimal notation).  Definitely does appear with short numbers.

            Show
            btburnett3 Brant Burnett added a comment - Based on code review, this bug may not appear if the counter is several digits long (in decimal notation).  Definitely does appear with short numbers.
            Hide
            btburnett3 Brant Burnett added a comment -

            Updated bug report based on more cases with problems found during code review and testing.  The problem also affects LookupIn operations against attributes with short values.

            Show
            btburnett3 Brant Burnett added a comment - Updated bug report based on more cases with problems found during code review and testing.  The problem also affects LookupIn operations against attributes with short values.

              People

              • Assignee:
                btburnett3 Brant Burnett
                Reporter:
                btburnett3 Brant Burnett
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.