Page 1 of 1
Stack overflow
Posted: Sat Mar 23, 2013 11:18 am
by Retwulf
Hi,
I'd like to try on creating my own dungeon, but have some issues regarding the installing process of the mods for new textures and other features.
I'm used to install mods for games like Skyrim, so I think I've got at least a few ideas about that matter. But still: when trying to open my custom dungeon where I've installed all the mods, I get a message saying: "could not open dungeon - stack overflow".
Well, though english is not my native language, I still have some idea of what it means. But regarding how works the software, I'm not sure to get it. So what's the problem?
Re: Stack overflow
Posted: Sat Mar 23, 2013 1:29 pm
by Neikun
Most mods on the nexus have a readme.
Maybe you could pick one specific mod, and we'll try to walk you through an installation.
Re: Stack overflow
Posted: Sat Mar 23, 2013 2:45 pm
by Marble Mouth
Hi Retwulf. I agree with Neikun that we could probably be more helpful with a more specific example.
FYI, stack overflow in lua most commonly occurs in "infinite" recursion scenarios, but not all "infinite" recursion results in stack overflow. Unfortunately, the deciding factor is a detail of the underlying lua implementation, so it might not make much sense to folks like us who just use lua as an embedded scripting language in another application (Grimrock.)
This code will generate a stack overflow error, which terminates the overflowing process and allows you to continue your session in the editor:
Code: Select all
overflow = function()
local x = 12
overflow()
return x
end
overflow()
This code will not generate a stack overflow error, but it will run indefinitely without returning control to the editor. This generally requires me to open task manager to kill my editor session, losing all unsaved work:
Code: Select all
overflow = function()
local x = 12
return overflow()
end
overflow()
In both cases, calling overflow will call overflow will call overflow... The critical difference is that in the first code, lua has to keep track of local x while it calls overflow recursively. Each call to overflow has its own copy of local x in a piece of memory called "the stack", and eventually these copies fill up and overflow the (finite) stack. In the second code example, lua realizes that it doesn't have to keep track of x during the recursive call, so it doesn't. This is called "proper tail calling" in lua jargon.
In conclusion, a "stack overflow" error points to a very specific kind of bug in the mod you're trying to load. More details about the mod, and which version of Grimrock you're running could help.
Re: Stack overflow
Posted: Sat Mar 23, 2013 3:38 pm
by msyblade
Couple of things to try, first, make sure you put the .dat file for a custom dungeon in the "Documents/Almost Human/Legend of Grimrock/dungeons" folder. 2nd Make sure you have patched to v1.3.7. most problems are caused by players not realizing they are running 1.3.1 and how many changes were made in the subsequent patches, specifically for modders. Features that ARE implemented in nearly every mod released since January. The .dat file that an entire custom dungeon is saved to and played from, is pretty much foolproof. If you have a .dat that you know other people are playing, but causes a stack overflow on your system, it is likely that you have the file placed in the wrong folder, or do not have the correct version of the game. (Again 1.3.7 is newest). Is it a dungeon you made? In that case it is likely you are not defining custom objects correctly, or in the right folder. Also, a simple capitalization error between a file and a definition can cause that error: script says altar.Model, but file is altar.model(lower case).If neither of these is causing your issue, we will need more specifics to help you, ie: No mods will work/Which mod are you having trouble with? where did you place the .dat file? What system are you running (GFX card etc.) you could also take a screenshot of the error (print screen key, goto paint, and paste (ctrl v), then save) and post it here, someone will definitely spot the issue causing trouble. Photobucket.com hosts pics for free, and u can use the "img" button on top of the typing box here, to paste the location of the pic.
Re: Stack overflow
Posted: Sat Mar 23, 2013 5:45 pm
by Retwulf
Ok, I get it. I first thought I might have just too many mods installed for a single dungeon and that the engine might not be designed for sustaining that...
So that's not it (and that's a relief... with all these awesome mods around).
This is not a problem of version. I'm properly updated for that matter.
Yes, I've observed before that some of the files had capitals while not others. I fear I haven't corrected everything. I'll doublecheck that. I'll create a new file as well, and try to install each mod one by one and testing each one as well (sorry, but enthousiasm made me skip that). If the problem persists, I'll let you know as well as for which specific mod. Thanks!