WineHQ
Bug Tracking Database – Bug 10844

 Bugzilla

 

Last modified: 2013-12-20 12:43:08 UTC  

Need for Speed 2 demo fails on startup, claiming "insufficient memory"

Bug 10844 - Need for Speed 2 demo fails on startup, claiming "insufficient memory"
Need for Speed 2 demo fails on startup, claiming "insufficient memory"
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: kernel32
0.9.51.
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
http://www.gamershell.com/download_43...
: download
: 12315 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-12-20 23:28 UTC by Jeff Zaroyko
Modified: 2013-12-20 12:43 UTC (History)
7 users (show)

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


Attachments
WINEDEBUG=warn+all gzipped text output (2.03 KB, application/octet-stream)
2007-12-20 23:28 UTC, Jeff Zaroyko
Details
Patch 1/2 -- please test (2.38 KB, patch)
2011-05-23 09:26 UTC, Adam Martinson
Details | Diff
Patch 2/2 -- please test (1.78 KB, patch)
2011-05-23 09:26 UTC, Adam Martinson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Zaroyko 2007-12-20 23:28:08 UTC
Created attachment 9730 [details]
WINEDEBUG=warn+all gzipped text output

Upon trying to start nfsw.exe (Need for Speed II), a dialog is shown with the title "Abort message:", with a message of: "init mem - INSUFFICIENT MEMORY TO CONTINUE FILE win\initmem.c LINE 242"

winecfg has the winever set to Windows 95, my system has over 600MB free physical memory and 3GB of swap.

According to the appdb entry http://appdb.winehq.org/objectManager.php?sClass=version&iId=2693 this program has been working before.
Comment 1 Jeff Zaroyko 2007-12-20 23:39:35 UTC
on a seemingly related note, an older game targeted at Windows 95, 'Need for Speed', the installer aborts with a message saying:

"Sorry, you need 495489k more memory to run this program.  Please refer to the reference card on how to free more memory."

Both programs, Need for Speed 2 and the installer for Need for Speed (1), are not determining correct memory availability?
Comment 2 Jeff Zaroyko 2007-12-21 00:04:52 UTC
To reproduce the issue, the demo version is obtainable from here
http://files.filefront.com/nfs2demoexe/;3978828;/fileinfo.html

16MB in size
Comment 3 Lei Zhang 2007-12-21 11:29:34 UTC
Can you try with an older version of wine that was reported successful on appdb?

I got this problem on my computer as well. This may be related to bug 7546.
Comment 4 Jeff Zaroyko 2007-12-21 21:33:04 UTC
Using Need for Speed II demo

Tested wine-0.9.46 - OK
Tested wine-0.9.47 - OK
Tested wine-0.9.48 - Failure - program gives insufficient memory message

Comment 5 Lei Zhang 2007-12-21 22:12:36 UTC
Can you try with wine-git or wait for wine 0.9.52? Alexandre put in a fix today:

