This code causes Mathematica 10.2 on a Mac running OS 10.10.3 to crash. If i change the 30 to 5 if works just fine. If I put a semicolon after the
damages import line it works ok. but displaying the 30 images causes a repeatable crash. I’ve got roughly 20GB of unused RAM available.
Any ideas as to why this is happening would be appreciated. Thanks!
Displaying that many large images in the notebook just isn’t currently feasible. From what I understand the notebook represents and renders images in a pretty simple way. The kernel however is pretty capable of handling it.
Use semicolons like you have been doing. If you want to view an image, I would recommend resizing it before displaying it in the notebook:
ImageResize[myImage, 500]
If you are going to be working with a lot of images, you might consider adding some code so that the outputs are automatically resized:
However when the image is shown on the page the size is minuscule so I don’t see why resizing helps.
In any case I’m pretty surprised that a tool as mature as Mathematica totally dies when it runs into a memory shortage. Makes me wonder if Mathematica can produce erroneous results in low memory situations without letting me know about it.