Blender crashes during bake I made a model of a small building, lit with HDR and some light planes.  The walls are textured with images, normal maps etc The whole file is about 28mb.  The 4 walls are separate meshes, and I am trying to bake the textures one wall at a time.  I unwrap a wall section, create an image in the UV editor, add a new image texture node in the node editor,  etc. and hit bake and every time Blender crashes immediately.  If I copy and paste the wall section into a new Blender file it bakes just fine. The wall panel by itself is about 1.5mb. I have tried baking while in Object mode, Edit mode, to no avail.  I'm just trying to bake one small mesh at a time so I don't understand if this is a memory problem?  Using 2.79, Cycles, CPU.
This may be standard practice but it works for me so I wanted to post it here. It seems that Blender looks at the render layer settings when baking.  I have a bunch of detail in my file (wall framing, interior trim, furniture etc.) that doesn't effect the baked texture on, for instance, exterior walls.  



so when I bake the exterior wall texture I exclude those items in the render layer panel.  This seems to have eliminated the crashing problem. It's just important to be sure that none of the excluded layers would have contributed to the bake.  In this case the exterior lighting casts shadow on the walls so that layer isn't excluded.  There may be better ways of handling this but this is what I have found that works for me.