question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MainLoop.RunTimers(): System.ArgumentException: 'An entry with the same key already exists

See original GitHub issue

Hello,

I’m having trouble in the MainLoop execution which is throwing an exception in the RunTimers() method. It is failing when trying to add the Timeout back to be run again in the next iteration. The issue seems to be that the calculated ticks can be a duplicate with what is already in the SortedList which then throws the exception. I’m thinking that when RunTimers() adds the Timeouts back for the next iteration, it causes DateTime.UtcNow to possibly be the same for multiple timeouts. So then any timeouts with the same TimeSpan defined would then cause a collision.

image image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
brian-pickenscommented, Aug 2, 2020

I’ll pull from master again and rerun my test but I’ll post the whole Program class along with my .csproj when I have a chance.

1reaction
brian-pickenscommented, Aug 1, 2020

Ill see if I can come up with a simple recreation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An entry with the same key already exists - ...
Exception Details: System.ArgumentException: An entry with the same key already exists. Source Error: An unhandled exception was generated ...
Read more >
ArgumentException An entry with the same key already exists
When switching between files: System.ArgumentException: An entry with the same key already exists. at System.Collections.Specialized.
Read more >
Entry with the same key already exists
Hello, I am receiving the error "Entry with the same key already exists" when trying to load a xml through a workflow. I...
Read more >
An entry with the same key already exists.
Hi Team, We are refreshing the data for already built report. I am getting the error 'An entry with the same key already...
Read more >
Getting error "An entry with the same key already exists. ...
Everytime I add the metadata url I get "An entry with the same key already exists". I've tried using powershell and get the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found