Latest Posts

Topic: Memory problem build20

minero
Avatar
Joined: 2020-05-01, 11:36
Posts: 16
Ranking
Pry about Widelands
Location: Germany
Posted at: 2020-05-01, 12:06

Hi,

I play the Frisian campaign "From Water to Ice". The game crash after I defeated the Babarian and get the new mission (conquer all fields of the empire). After that I look at dmesg and see that is a out of memory problem. I look for the problem and see with htop/top that widelands allocate huge (20 TB) of virtual memory.

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                       
 3605             20   0   20,0t 184388  42588 S   7,7   2,3   0:00.73 widelands   

I use build20 self compiled from source. Is this problem known?

Thanks and best,

minero


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 829
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-01, 12:15

Moin minero and welcome to the forums face-smile.png

The problem is known and was already fixed in the current development version.


Top Quote
minero
Avatar
Joined: 2020-05-01, 11:36
Posts: 16
Ranking
Pry about Widelands
Location: Germany
Posted at: 2020-05-01, 13:13

Thanks for the quick answer and campaigns. I will patch and test it in the evening. But that is not the reason of the huge virtual memory?


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1857
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-05-01, 13:23

Isn't this the same issue as for the Atlantean mission?


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 829
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-01, 13:36

No, the Atl-like one happens sometimes in fri01. this here is referring to fri02 where it was just forgotten to add some sleep time in loops to give the garbage collector time to free the allocated memory.


Top Quote
minero
Avatar
Joined: 2020-05-01, 11:36
Posts: 16
Ranking
Pry about Widelands
Location: Germany
Posted at: 2020-05-01, 20:48

Ok. I change

data/campaigns/fri02.wmf/scripting/mission_thread.lua

and added the line

sleep(1000)

but this not solve the problem. face-sad.png What I wonder about is that Widelands occupies 20 TB virtual ram directly after it is started. No game is loaded, it's only the main menu. Have other linux players the same effect?

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                       
 5707              20   0   20,0t 189900  42304 S  13,3   2,4   0:00.89 widelands
                            ^^^^^  

With the release 19 from the debian 10 distribution at the same system I haven't this problem.

I will clone the development version and try it with upcoming version.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 829
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-01, 20:52

There are two places where you need to add the sleep(). Unfortunately due to some Lua implementation detail the old (buggy) state is stored in the savegame so you will need to restart the scenario from the beginning for the change to take effect face-sad.png


Top Quote
minero
Avatar
Joined: 2020-05-01, 11:36
Posts: 16
Ranking
Pry about Widelands
Location: Germany
Posted at: 2020-05-01, 21:02

Ooohhh nnnooo. face-sad.png It was a hard way to come to this point. face-smile.png


Top Quote
Lawrence
Avatar
Joined: 2020-05-01, 02:20
Posts: 2
Ranking
Just found this site
Posted at: 2020-05-02, 12:03

I just read the posts in this conversation. I am not sure if my problem is covered by the things you have mentioned. I am playing build 20 on Windows 7. At random time periods everything starts to flicker multi colours. I save my game and exit Widelands completely. When I re-load the game the problem is not there but often returns again a few minutes later. I am sure you would have fixed this in a later release.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 829
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-02, 19:45

Lawrence wrote:

I just read the posts in this conversation. I am not sure if my problem is covered by the things you have mentioned. I am playing build 20 on Windows 7. At random time periods everything starts to flicker multi colours. I save my game and exit Widelands completely. When I re-load the game the problem is not there but often returns again a few minutes later. I am sure you would have fixed this in a later release.

Moin Lawrence and welcome to the forums face-smile.png

This sounds like a different bug. My first guess would be that your driver does not like OpenGL. Can you please provide the Widelands standard output with the graphics report (see https://www.widelands.org/wiki/Technical%20FAQ/#how-do-i-get-log-output-in-windows-for-debugging) and optionally a screenshot of the issue?


Top Quote