Skip to content

Concurrency Issue #29

@arjun-khadka-beyondid

Description

@arjun-khadka-beyondid

Code USed: Startup.cs

       DeviceDetector.SetVersionTruncation(VersionTruncation.VERSION_TRUNCATION_NONE); 

       var userAgent = context.Request.Headers["User-Agent"]; 

        var deviceDetector = new DeviceDetector(userAgent); 

        deviceDetector.Parse(); 

Issue encounter:
System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.

at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)

at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)

at DeviceDetectorNET.Cache.DictionaryCache.Contains(String id)

at DeviceDetectorNET.Cache.DictionaryCache.Fetch(String id)

at DeviceDetectorNET.Parser.ParserAbstract`2.GetRegexes()

at DeviceDetectorNET.Parser.Client.LibraryParser..ctor()

at DeviceDetectorNET.Parser.Client.ClientType.get_Library()

at DeviceDetectorNET.DeviceDetector.AddClientsParser()

at DeviceDetectorNET.DeviceDetector..ctor(String userAgent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions