L3DT users' community
Large 3D terrain generator

Errors on Heightfield import merge

Got a problem or need advice?

Errors on Heightfield import merge

Postby Cassie_Sortin » Mon Jun 23, 2014 4:40 pm

Is there a limit to the size of the heightfield I import? I keep getting error when I import a large BT file.

Here is part of the error :

CSubMap::InitMap error - memory allocation failed

The operating system could not allocate 4MB of contiguous RAM.

System memory state:
WORK_SET = 3.602GB
AVAIL_VIRT = 146.875MB
AVAIL_PHYS = 2.541GB
TOTAL_PHYS = 7.961GB
COMMIT = 5.593GB
SYSLOAD = 68%

L3DT memory state:
MAP_RAM = 3.613GB
MAP_PAGED = 1.746GB

CMosaicMemTable::AllocTile error
- could not initialise map!

CMosaicMap::AllocTile error
- cannot init map in mem table

CMosaicMap::PrepareTile error
- cannot init sub map

CMosaicMap::SetPixel error
- cannot prepare tile

CMapWrap::SetPixelFast error:
- call to CMosaicMap::SetPixel failed

CMapWrap::SetPixel error:
- call to SetPixelFast failed for x18432y44032 in 28351x49163

L3DTio_BT::LoadMapFile error
- call to SetPixel failed

CMapGroup::HF_ImportFromFile error:
- call to LoadMapFile failed

I can send the entire log file if you wish.


**UPDATE** Am trying again with the update RC2 from you. Will respond with results.

****UPDATE**** No go on import. Am emailing you the log from RC2.

Will go back and slice map up, then try import and merge.

Thanks for fixing my other problem
Cassie
Cassie_Sortin
Member
 
Posts: 10
Joined: Sat Jun 14, 2014 12:37 pm

Re: Heightfield size limit

Postby Aaron » Tue Jun 24, 2014 11:43 am

Hi Cassie,

Thank you for the bug report! I've fixed it in RC3, which is on the downloads page now.

Best regards,
Aaron.

PS: That was a corker of a bug! Normally, L3DT periodically checks how much memory it is using and how much is available, and if things are getting a bit tight (~60% used), it will stop allocating new memory tiles and instead start re-using old tiles. This seems to work very well with the threaded calculations, and I spent a lot of time testing this under various memory loads. However, I had forgotten that when you load a map, the loading is done in the main application thread (instead of a calculation worker thread), which blocks the periodic memory checking that's done in the idle loop of the main thread. Consequently, when L3DT is loading map files it doesn't get around to checking whether it's about to run out of memory until it's too late. The fix was to also periodically call the memory state checking code in-line when requesting a new tile to be allocated. This seems to work as expected now.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Errors on Heightfield import merge

Postby Cassie_Sortin » Tue Jun 24, 2014 11:59 am

Ok, will get RC3 and give it another go. Will report back with results.

**UPDATE** Worked flawlessly. Beautiful work Aaron! Thanks for the hard work and standing behind your product.

Now off to build my Island.
Cassie_Sortin
Member
 
Posts: 10
Joined: Sat Jun 14, 2014 12:37 pm


Return to Help and support

Who is online

Users browsing this forum: No registered users and 66 guests