# Game Crashes while running in Standalone Mode , and works fine in editor

**URL:** <https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466>\
**Category:** C++\
**Tags:** unreal-engine, crash, CPP, question\
**Created:** [April 11, 2023, 10:12am UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466 "2023-04-11T10:12:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![liona](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@liona](https://forums.unrealengine.com/u/liona)\
**Post date:** [April 11, 2023, 10:12am UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466/1 "2023-04-11T10:12:16Z")

</div>

my game works fine in editor but crashes after running as Standalone mode , and also in build ,

the error in call stack not pointing to any of my classes

the call stack :

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/4/d/d4d409179426deb2ffe6c85fda7471a6defb9262.png)

there is no more infos about what happened  
but log file mentioned one more thing – `Fatal error` –

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/b/41ba1ff781d6136cf705657972f4b4cf149d1bc7.png)

please help , thank you for any help

---

<div class="post-metadata">

**Author:** ![Jnat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jnat/32/927460_2.png) [@Jnat](https://forums.unrealengine.com/u/Jnat)\
**Post date:** [April 11, 2023, 11:00am UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466/2 "2023-04-11T11:00:56Z")

</div>

hi @liona  
you should launch your game with visual studio attached to see where it crashes.  
It should be linked to what you are doing in your project. The fact it crashes in standalone and not in the editor might point to some data that is not loaded yet (the editor loads more stuff than the standalone version)  
You may have a crashlog too with a dump that you can use to pinpoint the crash in your Saved directory

---

<div class="post-metadata">

**Author:** ![liona](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@liona](https://forums.unrealengine.com/u/liona)\
**Post date:** [April 12, 2023, 8:25am UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466/3 "2023-04-12T08:25:59Z")

</div>

hey @Jnat , I found that the error occurs in a custom struct of mine but the error is very weird and I have been Straggling with it and not fixed yet ,

the error is (call stack) :

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/7/df72363472a79fb3fe27c678530832a4423f4905.png)

and I print all string in FMyStruct before assigning it to other variables and it’s a Valid string ?

how can i fix this ? , is it a problem with my struct ? case unreal always points to one of my structs while an error occurs

and everything is fine in editor yet

---

<div class="post-metadata">

**Author:** ![eblade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eblade](https://forums.unrealengine.com/u/eblade)\
**Post date:** [April 12, 2023, 10:12am UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466/4 "2023-04-12T10:12:03Z")

</div>

how are the structs defined?

---

<div class="post-metadata">

**Author:** ![liona](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@liona](https://forums.unrealengine.com/u/liona)\
**Post date:** [April 12, 2023, 10:18am UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466/5 "2023-04-12T10:18:47Z")

</div>

hey @eblade thanks for the feedback ,

.h  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/6/8a644d5b36954cc3cd6cad745204f8177abba9c2.png)

.cpp  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/7/d37a1c7327ae8c78a7e0c66939ab777d3222babf.png)

is it a good practice ?

---

<div class="post-metadata">

**Author:** ![Jnat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jnat/32/927460_2.png) [@Jnat](https://forums.unrealengine.com/u/Jnat)\
**Post date:** [April 12, 2023, 2:16pm UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466/6 "2023-04-12T14:16:34Z")

</div>

hi @liona ,  
nothing catches my eye here.  
Usually when I have a problem like this one I launch a debug session and trigger the crash so I can see the state of the memory program and where exactly it fails.  
I might give you more info on why this struct is failing somehow.

---

<div class="post-metadata">

**Author:** ![liona](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@liona](https://forums.unrealengine.com/u/liona)\
**Post date:** [April 13, 2023, 8:08am UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466/7 "2023-04-13T08:08:27Z")

</div>

@Jnat oh ,

the problem is it never happens in editor only crashes the game after building with an error message `fatal error`

> [@Jnat](#):
>
> Usually when I have a problem like this one I launch a debug session and trigger the crash so I can see the state of the memory program and where exactly it fails.

do you have any source , link or video about this by any chance so i can take a look ?

thanks fror your help

---

<div class="post-metadata">

**Author:** ![Jnat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jnat/32/927460_2.png) [@Jnat](https://forums.unrealengine.com/u/Jnat)\
**Post date:** [April 13, 2023, 8:25am UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466/8 "2023-04-13T08:25:16Z")

</div>

hi !

go check this, install visual studio community and click on the “play” arrow so your game launches in debug mode (you can select the build configuration) Your data will probably need to be cooked.

> **[Setting Up Visual Studio](https://docs.unrealengine.com/5.1/en-US/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine/)**
>
> Tips, tricks, and techniques for setting up Visual Studio to work with Unreal Engine

I don’t use Code, so I can’t really tell how to launch a debug session on it ^^

---

<div class="post-metadata">

**Author:** ![liona](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@liona](https://forums.unrealengine.com/u/liona)\
**Post date:** [April 13, 2023, 8:32am UTC](https://forums.unrealengine.com/t/game-crashes-while-running-in-standalone-mode-and-works-fine-in-editor/885466/9 "2023-04-13T08:32:50Z")

</div>

@Jnat thank you my friend , I appreciate it
