minetest-LOTR / Lord-of-the-Test

LOTR-inspired Subgame for Minetest. Rewrite: https://github.com/minetest-LOTR/Third-Age
Other
67 stars 31 forks source link

Game crashes on error. #122

Closed Xaleth closed 6 years ago

Xaleth commented 6 years ago

2017-11-05 10:34:01: ERROR[Main]: ServerError: AsyncErr: Lua: finishGenRuntime error from mod 'lottmapgen' in callback environment_OnGenerated(): ...games/Lord-of-the-Test/mods/lottmapgen/functions.lua:890: attempt to compare nil with number 2017-11-05 10:34:01: ERROR[Main]: stack traceback: 2017-11-05 10:34:01: ERROR[Main]: ...games/Lord-of-the-Test/mods/lottmapgen/functions.lua:890: in function 'lottmapgen_biomes' 2017-11-05 10:34:01: ERROR[Main]: ...test/games/Lord-of-the-Test/mods/lottmapgen/init.lua:221: in function '?' 2017-11-05 10:34:01: ERROR[Main]: ...30/Desktop/minetest/bin/../builtin/game/register.lua:412: in function <...30/Desktop/minetest/bin/../builtin/game/register.lua:392>

neinwhal commented 6 years ago

Can more information be provided? Are you able to recreate the crash using certain methods? Or does this crash just happens randomly?

Xaleth commented 6 years ago

This crash happens randomly whenever I'm flying around in a world. Any LOTT world.

Xaleth commented 6 years ago

I am using the latest 0.5.0-dev version of Minetest.

neinwhal commented 6 years ago

@NewbProgrammer101 does this issue still occur as of recently? Are you using windows? If so it might be due to issue 2988 of the minetest repo, there's some issues with LuaJIT erroring out due to a lack of memory (and with the mapgen taking up a chunk of memory too), despite not so.

Doloment commented 6 years ago

This crash is not bug of LOTR. Mapgen of MT taking too much of memory chunk. This problem solves by hosting local server with using ".bat" file (see https://wiki.minetest.net/Help:Setting_up_a_server).

neinwhal commented 6 years ago

As doloment said. It's a memory issue, particularly to do with luajit. This issue affects only windows users. Apart from the solution doloment provided above, you can compile a version with LJ_GC64 mode enabled, that removes luajit memory limit.

The main cause of this is really how intensive lottmapgen is, especially to do with the many structures and decorations. To fix this, the mapgen will either have to be rewritten or reduced heavily, something that won't happen to LOTT, but will happen in the rewrite version that we are currently working on now.

So closing this issue.