Blender Crashes while Saving as Colada File for Second Life

Periodically I have found that Blender crashes (more recently rather than crashing it saves a 0 byte empty file) when I try to export (or save) my model to Collada (*.dae) using the Second Life Static Preset values.  It seems to happen most often after parts of the model I am creating are deleted, as when trying to simplify the model to create lower levels of detail for use in uploading to Second Life.   In most cases the solution is fairly easy and the file can be repaired in about 5 minutes or less.  Unfortunately this easy solution does not always work.  On the other hand, it does work most of the time!  So here’s how I fix the crash problem, both a quick description for those with lots of Blender experience and detailed step-by-step instructions for the rest of us.  (This article updated 4/13/2014,   4/24/2014, and 7/19/2016.  As I discover new problems and fixes I will continue to update this article.)

Quick Fix Description:

  • Export the model as a Collada (*.dae) file using the default preset, and including textures if used.
  • Quit and restart Blender.
  • Import the Collada file you just exported back into Blender.
  • Now you should be able to export to Collada using the Rigged or Static SL + OpenSim presets.
OK, I know I sound like an idiot.  After all, Blender crashes when you try to export as Collada.  That’s the whole problem!!  But yes, in an odd twist, the problem is the solution!  The trick is to export as Collada using the Default Presets (select “Restore Defaults”) rather than the SL + OpenSim Static or Rigged presets.  Usually Blender will successfully export your model when using the default Collada settings.  Somewhere in this process of exporting to and importing from the default Collada file format, whatever it was that was creating the problem in the file gets fixed.  After the import try exporting to Collada using the Second Life presets, usually it will work now.  If not, there are additional fix suggestions at the end of this article, scan down.
Confused?  Continue on for the step-by-step instructions…


  1. From the main menu (usually in the top left corner of the Blender screen) select File > Save As to save a backup of your Blender model, just to be safe.  This is based on Blender version 2.69 .   The next few steps are basically the same as when you export your model to Collada for Second Life, except you will use the default presets, not the SL + OpenSim presets. We’ll continue step-by-step.
  2. Select File > Export > Collada default (.dae).  The export to Collada window will open.
    • Optional: When Blender crashed while trying to save the Collada file using the SL + OpenSim settings, it probably created a empty file using the name of  your model with a .dae extension.  That file may be in the list of files shown, if so, now is a good time to delete it.  Click on the filename to highlight it, press the “Delete” key on your keyboard, and confirm the delete.  In fact, now might be a good time to delete any other old *.dae files in the directory that aren’t needed.
    Export to Collada using “Restore Defaults” Preset.
  3. While still in the export to Collada screen, in the left hand column scan down to the “Export COLLADA” section.  Click on “Operator Presets“.  This is the same place you normally select the SL + OpenSim Rigged or SL + OpenSim Static presets.  Don’t select those, instead select “Restore Defaults“.  If you have used UV Textures or Material Textures in your 3d model scroll down and check the boxes labeled “Include UV Textures” and/or “Include Material Textures”.   (If after importing your rebuilt model file in step 7 you find  it is missing elements or is not what you expected, you may want to come back and try again using various combinations of checking and unchecking boxes.  There are lots of variations that may work better for you depending on what textures and materials you have used.)  In the Collada Options section be sure the checkbox next to “Triangulate” is checked.  Unchecking it, while logical sounding, seems to prevent the file error from getting fixed, so let the export triangulate the model.  I’ll include instructions on how you can easily restore the triangles back to quads later in step 8.
  4. Now type in a new file name in the File Name field near the top of the main Collada Export window.  Any name you want as long as it ends with “.dae”.  Ie; “MyModelRepairAttempt.dae”.  Click on the “Export COLLADA” button at the upper right corner.  Hopefully Blender will create the Collada file and will not crash.  If Blender crashes this fix isn’t going to work, skip down to the section Additional Fix Suggestions.
  5. Assuming the export went as expected, shut down Blender, “File > Quit“.
  6. Wait about 30 seconds for everything to shut down, then Restart Blender in the normal way.  If anything is shown in the edit window (like the default cube) delete it.  WARNING: You are going to import the Collada file you just exported.  When you import a file into Blender it will add the contents of the imported file to whatever is currently loaded as a model.  So make sure nothing is there by checking the status line at the top of the main screen.  It should say Verts:0 | Faces:0 | Tris:0… etc.  If it doesn’t, then there is some object still in your model, find and delete it.
    Make sure Verts value is 0 before importing the new Collada file.
  7. Select File > Import > Collada default (.dae).  Find the Collada file you just exported and select it.  Click on the “Import COLLADA” button in the top right corner of the screen.
  8. Your model should show up in the main 3d View window.  Check it over carefully to make sure everything is there.  Check it in Edit mode, Object mode, and the UV Editing Window as well.  There may  be a lot of unexpected edges forming triangles that were not showing in your original model.  Part of the clean up process is to re-triangulate all the quads.  You can simplify the appearance of your model by going into Edit Mode, then in the bottom menu select “Mesh” > “Faces” > “Tris to Quads”.  That should give you a cleaner looking model.  Save your cleaned up model using a new name.
  9. Now try to export your model to Collada again, this time using the SL + OpenSim presets.  Usually at this point you will have success!
