Why Is My File Crashing? A Short Essay On Reporting and Solving Bugs and Crashing Files
By Neil Blevins
May 19th 2006

I often get given reports of crashes or problems in a 3d file. While it's nice to have someone to turn to when you're in a bind, the truth of the matter is if you quietly hand all your problems to someone else, what will happen if that person is no longer there? What if their too busy? While the joy of creation is a beautiful thing, the realities of the situation is you're using technology, and technology can break, and unless you're lucky enough to have a TD whose sole job is to solve your issues, it's up to you to know how to fix your own problems, or at least simplify them as much as possible before presenting them to be fixed.

The art of finding and categorizing bugs is a very systematic and scientific process. First, you have a problem, your file crashes or produces weird results. Step 1, you need to know exactly what in your scene is causing this problem.

In general, assuming you're using a decent 3d program, a clean fresh scene with nothing in it should not crash or show any strange behavior. Assuming that to be true, the way to discover the problem in your scene is to get your scene as close to that initial state as possible. If you've eliminated every object and effect except one, and the file still crashes, chances are that one remaining object is your problem.

The following discussion is what I do when someone hands me a 3d file (in 3dstudio max), but can be generalized to other 3d packages. For the sake of this piece, we'll assume your problem is a crashing file, but again, a similar method can be used if you just have a file that's producing strange results. If it is a crasher, remember to save a file every time you change something, so you have something to go back to if your file crashes your 3d program.

1) Start deleting objects until the file no longer crashes. Many bugs occur because of a single bad object, or bad interaction between a group of objects. Remember to check for hidden and frozen objects. Once you've figured out which object(s) are responsible, try and delete everything not related to those objects, so you have a file with very minimal geometry. Try deleting any modifiers on your object, or collapse your object to a mesh and see if the problem goes away. One common way of figuring out which object is responsible is called the "Divide And Conquer" technique. Open your scene, delete half of the objects in the scene. If the file still crashes, then the object responsible is in that half. If the file doesn't crash, reopen the file and delete the other half of the scene. Then repeat the procedure, your scene becoming half as big with each iteration. This will allow you to figure out what the offending object is much faster without having to delete each object in the scene individually.

2) Remove any 3rd party plugins. Any plugin you're using such as a modifier, a special atmospheric plugin, etc, remove from the scene. If it stops crashing, you know it was a plugin compatibility problem, and report which plugin was giving problems.

3) Remove all environmental and render effects, remove background.

4) Assign a plain standard material to all remaining objects in your scene. If it stops crashing, it may be a material problem. If it does stop crashing, go back and start assigning standard materials to any object that you can while still retaining the crash.

5) Once you've simplified the number of materials, start simplifying the materials themselves, by slowly turning off reflections, refraction, removing bitmaps, and any other special features you're using in your material. If you find a single material that is crashing, try applying it to a simpler object such as a sphere. If it still crashes, then it's probably your material, and not your material interacting with a strange piece of geometry.

6) Take your current saved file, and merge the objects from that file into a fresh copy of max. If it doesn't crash, then it may have been a problem somewhere in the settings of your old file (or possibly your file got corrupted somehow). Open two copies of max, take your original file and start changing its parameters until you have default values assigned to everything. Check for crashes while changing parameters to see if you can narrow down which parameter may be causing the crash. If it crashes at render, for example, change a parameter, and try rendering. Does this still happen if you change all your render defaults back to their default value? Does it crash if you change your antialiasing filter? If motionblur is turned off?

If your file still crashes and you've done all these things, then you now have a very clean simplified file. If it's a crash with a piece of 3d software, then contact the makers of the software. If it's a crashing plugin, contact the makers of the plugin. You now have a very simple file to hand to them, and probably that vital piece of information such as "This geometry crashes the program" or "This setting when checked crashes" or "this material doesn't produce expected results when assigned to this type of object". For bonus points, try and reproduce the crash starting from a fresh clean file, and if you manage to crash it, report such an event with easy to follow steps for the programmer...
1) Open max
2) Open file
3) Press this button
4) Change that spinner
5) Render
6) Max crashes
Also giving info on what copy of max you have, OS info, type of hardware used in your computer etc.

While this may seem like a lot of work, if you don't do it, the person you hand the file to will have to do it, and they have the added issue of not being familiar with your file. And he probably has a bunch of other files to look at to. You have to ask yourself, would I prefer him spending his time figuring out what the bug is, or would I prefer him spending his time fixing the bug? Hopefully these steps can be of some use to you, and in fact they will, giving more precise and simplified bug reports means a programmer is far more likely to fix a problem promptly, and then you'll be back rendering in no time.

This site is ©2023 by Neil Blevins, All rights are reserved.
NeilBlevins.com Twitter Mastodon Bluesky Instagram Blogger Facebook LinkedIn ArtStation Kickstarter Gumroad YouTube IMDB