It became too big for the stack, causing segmentation faults. Also fix this for the samples and tests.