There is a limit, but you should get an error message when it is reached. But when using object definitions in the code, such as images or sounds, the files are loading at compile time - so that also points towards a damaged file. You could temporarily replace all files by dummys and check if this solves the problem.