Page 1 of 1

ERROR[main]: Some exception: "std::bad_alloc"

PostPosted: Tue Dec 02, 2014 14:40
by HendriXXX
What does this mean? I have tested every client version there is and game always crash. Server side I have tested latest git and latest stable versions. Crash happend always after couple of minutes.

OS is windows xp 32bit with 2gb ram, ati radeon 7750, amd 2,7ghz x2. This is only game in this computer what crashes so I dont think my computer is the reason..

I have also tested direct3d9 and opengl but not working.. very frustrating.

Re: ERROR[main]: Some exception: "std::bad_alloc"

PostPosted: Tue Dec 02, 2014 15:34
by HendriXXX
Tested on my laptop with windows 7 and crash doesnt happend. Also tested couple of public servers with this xp machine and crash doesnt happend..
wtf, I dont get it..
my server is hosted vps. It should have enough power to run minetest server..

Re: ERROR[main]: Some exception: "std::bad_alloc"

PostPosted: Tue Dec 02, 2014 20:17
by Krock
Please try to update your graphics driver and re-try with OpenGL after a computer restart.
If that doesn't help, test direct3d8 (if available in the settings menu).

The reason for those crashes is mostly not enough memory. Maybe there's a problem with your graphics card.

Re: ERROR[main]: Some exception: "std::bad_alloc"

PostPosted: Wed Dec 03, 2014 13:15
by HendriXXX
Graphic driver already latest version. direct3d8 didnt help. I did play this game about a year ago and it did work fine then. Hardware is exactly same.

Re: ERROR[main]: Some exception: "std::bad_alloc"

PostPosted: Wed Dec 03, 2014 17:07
by Krock
HendriXXX wrote:Graphic driver already latest version. direct3d8 didnt help. I did play this game about a year ago and it did work fine then. Hardware is exactly same.

Are you using the stable or a in-developement version of 0.4.10?

If you are using the stable version, I recommend to try a in-dev build to see if the bug hasn't been fixed yet.

EDIT: Link to the in-dev builds

Re: ERROR[main]: Some exception: "std::bad_alloc"

PostPosted: Wed Dec 03, 2014 17:29
by HendriXXX
some progress archieved..

server 0.4.10 git or stable version => 0.4.10 client (git or stable) doesnt work but 0.4.9 stable works beautifully.

0.4.10 client versions lags, stutters and crashes after couple of minutes.
with 0.4.9 client opengl works fine, but direct3d9 renders everything red..

I reinstalled graphic drivers with compete sweep, tried older driver versions.. same results.

well, now i can at least play and test my server..

Re: ERROR[main]: Some exception: "std::bad_alloc"

PostPosted: Thu Dec 04, 2014 11:05
by HendriXXX
problem solved. installed lubuntu 14.04 on same computer, proprietary graphics driver, compiled latest git client and BAM! Now it works beautifully.. :)

Re: ERROR[main]: Some exception: "std::bad_alloc"

PostPosted: Sat Jul 22, 2017 09:43
by Lejo
I had the same Problem Serverside:
Code: Select all
2017-07-22 11:39:10: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'mesewars' in callback environment_Step(): std::bad_alloc
2017-07-22 11:39:10: ERROR[Main]: stack traceback:
2017-07-22 11:39:10: ERROR[Main]:       [C]: in function 'place_schematic'
2017-07-22 11:39:10: ERROR[Main]:       ...test/.minetest/games/mesewars/mods/mesewars/register.lua:201: in function 'start_game'
2017-07-22 11:39:10: ERROR[Main]:       ...test/.minetest/games/mesewars/mods/mesewars/register.lua:398: in function 'func'
2017-07-22 11:39:10: ERROR[Main]:       ...fBuNi/usr/bin/../share/minetest/builtin/common/after.lua:18: in function <...fBuNi/usr/bin/../share/minetest/builtin/common/after.lua:4>
2017-07-22 11:39:10: ERROR[Main]:       ...BuNi/usr/bin/../share/minetest/builtin/game/register.lua:412: in function <...BuNi/usr/bin/../share/minetest/builtin/game/register.lua:392>
2017-07-22 11:39:10: ERROR[Main]: stack traceback:

This always happens after a map creation on my Mesewars Server:
Code: Select all
schemp = minetest.setting_get_pos("schem_pos")
local param1 = "submese"
local schem = minetest.get_worldpath() .. "/schems/" .. param1 .. ".mts"
minetest.place_schematic(schemp, schem)


This is a new Problem, but I don't change anything at the creation code an it not always happens!

Re: ERROR[main]: Some exception: "std::bad_alloc"

PostPosted: Sun Jul 23, 2017 13:16
by Krock
Lejo, the gravedigger:
You probably don't have enough free RAM on the server. That's either an insane huge schematic file or the placement function isn't optimized/programmed well, so it consumes more memory than it should.