If the above doesn’t work, take a break to calm down, then come back and look at additional fixes section below the Quick Tip below.

Quick Tip…

Do you make a practice of regularly backing up your Blender files and advancing the file name?  It is very helpful if about once an hour or so you save your Blender model and test to see if you can export it to Collada using the SL+OpenSim Presets.  If the export is successful, then use “Save as” to save the Blender file using a new name.  The easiest way to do this is to name your Blender files with incremental filename numbers, like MyModel01, MyModel02, MyModel03, etc.  Once you name a file using a number in the name, it is easy to increment the file number using the Increment the Filename Number feature on the Blender SaveAs screen.  this feature is a button with a “+” on it just to the right of the filename field.  Press the button and Blender changes your filename to increment the number for you.  Saving incremental copies of the file that you know will export gives you a backup point to restart from in the even your model becomes totally corrupted and can’t be restored.  That way you don’t lose everything and have to start again from scratch.  I learned this one the hard way!  Since then it has saved me a lot of work on several models that became totally ruined.

 Additional Fix Suggestions:

If the above doesn’t fix the problem, here are some suggestions of things that have worked for me.  They are listed in priority from “quick and easy” to “you gotta be kidding!”
Re-triangulating the faces of your model sometimes fixes the crashing problems.  Switch to Edit Mode (tab key toggles it on and off) in your 3d View.  Now Select All (press “a” to toggle) so that the entire model is highlighted.  Press “Ctrl T” to triangulate the faces.  Now press “Alt J” to convert back to quads.  Finally press “Ctrl T” once again to triangulate.  What you are doing is forcing Blender to recalculate the triangle locations.  This hopefully corrects any missing, messed up, or non-existent triangles that may have been hanging around and causing the crash.
Try Unwrapping the UV Map again.  Edit Mode, Select All, Click Unwrap and select Unwrap.  Take a look at the UV Map (Click the Choose Screen Layout button at top of Blender Screen, select “UV Editing”.   The UV Map should appear neat and orderly, without odd looking lines that seem to extend from one face to another.  If you have weird lines or can’t identify individual faces from your model on the UV Map, you probably need to add more seams, then Unwrap again.  If it looks confused, then Blender is having trouble figuring out how to unwrap it using your seams.  Add more seams.  As a last resort, select all and make every edge a seam.
Try removing all the seams and recreating them.  Go into the Edit Mode (tab).  Select all (“a”). In left column under the heading UV Mapping click on “Clear Seam”.  Now create new seams in the normal way be selecting the desired edges and clicking on “Mark Seam”.  Be sure to unwrap and check your UV Map again to be sure it reflects the new seams and unwraps in a neat and orderly fashion.
I’ve noticed this crashing problem develops if you delete all the faces for a Material or Texture from your model, or if you delete a Material or Texture.  Try cleaning up the materials by deleting all the Materials/Textures and recreating them.  Yes, deleting and recreating them is a LOT of work!
Final option is to start all over.  Hopefully you saved a previous version of your model that you tested and you can revert back to that.  If you have to go back and totally start over at the beginning, my sympathies.  I’ve had to do it a few times, so I’ve been there!

About these Blender articles:  I am NOT an expert at Blender.  I am learning it as I go, and these are basically my cheat notes which I am sharing.  A lot like students in a class sharing notes after a long, confusing lecture.  As such, they are not as polished as some articles.  Some of what I write may be totally wrong or at lest the wrong terminology.  Feel free to email me suggestions, corrections, and comments.  Click the Contact link just above the bottom of this page.  I had to turn off comments due to the amount of spam comments.

No comments:

Post a Comment