Skip to content

Stackoverflow exception when adding a query in a loop #974

Closed
@goalie7960

Description

@goalie7960

I can consistently create a stackoverflow exception when I run this code. Maybe it's not the most efficient, but it did cause an issue in our code, especially when the maximum value of i is generated at runtime.

class Program
{
    static void Main(string[] args)
    {
        QueryContainer query = null;

        for (int i = 0; i < 10000; i++)
        {
            query |= Query<Thing>.Term(f => f.ID, i);
        }
    }
}

class Thing
{
    public int ID { get; set; }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions