[32bit only] Bad allocation error crashes

Do you have this problem?

Yes
8
62%
No
5
38%
 
Total votes : 13

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

[32bit only] Bad allocation error crashes

by Fixerol » Sun Nov 15, 2015 17:20

I'm using latest Krock's build of minetest-0.4.13-4434498 (13 Nov 2015) 32bit + today's minetest_game on Windows 7 64bit, if I walk around long enough, usually 30-60 min, game memory usage will grow up to 1.6 GB and crash after that giving me those errors. I have 8 GB of RAM and view range is 180-240 nodes and scenery is very very rich with lots of different forests and mountains. In less crowded areas I have steady 800-1000mb memory usage and no crash.

If it is "low memory" crash... then why MT is not unloading blocks away to be within 32bit limits?
BTW, you can avoid this problem in a different ways:
1) use 64bit OS and 64bit build of minetest (default download anyway) -- best option
2) lower client_mapblock_limit in minetest.conf;

Example #1
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2015-11-15 18:32:16: ERROR[Emerge-0]: An unhandled exception occurred: bad allocation
2015-11-15 18:32:16: ERROR[Emerge-0]: In thread b7c:
2015-11-15 18:32:16: ERROR[Emerge-0]: ..\..\minetest\src\emerge.cpp:2c1: EmergeThread::run: A fatal error occured: bad allocation
2015-11-15 18:32:16: ERROR[Emerge-0]: Debug stacks:
2015-11-15 18:32:16: ERROR[Emerge-0]: DEBUG STACK FOR THREAD 604:
2015-11-15 18:32:16: ERROR[Emerge-0]: #0  UpdateThread::run
2015-11-15 18:32:16: ERROR[Emerge-0]: DEBUG STACK FOR THREAD b7c:
2015-11-15 18:32:16: ERROR[Emerge-0]: #0  EmergeThread::run
2015-11-15 18:32:16: ERROR[Emerge-0]: DEBUG STACK FOR THREAD 1344:
2015-11-15 18:32:16: ERROR[Emerge-0]: #0  UpdateThread::run
2015-11-15 18:32:16: ERROR[Emerge-0]: DEBUG STACK FOR THREAD 15a8:
2015-11-15 18:32:16: ERROR[Emerge-0]: #0  main
2015-11-15 18:32:16: ERROR[Emerge-0]: #1  ClientMap::renderMap
2015-11-15 18:32:16: ERROR[Emerge-0]: DEBUG STACK FOR THREAD 15cc:
2015-11-15 18:32:16: ERROR[Emerge-0]: #0  ServerThread::run
2015-11-15 18:32:16: ERROR[Emerge-0]: #1  Server::Receive

Example #2:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2015-11-15 19:11:54: ERROR[MeshUpdate]: An unhandled exception occurred: bad allocation
2015-11-15 19:11:54: ERROR[MeshUpdate]: In thread 1688:
2015-11-15 19:11:54: ERROR[MeshUpdate]: e:\programme\mt_compiler\minetest\src\util/thread.h:e2: UpdateThread::run: A fatal error occured: bad allocation
2015-11-15 19:11:54: ERROR[MeshUpdate]: Debug stacks:
2015-11-15 19:11:54: ERROR[MeshUpdate]: DEBUG STACK FOR THREAD 53c:
2015-11-15 19:11:54: ERROR[MeshUpdate]: #0  main
2015-11-15 19:11:54: ERROR[MeshUpdate]: #1  ClientMap::renderMap
2015-11-15 19:11:54: ERROR[MeshUpdate]: DEBUG STACK FOR THREAD 122c:
2015-11-15 19:11:54: ERROR[MeshUpdate]: #0  EmergeThread::run
2015-11-15 19:11:54: ERROR[MeshUpdate]: DEBUG STACK FOR THREAD 139c:
2015-11-15 19:11:54: ERROR[MeshUpdate]: #0  ServerThread::run
2015-11-15 19:11:54: ERROR[MeshUpdate]: #1  Server::Receive
2015-11-15 19:11:54: ERROR[MeshUpdate]: DEBUG STACK FOR THREAD 161c:
2015-11-15 19:11:54: ERROR[MeshUpdate]: #0  UpdateThread::run
2015-11-15 19:11:54: ERROR[MeshUpdate]: DEBUG STACK FOR THREAD 1688:
2015-11-15 19:11:54: ERROR[MeshUpdate]: #0  UpdateThread::run


