A crash occurs if a resourcepack has an animation that does not reference frame #0 in its mcmeta file.
The attached resourcepack reproduces the problem. stone.png is 16x48 (3 frames), but stone.png.mcmeta uses only frames 1 and 2. Selecting this resource pack causes the game to crash while stitching blocks.png. Crash report also attached.