http://source.winehq.org/git/wine.git/?a=commit;h=16aadb2785600cc73cfe705a3a64e0315b14d99c
Comment 6 Jeff Zaroyko 2007-12-22 02:51:21 UTC
(In reply to comment #5)
> Can you try with wine-git or wait for wine 0.9.52? Alexandre put in a fix
> today:
> 
> http://source.winehq.org/git/wine.git/?a=commit;h=16aadb2785600cc73cfe705a3a64e0315b14d99c
> 

Tested with wine-0.9.51-190-g16aadb2 - bug appears to be fixed

Thanks
Comment 7 Jeff Zaroyko 2007-12-30 00:35:12 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Can you try with wine-git or wait for wine 0.9.52? Alexandre put in a fix
> > today:
> > 
> > http://source.winehq.org/git/wine.git/?a=commit;h=16aadb2785600cc73cfe705a3a64e0315b14d99c
> > 
> 
> Tested with wine-0.9.51-190-g16aadb2 - bug appears to be fixed
> 
> Thanks
> 

Sorry, it appears that I did not investigate the exact details of this error.

Unfortunately, the subsystem version for these affected programs is 4, where the fix is for subsystem versions less than 4.

I think the cause for my mistake is different memory utilization on my system at the time of testing with wine-0.9.51-190-g16aadb2, which means that I still have a program, Need for Speed II which is refusing to run under some conditions.

What I probably should have done initially is disassembled or at least looked at the disassembly from the affected programs to determine the exact cause of the bug.  I'll be sure to do this next time before reporting the bug to avoid this happening again.

So, after sifting through some assembly for Need for Speed II's nfsw.exe, I have formed the opinion that the value of the AvailPageFile member of the struct filled in by GlobalMemoryStatus is compared with the value 00A0000 (find this by breaking at 0x0047F87b in the retail version) and as a result of this, the program jumps to a path of execution which results in the programs error message being displayed.

I think that these programmers were not expecting such large values as e3d43000, and there is some signed vs unsigned mishandling of this number by the program.

I'll attempt to verify if the above is the same in the demo version and the other affected program I have and post an additional comment to confirm.

Once again, sorry if this has caused any inconvenience.

trace:heap:GlobalMemoryStatusEx <-- LPMEMORYSTATUSEX: dwLength 64, dwMemoryLoad 31, ullTotalPhys 3f35d000, ullAvailPhys 2b006000, ullTotalPageFile f809a000, ullAvailPageFile e3d43000, ullTotalVirtual 7ffdffff, ullAvailVirtual 7ffcffff
trace:heap:GlobalMemoryStatus Length 32, MemoryLoad 31, TotalPhys 3f35d000, AvailPhys 2b006000, TotalPageFile f809a000, AvailPageFile e3d43000, TotalVirtual 7ffdffff, AvailVirtual 7ffcffff




Comment 8 Jeff Zaroyko 2007-12-30 07:05:12 UTC
I have confirmed the following:

the subsystem version on the earlier affected program 'Need for Speed SE' nfs.exe has a subsystem version of 3 - so this is working correctly in 0.9.52 with regards to GlobalMemoryStatus.


the subsystem version on the demo release of 'Need for Speed II' also has a subsystem version of 3, which means this is also working with 0.9.52

In summary, the remaining broken app is 'Need for Speed II' retail, nfsw.exe which  has a subsystem version of 4 - so it is not working with 0.9.52.
Comment 9 Tobias Jakobi 2008-03-31 19:02:51 UTC
*** Bug 12315 has been marked as a duplicate of this bug. ***
Comment 10 Carlo Pinciroli 2008-07-21 13:21:18 UTC
I tried FIFA98 retail with Wine 1.1.1 and I have the same exact problem.
Comment 11 Jeff Zaroyko 2008-10-22 05:43:32 UTC
(In reply to comment #10)
> I tried FIFA98 retail with Wine 1.1.1 and I have the same exact problem.
> 

If you want to check that this is the exact same problem or as a workaround, I put together a small program which will change the MajorSubsystemVersion value in the header to 3.   

To use it, cd to the install directory of your program, then assuming the main executable is called fifa98.exe do:
`wget http://jeffz.name/code/pe.exe  && wine pe fifa98.exe`

source code can be found at http://jeffz.name/code/pe.c 
Comment 12 Marian Kyral 2009-01-16 05:39:45 UTC
Hi,
During the installation of Oracle Developer suite 10g I got the error:

"Install has encountered an error while attempting to verify your virtual memory settings. Please verify that the sum of the initial sizes of the paging files is at least 256 MB."

The pe.exe program did not help as the setup.exe launch java installer :-(

14336 ?        Ssl    0:10 C:\windows\temp\OraInstall2009-01-16_12-15-25PM\jre\1.4.2\bin\javaw.exe -Doracle.installer.library_loc=C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\lib\win32 -Doracle.installer.oui_loc=C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui -Doracle.installer.bootstrap=TRUE -Doracle.installer.startup_location=K:\tmp\oracle\install -Doracle.installer.jre_loc=C:\windows\temp\OraInstall2009-01-16_12-15-25PM\jre\1.4.2 -Doracle.installer.exec_location=K:\tmp\oracle\install\setup.exe -Doracle.installer.nlsEnabled=TRUE -Doracle.installer.prereqConfigLoc= -Dsun.java2d.noddraw=true -Dsun.awt.nopixfmt=true -mx160m -cp C:\windows\temp\OraInstall2009-01-16_12-15-25PM;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\OraInstaller.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\oneclick.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\xmlparserv2.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\srvm.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\share.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\OraInstallerNet.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\InstImages.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\InstHelp.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\oracle_ice.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\help4.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\help4-nls.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\ewt3.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\ewt3-swingaccess.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\ewt3-nls.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\swingaccess.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\classes12.jar;\;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\prereq.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\jewt4.jar;C:\windows\temp\OraInstall2009-01-16_12-15-25PM\oui\jlib\jewt4-nls.jar oracle.sysman.oii.oiic.OiicInstaller -scratchPath C:\windows\temp\OraInstall2009-01-16_12-15-25PM -sourceLocK:\tmp\oracle\install\../stage/products.xml -sourceType network -timestamp 2009-01-16_12-15-25PM SHOW_CUSTOM_TREE_PAGE=false CLUSTER_NODES={} -IgnoreSysPrereqs

There is a linux version of Oracle developer suite, but it is crappy and there is a lot of bugs and I was not able to install it :-(
Comment 13 Jeff Zaroyko 2009-01-16 05:50:47 UTC
(In reply to comment #12)
> Hi,
> During the installation of Oracle Developer suite 10g I got the error:
> 
> "Install has encountered an error while attempting to verify your virtual
> memory settings. Please verify that the sum of the initial sizes of the paging
> files is at least 256 MB."
> 
> The pe.exe program did not help as the setup.exe launch java installer :-(
> 

ugh... don't paste large amounts of text, it just makes the bug report harder to read.

did you try using pe.exe on javaw.exe?
Comment 14 Marian Kyral 2009-01-16 07:32:10 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > Hi,
> > During the installation of Oracle Developer suite 10g I got the error:
> > 
> > "Install has encountered an error while attempting to verify your virtual
> > memory settings. Please verify that the sum of the initial sizes of the paging
> > files is at least 256 MB."
> > 
> > The pe.exe program did not help as the setup.exe launch java installer :-(
> > 
> 
> ugh... don't paste large amounts of text, it just makes the bug report harder
> to read.
> 

Sorry.

> did you try using pe.exe on javaw.exe?
> 

Not yet. It is packed somewhere, setup.exe always unpack it to temporary directory and run the java installer. 

One option is to make a snapshot of the unpacked directory and then try to start the java installer - the long command above.

Second option is to find the package, unpack, change the javaw.exe, pack again and hope there is no integrity check.

I started with first option, but without luck yet.
Comment 15 Marian Kyral 2009-01-20 00:41:15 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #12)
> > did you try using pe.exe on javaw.exe?
> > 
> 

So I patched javaw.exe, but doesn't help

[07:09:01 marian@nbmkyral oracle]$ wine pe.exe  bin/javaw.exe
err:process:__wine_kernel_init boot event wait timed out
found 45163 filesize
Existing MajorSubsystemVersion: 4
Done!

Then I patched all *.exe binaries in the java/bin directory, but still doesn't work :-(
Comment 16 Wylda 2009-05-31 14:55:02 UTC
Hi Jeff again,

i have same problem like Marian Kyral with NFS2 SE even with pe.exe

$ wine pe.exe nfs2sen.exe
found 900096 filesize
Existing MajorSubsystemVersion: 3
Done!

That's all i get if i want to run NFS2 SE under wine 1.1.22.
Comment 17 Austin English 2010-01-04 12:16:47 UTC
This is your friendly reminder that there has been no bug activity for 6
months. Is this still an issue in current (1.1.35 or newer) wine?
Comment 18 Marian Kyral 2010-01-04 13:35:20 UTC
(In reply to comment #17)
> This is your friendly reminder that there has been no bug activity for 6
> months. Is this still an issue in current (1.1.35 or newer) wine?

I'll try if I find install files. To pass the issue I did the installation on windows and then copied files and records in registry. And work till now.
Comment 19 Marian Kyral 2010-01-05 14:29:24 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > This is your friendly reminder that there has been no bug activity for 6
> > months. Is this still an issue in current (1.1.35 or newer) wine?
> 
> I'll try if I find install files. To pass the issue I did the installation on
> windows and then copied files and records in registry. And work till now.

I tested with wine-1.1.35. Still not install and request at least 256MB. But I have 3GB system swap space.

$ free -m
             total       used       free     shared    buffers     cached
Mem:          1936       1748        187          0         59        770
-/+ buffers/cache:        919       1016
Swap:         3906          7       3898
Comment 20 Austin English 2011-03-29 19:30:12 UTC
This is your friendly reminder that there has been no bug activity for 6 months. Is this still an issue in current (1.3.16 or newer) wine?
Comment 21 Adam Martinson 2011-05-23 09:26:07 UTC
Created attachment 34871 [details]
Patch 1/2 -- please test
Comment 22 Adam Martinson 2011-05-23 09:26:53 UTC
Created attachment 34872 [details]
Patch 2/2 -- please test

Try these out, I think this should fix it.
Comment 23 Austin English 2013-11-13 16:50:12 UTC
This is your friendly reminder that there has been no bug activity for 2 years. Is this still an issue in current (1.7.6 or newer) wine? If so, please attach the terminal output in 1.7.6 (see http://wiki.winehq.org/FAQ#get_log).
Comment 24 Anastasius Focht 2013-12-12 12:08:46 UTC
Hello folks,

can't reproduce with original NFS II demo.

--- snip ---
$ WINEDEBUG=+globalmem wine ./nfsw.exe 
trace:globalmem:GlobalMemoryStatusEx <-- LPMEMORYSTATUSEX: dwLength 64, dwMemoryLoad 15, ullTotalPhys 1f27aa000, ullAvailPhys 1a605e000, ullTotalPageFile 3cf30e000, ullAvailPageFile 37bf24000, ullTotalVirtual 7ffdffff, ullAvailVirtual 7ffcffff
trace:globalmem:GlobalMemoryStatus Length 32, MemoryLoad 15, TotalPhys 7fffffff, AvailPhys 7fffffff, TotalPageFile 7fffffff, AvailPageFile 7fffffff, TotalVirtual 7ffdffff, AvailVirtual 7ffcffff
trace:globalmem:GlobalMemoryStatus Length 32, MemoryLoad 15, TotalPhys 7fffffff, AvailPhys 7fffffff, TotalPageFile 7fffffff, AvailPageFile 7fffffff, TotalVirtual 7ffdffff, AvailVirtual 7ffcffff
fixme:win:EnumDisplayDevicesW ((null),0,0x116ddc0,0x00000000), stub!
...
--- snip ---

$ sha1sum nfs2demo.exe 
3618d9c4070794e5cee4629a85c5e874e006db84  nfs2demo.exe

$ du -sh nfs2demo.exe 
17M	nfs2demo.exe

$ wine --version
wine-1.7.8-172-ga63222e

Regards
Comment 25 Alexandre Julliard 2013-12-20 12:43:08 UTC
Closing bugs fixed in 1.7.9.


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

Hosted By CodeWeavers