spectreconsole / spectre.console

A .NET library that makes it easier to create beautiful console applications.
https://spectreconsole.net
MIT License
9.17k stars 472 forks source link

NullReferenceException in Progress #1334

Open thomhurst opened 11 months ago

thomhurst commented 11 months ago

Information

Describe the bug

Unhandled 
  exception. System.NullReferenceException: Object reference not set to an 
  instance of an object.
     at Spectre.Console.FallbackProgressRenderer.Update(ProgressContext context) 
  in 
  /_/src/Spectre.Console/Live/Progress/Renderers/FallbackProgressRenderer.cs:line 
  30
     at Spectre.Console.ProgressContext.Refresh() in 
  /_/src/Spectre.Console/Live/Progress/ProgressContext.cs:line 71
     at Spectre.Console.ProgressRefreshThread.Run() in 
  /_/src/Spectre.Console/Live/Progress/ProgressRefreshThread.cs:line 45
     at System.Threading.Thread.StartHelper.Callback(Object state)
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext 
  executionContext, ContextCallback callback, Object state)
  --- End of stack trace from previous location ---
     at System.Threading.Thread.StartCallback()

Please upvote :+1: this issue if you are interested in it.

patriksvensson commented 11 months ago

@thomhurst Thanks for reporting this. Could you add some kind of reproduction for the error you're experiencing?

thomhurst commented 11 months ago

I haven't managed to reproduce it. It's probably happened once out of 1000 times, so not sure what the problem is. I expect some sort of race condition?