WineHQ
Bug Tracking Database – Bug 35256

 Bugzilla

 

Last modified: 2014-02-20 12:37:43 UTC  

Skyrim - "Not enough memory to run application" error

Bug 35256 - Skyrim - "Not enough memory to run application" error
Skyrim - "Not enough memory to run application" error
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: kernel32
1.7.8
x86-64 MacOS
: P2 normal
: ---
Assigned To: Mr. Bugs
: patch
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-12-28 05:30 UTC by mjf
Modified: 2014-02-20 12:37 UTC (History)
0 users

See Also:
Regression SHA1:
Fixed by SHA1: a34e52cc9374c56cce0bc47555c6390defbfe252
Distribution: ---
Staged patchset:


Attachments
Wine identifies 200MB out of 30GB of available userland memory (572 bytes, text/plain)
2013-12-28 05:30 UTC, mjf
Details
sample patch for kernel32/heap.c (1.02 KB, patch)
2013-12-28 05:30 UTC, mjf
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mjf 2013-12-28 05:30:00 UTC
Created attachment 47022 [details]
Wine identifies 200MB out of 30GB of available userland memory

Occasionally when attempting to run Skyrim (or other memory intensive programs) through Wine on OS X, a "Memory Error: Not enough memory to run application" popup will appear and the program will exit.

Simple workarounds: logging out and back in, rebooting.

I believe this is caused by GlobalMemoryStatusEx() in kernel32/heap.c returning wildly incorrect values (see the attached log for an example from a system with 32GB of memory - most of it available).

On OS X and BSDs, GlobalMemoryStatusEx() still gets the total system memory (ullTotalPhys) by asking sysctl() for the value of HW_PHYSMEM, which is capped at 2GB. The available system memory (ullAvailPhys) is determined by asking sysctl() for HW_USERMEM, which is also apparently 32-bit and overflows dreadfully. On OS X,  Wine temporarily stores both values in an unsigned int.

I recompiled kernel32.dll.so using HW_MEMSIZE in place of HW_PHYSMEM and a kludged value for ullAvailPhys; Skyrim now runs reliably. The example patch will also be attached for anyone who can reproduce this issue.
Comment 1 mjf 2013-12-28 05:30:44 UTC
Created attachment 47023 [details]
sample patch for kernel32/heap.c
Comment 2 Ken Sharp 2013-12-28 15:20:59 UTC
Patches aren't picked up here, please see http://wiki.winehq.org/SubmittingPatches

Thanks.
Comment 3 mjf 2013-12-29 01:43:13 UTC
The diff posted is intended as more of a diagnostic aid rather than an actual patch.

I suppose I could submit something more formal but I'd prefer to see someone else reproduce this problem first.
Comment 6 Alexandre Julliard 2014-02-20 12:37:43 UTC
Closing bugs fixed in 1.7.13.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers