# Packaged project crashes on start after migrating to 4.27

**URL:** <https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334>\
**Category:** Platform & Builds\
**Tags:** windows, migrate, ue4-build, ue4-crash, unreal-engine, crash, bug-report, packaging-projects, question\
**Created:** [October 21, 2024, 8:54am UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334 "2024-10-21T08:54:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![amobx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amobx](https://forums.unrealengine.com/u/amobx)\
**Post date:** [October 21, 2024, 8:54am UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/1 "2024-10-21T08:54:04Z")

</div>

Hi there! The packaged game crashes on startup with this error:

Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 5349] Missing global shader FWriteToSliceVS’s permutation 0, Please make sure cooking was successful.

game\_Win64\_DebugGame!VerifyGlobalShaders()  
game\_Win64\_DebugGame!CompileGlobalShaderMap()  
game\_Win64\_DebugGame!FEngineLoop::PreInitPreStartupScreen()  
game\_Win64\_DebugGame!GuardedMain()  
game\_Win64\_DebugGame!GuardedMainWrapper()  
game\_Win64\_DebugGame!LaunchWindowsStartup()  
game\_Win64\_DebugGame!WinMain()  
game\_Win64\_DebugGame!\_\_scrt\_common\_main\_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe\_common.inl:288]  
kernel32  
ntdll

The debug info when running with visual studio shows that the problem is not a shader missing, but a LOT of mismatched size shaders I assume carried on from the last version of unreal in the migration:

LogShaders: Error: Mismatch size for type FHistogramCS, compiled size is 208, loaded size is 156  
LogShaders: Error: Mismatch size for type FHeightFogVS, compiled size is 214, loaded size is 162  
LogShaders: Error: Mismatch size for type FGlobalShaderMapContent, compiled size is 104, loaded size is 76  
LogShaders: Error: Mismatch size for type FGlobalShaderMapContent, compiled size is 104, loaded size is 76  
…etc.

The project was migrated from 4.26 to 4.27 a year ago, and before that it built and ran perfectly. Also, I have built other games in this version of the engine and I had no problems so that is also out of the question. This is on windows 64 bit and the packaging process shows no errors. The only fix I have left is to redo in the old 4.26 project the whole year of progress. I’m desperate, please I need help with this. Thank you in advance.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [October 21, 2024, 9:14am UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/2 "2024-10-21T09:14:57Z")

</div>

If the compiled shaders are from an older version then just try deleting the shader cache and have 4.27 rebuild them. This might help with the process

Delete the folders

- DerivedDataCache
- Intermediate

if c++

- Binaries
- .vs

Then try rebuilding the project. It should build the shaders in line with the newer version of the engine.

---

<div class="post-metadata">

