# Sharedpointers error in Plugins on packagin, but not in PIE

**URL:** <https://forums.unrealengine.com/t/sharedpointers-error-in-plugins-on-packagin-but-not-in-pie/377898>\
**Category:** Platform & Builds\
**Tags:** debug-trace, unreal-engine, Packaging, editor, CPP, question\
**Created:** [November 30, 2016, 11:05am UTC](https://forums.unrealengine.com/t/sharedpointers-error-in-plugins-on-packagin-but-not-in-pie/377898 "2016-11-30T11:05:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Algorithman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Algorithman](https://forums.unrealengine.com/u/Algorithman)\
**Post date:** [November 30, 2016, 11:05am UTC](https://forums.unrealengine.com/t/sharedpointers-error-in-plugins-on-packagin-but-not-in-pie/377898/1 "2016-11-30T11:05:07Z")

</div>

I have a slight problem with packaging my project (still work in progress, so it’s not a immediate problem).

When i package to Win64 (probably on other platforms too), i get a sharedpointers error (IsValid() in SharedPointers.h)  
I assume the fault is my plugin, but the 2 entries in the stack which refer to my plugin are without debug information.

Is there a way to get the debug info at packaging? Since i don’t know what causes it and it runs just fine in PIE mode, i’m bit at a loss here. Also what i would like to know is, what’s causing this type of error? (I don’t really use SharedPointers conciously)

Any tips are welcome.

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [December 1, 2016, 6:46pm UTC](https://forums.unrealengine.com/t/sharedpointers-error-in-plugins-on-packagin-but-not-in-pie/377898/2 "2016-12-01T18:46:47Z")

</div>

Hey Algorithman,

I’m not sure if you’re referring to debugging the packaged .exe, or debugging the process during packaging.

I’ve come across a couple of articles that might help you debug your packaged game, and I’d recommend trying these:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

> **[How to debug packaged game?](https://forums.unrealengine.com/questions/66760/how-to-debug-packaged-game.html)**
>
> The game module XXX could not be found. Please ensure that this module exists and that it is compiled. When you begin to debug game with 'Debug' or 'DebugGame' or 'Development' configration, you will get the error! 1.Put -debug parameter will not...

Let me know if that helps, or if you have any further questions.

Have a great day

---

<div class="post-metadata">

**Author:** ![Algorithman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Algorithman](https://forums.unrealengine.com/u/Algorithman)\
**Post date:** [December 2, 2016, 11:06am UTC](https://forums.unrealengine.com/t/sharedpointers-error-in-plugins-on-packagin-but-not-in-pie/377898/3 "2016-12-02T11:06:50Z")

</div>

Not exactly my problem. While packaging the game is apparently executed, but fails with the IsValid() error in SharedPointer.h (line 712 iirc).

Since it doesnt finish packaging, i cant possibly debug the packaged game.  
I’ll provice the stacktrace in a few hours, i think it makes clear what’s missing.

But thx for the links, i probably need them in the future 🙂

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [December 5, 2016, 3:21pm UTC](https://forums.unrealengine.com/t/sharedpointers-error-in-plugins-on-packagin-but-not-in-pie/377898/4 "2016-12-05T15:21:57Z")

</div>

Could you provide the full output log from your project’s Saved-\>Logs folder so I can have a look at your exact errors

---

<div class="post-metadata">

**Author:** ![Algorithman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Algorithman](https://forums.unrealengine.com/u/Algorithman)\
**Post date:** [December 6, 2016, 6:23pm UTC](https://forums.unrealengine.com/t/sharedpointers-error-in-plugins-on-packagin-but-not-in-pie/377898/5 "2016-12-06T18:23:05Z")

</div>

Sorry for the delay.

Attached are the cooking logs (same error on packaging).

8\<----------------- snip ----------------------

[2016.12.06-18.12.54:999][397]UATHelper: Cooking (Windows): UE4Editor-Cmd: [2016.12.06-18.12.54:756][0]LogWindows:Error: UE4Editor-Slate.dll!FSlateApplication::Get() [c:\github\unrealengine\engine\source\runtime\slate\public\framework\application\slateapplication.h:222]

**[2016.12.06-18.12.55:000][397]UATHelper: Cooking (Windows): UE4Editor-Cmd: [2016.12.06-18.12.54:766][0]LogWindows:Error: UE4Editor-MazeGenerator.dll**

**[2016.12.06-18.12.55:000][397]UATHelper: Cooking (Windows): UE4Editor-Cmd: [2016.12.06-18.12.54:776][0]LogWindows:Error: UE4Editor-MazeGenerator.dll**

[2016.12.06-18.12.55:000][397]UATHelper: Cooking (Windows): UE4Editor-Cmd: [2016.12.06-18.12.54:786][0]LogWindows:Error: UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [c:\github\unrealengine\engine\source\runtime\core\private\modules\modulemanager.cpp:485]

8\<----------------- snip ----------------------

So i can’t determine where it breaks in my plugin. Is there a way to use the plugin dll WITH debug information while cooking?

Project log

---

<div class="post-metadata">

**Author:** ![Algorithman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Algorithman](https://forums.unrealengine.com/u/Algorithman)\
**Post date:** [December 11, 2016, 7:49am UTC](https://forums.unrealengine.com/t/sharedpointers-error-in-plugins-on-packagin-but-not-in-pie/377898/6 "2016-12-11T07:49:34Z")

</div>

Found my bug and a solution, editor nulled my object instances in my array.
