Upcoming Games

(UTC times)


Full list
Add a game

Upcoming Events

No events to display

Who's Online

kpl455, Hap, flabberdacks, whereszorro, 442s3, Person82, Cynx (7 users seen recently)

[Linux/Wine] Memory issues

You are here: Home > Forum > General > General questions, comments, and issues > [Linux/Wine] Memory issues

Page 1 of 1

Memory leak, affecting multiple simulations 07/10/2020 at 19:19 #132949
Albert
Avatar
1315 posts
As I said in this thread, I have encountered a memory leak in loader 5.x that still exists in 5.8.

I have reproduced it on York with the 2019 Winter TT but have also experienced it on Carlisle in previous loader versions.

When starting SimSig, the SimSigLoader.exe process is using about 210 MB of RAM. However, this increases by about 10 MB per minute (!) and once it hits 1,1GB after a few hours or so, some thing stop working: the timetable window is black, and saving the game shows an out of memory error. A screenshot is attached of this error.

I am using Linux with Wine 5.15. However in this post, Edgemaster said he'd also experienced it so it probably exists on Windows as well, hence I am reporting it anyway.


Post has attachments. Log in to view them.
AJP in games
Log in to reply
Memory leak, affecting multiple simulations 07/10/2020 at 19:27 #132950
headshot119
Avatar
4869 posts
Edgemaster uses Wine as well.

Have you got a reproduceable case?

"Passengers for New Lane, should be seated in the rear coach of the train " - Opinions are my own and not those of my employer
Last edited: 07/10/2020 at 19:29 by headshot119
Reason: None given

Log in to reply
Memory leak, affecting multiple simulations 07/10/2020 at 19:35 #132951
GeoffM
Avatar
6380 posts
Albert in post 132949 said:
When starting SimSig, the SimSigLoader.exe process is using about 210 MB of RAM.
That already sounds wrong. Using that sim, Loader, and TT I get 58Mb on start-up.

Albert in post 132949 said:
However, this increases by about 10 MB per minute (!) and once it hits 1,1GB after a few hours or so, some thing stop working: the timetable window is black, and saving the game shows an out of memory error. A screenshot is attached of this error.
While a little increase is to be expected due to logs, 10MB/min is way off the scale. I cannot reproduce this on Windows. I just asked a host of a multiplayer and he's only getting total memory usage in the 50-60MB range after a couple of hours playing.

Albert in post 132949 said:
I am using Linux with Wine 5.15. However in this post, Edgemaster said he'd also experienced it so it probably exists on Windows as well, hence I am reporting it anyway.
Karl is correct: Tom uses Linux as well.

SimSig Boss
Last edited: 07/10/2020 at 19:37 by GeoffM
Reason: None given

Log in to reply
Memory leak, affecting multiple simulations 07/10/2020 at 19:45 #132952
Albert
Avatar
1315 posts
I was not referring to a fresh start, but to loading a saved game. With a fresh start of this sim and TT, the memory usage is 170 MB.

In any case, I'll probably file a bug with Wine then once I get the time to find out whether this happened in older versions as well.

AJP in games
Log in to reply
Memory leak, affecting multiple simulations 07/10/2020 at 19:58 #132955
GeoffM
Avatar
6380 posts
Albert in post 132952 said:
I was not referring to a fresh start, but to loading a saved game. With a fresh start of this sim and TT, the memory usage is 170 MB.
That's still triple what I'm getting. However, ignoring increasing usage for the moment, it may be that Linux calculates its memory usage differently to Windows - eg does one include DLLs and the other not?

Albert in post 132952 said:
In any case, I'll probably file a bug with Wine then once I get the time to find out whether this happened in older versions as well.
If you find out where it is, please report back in case there is anything SimSig can do to guard against this.

SimSig Boss
Log in to reply
[Linux/Wine] Memory issues 07/10/2020 at 20:40 #132959
postal
Avatar
5269 posts
Just to confirm other comments, not seeing that memory hogging on 64-bit Windows 10 Home Edition.

Restarted a saved game from my current testing program and Task Manager showed memory as 83.5MB. Running with minimal configuration (Main Control Panel, Message Window, Main View, F2 and F4 opened as required then closed). Over 2 hours sim time (just over 1 hour real time) memory usage drifted slightly up to about 86MB and has dropped back to 82.9MB currently.

I must have spent several hundred hours testing Carlisle with previous versions of the loader on XP then W10 Home edition running on entry level kit (4GB memory for a good while) and never had any memory problems.

Looks like it is probably related to OS rather than SimSig.

“In life, there is always someone out there, who won’t like you, for whatever reason, don’t let the insecurities in their lives affect yours.” – Rashida Rowe
Log in to reply
[Linux/Wine] Memory issues 07/10/2020 at 21:18 #132960
Albert
Avatar
1315 posts
It appears to be related to the timetable window. Every time I open a train's timetable, memory usage goes up by about 3MB. Loading a page in the Simplifier, also an HTML viewer, does the same.

I have downgraded Wine to version 5.0.0 which was released in early 2020. I am pretty sure that I did not have such problems with the SimSig version that existed back then, so a change in SimSig did trigger this behaviour in Wine. Or at least, there were no crashes due to low memory at that time. Probably the new timetable window with Loader 5 made it worse.

(By the way, hosts of multiplayers might click much less timetables than a single player playing York.)

AJP in games
Last edited: 07/10/2020 at 21:30 by Albert
Reason: None given

Log in to reply
[Linux/Wine] Memory issues 07/10/2020 at 21:38 #132961
Edgemaster
Avatar
332 posts
Yes, I did see this in Wine also. I've only hit this once though, and haven't paid close attention to the memory usage at other times.
Twitter
Log in to reply
[Linux/Wine] Memory issues 07/10/2020 at 21:51 #132962
GeoffM
Avatar
6380 posts
Albert in post 132960 said:
Loading a page in the Simplifier, also an HTML viewer, does the same.
So it's the browser component - a component that has caused issues before.

SimSig Boss
Log in to reply
[Linux/Wine] Memory issues 08/10/2020 at 16:10 #132982
Albert
Avatar
1315 posts
Turns out that disabling multiple TT popup windows reduces memory usage a lot. Now it only increases by 1MB every time the window opens and a few hundred kB on refresh / click a different train without closing.
AJP in games
Log in to reply
The following user said thank you: DonRiver
[Linux/Wine] Memory issues 08/10/2020 at 17:46 #132983
GeoffM
Avatar
6380 posts
I think I mentioned this last time this component caused issues in WINE: I need to find a more lightweight browser component, obviously one that is less buggy.
SimSig Boss
Log in to reply