**Author:** ![amobx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amobx](https://forums.unrealengine.com/u/amobx)\
**Post date:** [October 21, 2024, 9:47am UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/4 "2024-10-21T09:47:31Z")

</div>

Thanks for the reply! Unfortunately I have already tried that, plus recompiling all shaders. Also I am doing a full rebuild everytime and tried packaging in 3 different machines. Also fixed redirections in folder, validated assets and maps and resaved the materials, still nothing. One thing to note is that I’m using ue4 in a portable disk, in case that is something to take into account. Is there anything else I can do?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [October 21, 2024, 10:25am UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/5 "2024-10-21T10:25:55Z")

</div>

Here is my old post that fixed a similar problem for another person

> [@Packaged game - Missing global shader FUpsampleCS's permutation 0](https://forums.unrealengine.com/t/packaged-game-missing-global-shader-fupsamplecss-permutation-0/1904025/8):
>
> Do you have “cook on the fly” turned on? If so try it with the option turned off. Is shader model 6 turn on? (SM6) Perhaps try turning on NNERuntimeRDG maybe one of the plugin’s you are using is somehow interdependent with it? (if you are using any) Another possibility: run recompileshaders all from the command line. Perhaps it will force the compilation of the missing shader. Though I’ve heard it can cause freezes. Some people mention to run recompileshaders changed to mitigate the freeze.…

It was so long ago I forgot I found a solution for it.

If that doesn’t help then maybe this thread could be a fix. the OP had to turn on an encryption setting for ini files for it to not throw the permutation error on a the shader. It was his own shader but the error message itself seems to mirror what you are getting, so it might work.

The ini setting seems to be in project settings =\> Crypto

 ![obraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/f/5/2f57c437ce199fbd14a41de302bb67d53c382a1b.png)

The thread:

> [@\[Solved\] Packaging own global shader failing \[4.22.3\]](https://forums.unrealengine.com/t/solved-packaging-own-global-shader-failing-4-22-3/132712/6):
>
> I encountered same error when turning encryption ini file to true from false. It is solved by turning encryption for ini back to true.

---

<div class="post-metadata">

**Author:** ![amobx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amobx](https://forums.unrealengine.com/u/amobx)\
**Post date:** [October 21, 2024, 11:28am UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/6 "2024-10-21T11:28:20Z")

</div>

I saw that thread while researching the issue, and I do have the ini file encryption turned on and the cook on the fly setting turned off so still no advance 😅

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [October 21, 2024, 4:30pm UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/7 "2024-10-21T16:30:14Z")

</div>

Maybe these shader tips for ue4 can help?

> **[\[UE4\]Shader Development Notes](https://dawnarc.com/2020/07/ue4shader-development-notes/)**
>
> Keywords: UE4, Shader Development, Material Optimization, Shader Debugging

 ![obraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/b/5/4b5b80be68743a809264e38d64eb66cec531ac52.png)

---

<div class="post-metadata">

**Author:** ![amobx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amobx](https://forums.unrealengine.com/u/amobx)\
**Post date:** [October 22, 2024, 10:12am UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/8 "2024-10-22T10:12:23Z")

</div>

Hi! Sorry for the delay. I tried that and still got nothing but I noticed that the shaders that fail are the whole ‘Global’ library, maybe there is a way to regenerate those? Or copy them from another 4.27 native project?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [October 22, 2024, 11:28am UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/9 "2024-10-22T11:28:06Z")

</div>

I’ve also seem people mentioning this error if the project is for instance on the desktop. It could be a similar problem with your portable drive. Maybe unreal needs it to be in a normal environment that has the correct write access etc.

A fix on reddit mentions you can try moving the project to a new one. I’m guessing via migrate.

[https://www.reddit.com/r/unrealengine/comments/168pi02/trying\_to\_get\_package\_a\_game\_but\_getting\_shader/](https://www.reddit.com/r/unrealengine/comments/168pi02/trying_to_get_package_a_game_but_getting_shader/)

Do you have shader model 6 enabled in your project? (SM6 in project settings). If it’s off then try turning it on and compiling.

---

<div class="post-metadata">

**Author:** ![amobx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amobx](https://forums.unrealengine.com/u/amobx)\
**Post date:** [October 22, 2024, 6:12pm UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/10 "2024-10-22T18:12:07Z")

</div>

I will try tomorrow with a non portable ue4 installation and project, thanks. SM6 is not available in my unreal engine though.

---

<div class="post-metadata">

**Author:** ![amobx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amobx](https://forums.unrealengine.com/u/amobx)\
**Post date:** [October 23, 2024, 8:09pm UTC](https://forums.unrealengine.com/t/packaged-project-crashes-on-start-after-migrating-to-4-27/2078334/11 "2024-10-23T20:09:44Z")

</div>

Just finished trying everything. No luck for now: Installing the engine and moving the project into my C: drive did nothing and neither migrating the project into a new 4.27 one. Also tried to delete all materials and do a build without them, still didn’t work. I don’t know if there’s any hope left but thank you for your help anyways ☹
