Skip to content

Possible bug: NullReferenceException during request processing #727

Closed
@YaLehin

Description

@YaLehin

Description

If there are simultaneous requests to an app then sometimes there is NullReferenceException accrues while creation of FilterService. The currentRequest._resourceContex parameter of the constructor is null.
This error is not stable. In most cases, it occurs after the application is started. After some number of requests, it disappears. But if you restart the application it will be again.
I tried this on macOS system and not tried on windows.
...
To reproduce:
I found this in my project, but if you take the GettingStarted example the result will be the same. Start the GettingStarted project and run simultaneous requests. (For example, for nix like system:
$ echo http://localhost:5001/api/articles http://localhost:5001/api/articles | xargs -P 10 -n1 curl
)
There will be an exception.

Environment

  • Asp.Net Core 3.1
  • JsonApiDotNetCore Version: v.4.0.0-alpha4 or latest master branch

Metadata

Metadata

Assignees

No one assigned

    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