Either do as Hecks says, or simply truncate the filename.
As for the example you got from me, the filename was about 240 chars (as far as I remember). Have no clue why the person had uploaded such large filename, which I find rather stupid.
Anyway, as you could see on the screenshot, it would be nice with at least some "limit" on repeating the error - got huuuge logfiles, due to that ;-) + the crashing part