Game crashes with large map when saving

Bug #979995 reported by Patrick H.
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

I have made a large map ( the largest size possible). Unfortunately the map seems unplayable because the game crashes randomly when saving. I don't get any error msgs the game just quits to desktop. This happens both when you are saving manually and autosave. I also noticed that the saving procedure takes quite a while each time. Around 20 seconds, and I'm using a computer that can handle BF3 on high so the computer is not the issue.

I am using build17rc2. I can upload the map if needed, however I think the save files are corrupt because they no longer show up in the load menu.

Tags: crash editor
Revision history for this message
wl-zocker (wl-zocker) wrote :

How many things did you place on your map?

I have also tried it out and made the largest possible map and saved: about 1 second.
Then I put loads of bobs, immovables, different terrain types and ressources on it. Save time: 8 seconds

Do I have to place even more things on it? I attach the map so that you can see it. Try to save it. If not, you can put some more things on it.

tags: added: crash editor
Revision history for this message
SirVer (sirver) wrote : Re: [Bug 979995] Re: Game crashes with large map when saving

It is quite likely that you are simply running out of memory while
saving. You need easily 6-8 gigs for such big maps.

Revision history for this message
Patrick H. (daggeteo) wrote :

wl-zocker:
I place quite a lot of things. Should I remove all the bob?

Sirver:
Are we talking ram memory or harddrive?

What should my course of action be to fix the map? I put down a lot of work and I don't want it do be in vain.

Thanks!

Revision history for this message
Patrick H. (daggeteo) wrote :

I have tried removing all the bob, a lot of the trees and a lot of water resources. Still saving takes a looong time (if it even works) and loading the same.

I'm attaching the map. I would appreciate if someone could just give it a go so I know whether or not it is my computer.

Sirver: I'm using the gadgets for win 7 which monitors both the ram memory and the system drive memory. I noticed that neither hits any limit as to the memory available.

Revision history for this message
SirVer (sirver) wrote :

>Sirver: I'm using the gadgets for win 7 which monitors both the ram
>memory and the system drive memory. I noticed that neither hits any
>limit as to the memory available.
I am unsure about the specifics - but I *think* Tinos builds are 32 bit
which IMHO means that widelands can only address up to 2Gigs of RAM. If
you hit this limit it makes no difference if you still have physical RAM
left. Are you close to that?

Revision history for this message
Patrick H. (daggeteo) wrote :

Unfortunaly I haven't been looking at the individual memory for widelands. Ill make sure to look at it next time. Gonna give it a go in a while.

Revision history for this message
Patrick H. (daggeteo) wrote :

Tried playing again..

When the map was loaded and the game was on the workmemory (according to windows taskmanager) was around 1.6 GB. It did not exceed this at any point while saving. The actual value was around 1 700 000 kB.

Would this be the issue then?

Revision history for this message
SirVer (sirver) wrote :

I can't say as I am no windows expert. It could be that windows reserves
some additional memory for itself and therefore it could be a problem.
But I can't say if this is the issue here.

Revision history for this message
Patrick H. (daggeteo) wrote :

I've got 8gigs of ram and even with the 1.7 GB of WL I'm still not getting close to 100%.

Should I remove mountains or even islands?

Revision history for this message
David Allwicher (aber) wrote :

This assumes you use windows:

The Point here is, the user-mode virtual address space for each 32-bit process is 2GiB and if I remember correctly this might also include video memory. So it might be possible to hit that limit, before you actually use 2GiB of your main memory.

If you use a 64-bit application this limit is no longer 2GiB, but 8192GiB. So you should really test your map using a version of widelands which was compiled for x86_64.

Revision history for this message
SirVer (sirver) wrote :

Thats my Point. Afaik Tunis builds (and therefore the official win builds) are 32 bit.

Revision history for this message
Patrick H. (daggeteo) wrote :

Okay I see.

So the only way to try out a 64 bit version is by compiling it myself? Seems difficult but I might give it a go when I have time.

Revision history for this message
Patrick H. (daggeteo) wrote :

I have reduced the map by more than half of the islands and players. Still the game takes around 1.2 GB ram when playing and the saving time (if it works) takes around a minute or two. When I wrote 20 seconds I was wrong...

It takes that long even when I save when the game just started, ie barely any buildings or roads built.

Revision history for this message
SirVer (sirver) wrote :

You can also try to persuade Tino to (also) provide 64 bit builds.

I do not know what takes so long while saving, but it is a complicated
process - so it does not surprise me. There is plenty of low hanging
fruits for optimization in this part of widelands.

Revision history for this message
Patrick H. (daggeteo) wrote :

I found this thread (http://wl.widelands.org/forum/topic/1038/) in the forum and suggested that the TO should post here, but I took the liberty to post a link to the thread.

It seems he is having the same problem. Is the problem with playing large maps limited to windows? Or is it a general problem?

Revision history for this message
Nasenbaer (nasenbaer) wrote :

I don't know if this is limited to Windows, but the largest map I ever created and played to the end was a 192x192 map and it took more than 20 hours to finish (4 human players in 2 teams).

So the bug is of course still valid, but it simply occurs up to never, as a 500x500 map can't be finished within years ;)

Revision history for this message
Patrick H. (daggeteo) wrote :

Although not an elegant solution one workaround would be not allow creation of such maps. Especially since like you say, a map of that size would take a long time.

Revision history for this message
SirVer (sirver) wrote :

I can load and save 512x512 maps on my Mac OS computers without problems - it just takes a while to save.

Revision history for this message
Patrick H. (daggeteo) wrote :

#18
That being the case then limiting the size is not a good idea...

Can I provide any additional info to figure out this issue?

Revision history for this message
cghislai (charlyghislain) wrote :

#15 Your map loaded, saved and reloaded fine on my old 24GB ram laptop under linux.

Revision history for this message
cghislai (charlyghislain) wrote :

I meant 4GB

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
Revision history for this message
SirVer (sirver) wrote :

Since this bug was created we switched to building with large memory support for 32bit binaries and maybe even 64 bit binaries for windows, so this should be fixed.

Changed in widelands:
status: Expired → Fix Committed
milestone: none → build19-rc1
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.