Skip to content

ExecutionEngineException with no stack trace during document operations - Need guidance #1744

@hammadkhandev888

Description

@hammadkhandev888

Problem

I'm experiencing frequent System.ExecutionEngineException crashes in my .NET MAUI application when performing Couchbase Lite operations. The exception provides no stack trace or source information, making it extremely difficult to debug.

Environment

  • Couchbase Lite .NET Version: 4.0.2 (Enterprise)
  • .NET Version: .NET 10.0
  • Platform: .NET MAUI (Windows desktop)
  • OS: Windows 10/11

Exception Details

System.ExecutionEngineException
HResult=0x80131506
Source=
StackTrace:

Code

public async Task<string> UpdateAssignedSizesAsync(AssignedSize assignedSize)
{
    try
    {
        var assignedSizesCollection = _context.GetCollection("assignedSizes");
        if (!string.IsNullOrEmpty(assignedSize.Id))
        {
            var doc = assignedSizesCollection.GetDocument(assignedSize.Id);
            
            if (doc != null)
            {
                assignedSize.ModifiedDate = DateTime.UtcNow;
                var updatedDoc = DocumentMapper.ToDocument(assignedSize, assignedSize.Id);
                assignedSizesCollection.Save(updatedDoc);
                updatedDoc.Dispose();
                return assignedSize.Id!;
            }
        }
        
        // ... fallback logic
    }
    catch
    {
        return string.Empty;
    }
}

No consistent reproduction pattern

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions