I have encountered a rare error condition (seems not to happen on all sims) where the OPENJPEG LLImageJ2COJ::decodeImpl method is called with the first_channel being higher than the number of channels (image->numcomps) in the J2K image (parsed from the header).
I have not verified what textures produce this but as far as I see from the sources this has something to do with masks for baked textures.
With the current viewer this leads to a crash because the number of components for the image size is calculated as 0 in this case so the size will become 0,
too. The error message will look like this: "LLImageBase::allocateData called with bad dimentions: 16x16x0"
I have attached a patch which catches this and simply flags the decoding as having failed.