I’ll lay out my hypothesis here.
The stack is leading you to believe that this is where the crash occurs, but it occurs elsewhere. We’re looking at the wrong thread.
I don’t know if this would be practical, but sometimes good old “printf debugging” helps. What if you print out the value you’re looking for before calling TryGetValue? You would see whether you strike a null or not.