On a side note, I test it on a very nice seed, with lots of forests and stuff, screenshot of the place:
Image
Last edited by Fixerol on Thu Feb 18, 2016 15:12, edited 2 times in total.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [0.4.13-dev] Bad allocation error crashes

by Sokomine » Thu Nov 19, 2015 21:54

I sometimes get crashes with my villages mod. In that regard, I do have the choice between shadow bugs (especially in the shell of mapchunks) and occasional crashes at mapgen time.
A list of my mods can be found here.
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

Re: [32bit only] Bad allocation error crashes

by Fixerol » Thu Feb 18, 2016 15:25

 

Robsoie
Member
 
Posts: 48
Joined: Fri Apr 29, 2016 16:22

Re: [32bit only] Bad allocation error crashes

by Robsoie » Fri Feb 03, 2017 17:02

Still noticing this when i explore a lot on my 32bits OS (and then version of Minetest, using latest Krock build for it, 170128 at that time ).

For testing purpose i generated a world with mgv7 , only minetest_game, no additional mods and in the minetest.conf :

map_generation_limit = 320
(default is 31000)
So it's still plenty big enough for exploring, but not big enough to be too big to see the end of it
And added
mg_biome_np_heat = 50, 50, (200, 200, 200), 5349, 3, 0.5, 2.0
mg_biome_np_humidity = 50, 50, (200, 200, 200), 842, 3, 0.5, 2.0
So biomes weren't big enough to fill the world with only a couple of them, making then exploration visually more varied and so less boring.

After a while of flying around that world
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
ACTION[Server]: singleplayer leaves game. List of players:
ERROR[Main]: Some exception: "bad allocation"
[Main]:  >> === FATAL ERROR ===
[Main]:  >> Access violation (Exception 0xC0000005) at 0x00AA34C9

oddly it meantions that singleplayer leaves game, despite i was flying over the terrain when suddenly the game freeze and crash.

So for more testing purpose, i then added in my minetest.conf
client_mapblock_limit = 100
(default is 5000)
Launched the game, re-explored that world and saw no visual difference (i was expecting to see less block, but it was exactly the same, certainly more than 100 in my screen) and after a long while of exploration : same freeze->crash and error in the log.

I am wondering if client_mapblock_limit actually does something ? Because i noticed visually absolutely no difference, after a very long exploration a minute before the crash i could press R to see max view distance and saw all the chunks of the world i had already explored, meaning there was surely (a whole lot) more than 100 blocks in my view (and so in memory).
 

DI3HARD139
Member
 
Posts: 144
Joined: Sat Oct 18, 2014 21:04
GitHub: DI3HARD139
IRC: DI3HARD139
In-game: DI3HARD139 DI3HARD139_

Re: [32bit only] Bad allocation error crashes

by DI3HARD139 » Mon Feb 20, 2017 21:12

Oh good. I thought I was the only one getting the random bad_alloc error. I run an x64 build from the main repo though.
Servers: mt.rrhgameservers.ml = [RRH] MT-Creative (48250), RRH-Survival (48253), Unknown (48255), Minetest City (48262)
Specs = Intel Core i5-3570s 16GB DDR3 2TB HDD, Ubuntu Server 16.04.1 x64 XFCE
------------------------------------------------------------
System: Lenovo Thinkstation S30 = Intel Xeon E5-2665, 20GB DDR3 (1333MHz Non-ECC), Gigabyte GTX1060 6GB, 3.5TB Storage, Win 10 Pro x64.
 

Robsoie
Member
 
Posts: 48
Joined: Fri Apr 29, 2016 16:22

Re: [32bit only] Bad allocation error crashes

by Robsoie » Mon Feb 27, 2017 22:29

It seems regardless of me setting a specific client_mapblock_limit in my minestest.conf it never made any visual difference, and so after long exploration the crash always happens.
And even if i set it to super low like client_mapblock_limit=100 , there was still no visual difference ingame i always could see much more than 100 blocks with my default view range (and way too much to count if i use the max view)

I noticed a possible reason, as everytime when exiting the game if i look into my minetest..conf file, the setting is automatically reset to client_mapblock_limit=5000 , regardless of the setting i set it up for it previously.

So i am starting to wonder is that 5000 value actually a hardcoded set with no way to change it in the minestest.conf with the game simply ignoring whatever value i set and always use 5000 ?
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 14 guests

cron