completely restart wine / free memory or memory leak?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
arbor
Newbie
Newbie
Posts: 3
Joined: Mon Nov 11, 2013 8:24 am

completely restart wine / free memory or memory leak?

Post by arbor »

I play some Mod for Civilization 4 BTS with wine-1.4 on ubuntu. First it works great but after some time it crashes, gets slower and slower. If I restart the game, it's notable slower as if there would be still something around using my computer. Executing

Code: Select all

wineboot
does not help (tried all options). After rebooting ubuntu it's fine again.

Code: Select all

top
doesn't point me to anything using memory.

Civ uses libraries like msxml3 and msxml4, vcrun6 and d3dx9 (installed with winetricks).

So, what can I do to completely restart wine so I save the step of rebooting ubuntu? Or will this issue be caused by some memory leak or some other library?

Thanks a lot!
User avatar
dimesio
Moderator
Moderator
Posts: 13368
Joined: Tue Mar 25, 2008 10:30 pm

Re: completely restart wine / free memory or memory leak?

Post by dimesio »

Manually kill all running Wine processes after the crash.

FYI, your Wine version is old and no longer supported, and you have native dlls installed that are not needed. My suggestion is that you upgrade Wine to the current development release and reinstall Civ 4 to a clean wineprefix. Add only the native dlls that are actually needed. That may solve the crashing problem entirely.
arbor
Newbie
Newbie
Posts: 3
Joined: Mon Nov 11, 2013 8:24 am

Re: completely restart wine / free memory or memory leak?

Post by arbor »

Thanks a lot for your answer! I updated wine, changed the wineprefix and reinstalled Civ 4 only with required libraries. It seems to run slighly faster now but the basic problem remains - every crash makes the next start of the game slower.

A lot of crashes will be caused by the Mod that is still in development, vanilla Civ 4 works without problems. But crashes are not the point. How can I actually list all wine processes? After the crash "ps aux" or "top" doesn't show any other processes or any higher memory usage than before. So, I don't know where and how to search for this hidden process. I will test now "wineserver -k" instead of "wineboot" before restarting and report whether this helps.
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: completely restart wine / free memory or memory leak?

Post by oiaohm »

arbor I think I have a good idea about what is going wrong.

You are using kill -9 on a wine process are you not wine c:\\windows\\system32\\taskmgr.exe or wine c:\\windows\\system32\\taskkill.exe [wine internal pid]

Issue with be a confused internal emulated pid table in wine.

wineserver -k or use wine own internal methods to kill. Using Linux or OS X or other host options don't end well.

wineboot is a highly miss understood command.
http://wiki.winehq.org/wineboot

wineboot with no options does not kill any processes. If anything it starts processes. Yes some badly coded applications services running wineboot after wineboot will slow you system down because you end up with the 1 service running many times. This is why I recommend 1 application if possible per prefix.

"wineboot -e" followed by "wineboot -f" should be attempted. As this asks applications to quit cleanly is the -e option -f option then goes after those that don't. Yes they have to be run in order. -f flag only works on those applications that have been told to quit that have not quit yet. Yes you said you have attempted all options did you do these options in the exact order.

"wineboot -k" is close to "wineserver -k" in most case I find wineserver -k more dependable.
arbor
Newbie
Newbie
Posts: 3
Joined: Mon Nov 11, 2013 8:24 am

Re: completely restart wine / free memory or memory leak?

Post by arbor »

Thanks oiaohm for your answer! Of course, I tried the combination of "wineboot -e" then "wineboot -f" in this logical order. I also tried "wineserver -k" after these two but the problem persists. Please note, that I don't use "kill -9" anything, just Civ4 with the Mod crashes and the MS Windows-like looking crash report window appears where I can choose "Close" etc. It's bit anoying that I always have to move this window to another workspace to see it - is there actually a way minimalize fullscreen wine applications so that I don't have to select the crash window "blindly" to move it to another workspace by shortcuts so I can see it?

I guess that the crash, too, may confuse the wine internal emulated pid table. I tried another much, much more complex Mod that doesn't crash. Closing and restarting the game doesn't seem to slow down anything.
It's just worring for me not to understand/controll my computer anymore; some wine-internals that just persist whatever I do forcing me to restart ubuntu after some time (in other words bringing real Windows-feeling to Linux ;) ).
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: completely restart wine / free memory or memory leak?

Post by oiaohm »

arbor wineserver -k clears the wine pid table and takes out everything wine running from a particular prefix. So its not internal pid table issue in most cases if wineserver -k does not work.

of course wineboot and winserver are meant to be used with the right WINEPREFIX=[value] before them.

So this becomes what in ubuntu is not tolerating crashing applications. I have had pulseaudio and X11 be unhappy about crashing applications in some distributions.
Locked