# Rider's debug mode triggers exception on TSharedRef::Init

**URL:** <https://forums.unrealengine.com/t/riders-debug-mode-triggers-exception-on-tsharedref-init/2645093>\
**Category:** C++\
**Tags:** ide, debug, unreal-engine, question, CPP\
**Created:** [August 17, 2025, 9:07pm UTC](https://forums.unrealengine.com/t/riders-debug-mode-triggers-exception-on-tsharedref-init/2645093 "2025-08-17T21:07:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kotaru\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kotaru\_1](https://forums.unrealengine.com/u/Kotaru_1)\
**Post date:** [August 17, 2025, 9:07pm UTC](https://forums.unrealengine.com/t/riders-debug-mode-triggers-exception-on-tsharedref-init/2645093/1 "2025-08-17T21:07:17Z")

</div>

After accidentally editing code while the engine was running in debug mode, I get an exception at TSharedRef::Init

This only happens with rider in debug mode. I tried running debug mode in VS and it worked fine. I also tried running the engine from rider normally (without debugger) and it ran fine.

It almost seems like rider is reading these variables as nullptrs

---

<div class="post-metadata">

**Author:** ![Kotaru\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kotaru\_1](https://forums.unrealengine.com/u/Kotaru_1)\
**Post date:** [August 18, 2025, 1:50am UTC](https://forums.unrealengine.com/t/riders-debug-mode-triggers-exception-on-tsharedref-init/2645093/2 "2025-08-18T01:50:39Z")

</div>

Managed to fix by going to File → Invalidate Caches
