How to work out why computer crashes during light baking or packaging game?

My computer keeps crashing everytime i try to either build lighting or package the game. I want to figure out how I can find what is causing the computer to crash?

When my computer kept crashing it was because my graphics card just was’t up to snuff for the engine anymore. What are your computer specs and how many lights do you have in a scene?