The Viewport Compositors crashes when there are many nodes that are not connected to the compositor or viewer outputs. That's because those sockets were wrongly added to the shader operation, even though they will not be used, which surpasses the limit for the maximum image units per shader.