Closed ghost closed 9 years ago
An example of the folder structure would be: http://i.imgur.com/eFl9WsB.png Again though, I can not confirm the exact cause. Only that it crashes, and doesn't when I remove the folder structure. I only heard other people also had the same issue with the length of names. That's all.
edit: ignore the 'demos archive 2016'. It should be 'demos', I replaced it temporarily.
Update: was able to reproduce the issue by placing folders in folders like so: http://i.imgur.com/AVCvUWj.jpg
All .zip files and jk2 demos that were in the demos folder, did not make my game crash. Nor did weird long names (so far). But a couple of folders in folders did.
I had a quick look, and the issue is caused due to a stack overflow in UI_LoadDemosInDirectory
. It seems that after too many recursions, we run out of stack space :/ We should probably allocate some of the memory on the heap.
When I got a couple of folders with demos located (tested) in them and got some longer names (not tested but others experienced this), then openjk entirely crashes (freeze, standard windows error message) when you hit "play demo" in the main menu.
I worked around this by removing all folders in the demo folder. But it would be great if it could be looked at.