I've been able to reproduce this bug, and I have a temporary fix.
Here are my repro steps:
1. Create an atlas with about 70 100x100 icons, with the following options checked in the Atlas Maker
- Trim Alpha
- Truecolor
- Force Square
This should result in a 2048x2048 texture that is about half-full.
2. Select all of the icons again, and hit the "Add/Update" button to update them all.
3. Observe errors.
The bug is difficult to reproduce because it is dependent on your computer hardware. More specifically, it is dependent upon how long the garbage collection takes.
The problem is this: NGUI is creating temporary textures during atlas creation. Unity is destroying these textures when AssetDatabase.Refresh is called (ex: through NGUIEditorTools.ImportTexture), since this triggers a Resources.UnloadUnusedAssets. The temporary textures will then be unloaded from memory, and set to null.
My solution was to create a temporary gameobject when a temporary texture is created inside the CreateSprites function. I also create a temporary material, and assign the temp texture to this material. When ReleaseSprites is called, I destroy that gameobject.
Here is another helpful tip for more clearly understanding this bug. Go to around line 665 of the UIAtlasMaker.cs file, within this function
UpdateAtlas (List<Texture> textures, bool keepSprites)
Right after the call to CreateSprites, iterate through each SpriteEntry, and print a log message if the texture of any of those entries is set to null. You should see that at this point, if you have a large number of textures to update, the temporary textures will have their texture set to null.