# Packaged game crashes on load when Share Material Shader code is turned on

**URL:** <https://forums.unrealengine.com/t/packaged-game-crashes-on-load-when-share-material-shader-code-is-turned-on/407916>\
**Category:** Rendering\
**Tags:** unreal-engine, crash, packaging-projects, Shaders, UE4, question\
**Created:** [October 25, 2017, 3:06pm UTC](https://forums.unrealengine.com/t/packaged-game-crashes-on-load-when-share-material-shader-code-is-turned-on/407916 "2017-10-25T15:06:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimsnomis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jimsnomis](https://forums.unrealengine.com/u/jimsnomis)\
**Post date:** [October 25, 2017, 3:06pm UTC](https://forums.unrealengine.com/t/packaged-game-crashes-on-load-when-share-material-shader-code-is-turned-on/407916/1 "2017-10-25T15:06:37Z")

</div>

When Share Material Shader Code is turned on in project settings, and the game is packaged, it crashes when run during some async IO operations.

This was fine in previous versions on UE4. It happened after updating the project to 4.18.0. Win64 build.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 27, 2017, 2:19pm UTC](https://forums.unrealengine.com/t/packaged-game-crashes-on-load-when-share-material-shader-code-is-turned-on/407916/2 "2017-10-27T14:19:00Z")

</div>

Hello jimsnomis,

I’m seeing the same result just by packaging with that setting enabled in a Third Person template project. Just to ensure that I am getting the same error as you, is this what you see?

![218137-sharedmat-crash.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/8/d083c4fff5e97cb341e7dea2ac9aad8df404c71d.png)

I’ll be testing in 4.17 and our latest build to test for regression and if it happens in our latest build and I’ll enter a bug report after, so I’ll let you know when that happens.

---

<div class="post-metadata">

**Author:** ![jimsnomis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jimsnomis](https://forums.unrealengine.com/u/jimsnomis)\
**Post date:** [October 27, 2017, 2:35pm UTC](https://forums.unrealengine.com/t/packaged-game-crashes-on-load-when-share-material-shader-code-is-turned-on/407916/3 "2017-10-27T14:35:30Z")

</div>

Hey Matthew,

It wasn’t this specifically - but I was running in VS2017 and the debugger caught it. It wasn’t during packaging but running the packaged game though.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 27, 2017, 4:41pm UTC](https://forums.unrealengine.com/t/packaged-game-crashes-on-load-when-share-material-shader-code-is-turned-on/407916/4 "2017-10-27T16:41:42Z")

</div>

Thank for that information. I’ve entered a bug report for the issue here: [UE-51705](https://issues.unrealengine.com/issue/UE-51705). I was a little unclear in my last comment, I’m getting the crash when launching the packaged game as well. I cannot think of a workaround at the moment other than using 4.17. Please follow that report for updates on the bug’s status.
