http://bugs.winehq.org/show_bug.cgi?id=19494
Summary: old apps don't run because of too much memory Product: Wine Version: unspecified Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: jb999@gmx.de
Old programs like the write.exe from Windows 3.1 do not run if there is too much memory available - see http://support.microsoft.com/?scid=kb;en-us;253912 for a detailed description. The method to limit memory mentioned there doesn't work with wine. What's missing is a possibilty to give an application less memory to work with.
http://bugs.winehq.org/show_bug.cgi?id=19494
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #1 from Dan Kegel dank@kegel.com 2010-04-24 11:14:12 --- It shouldn't be too hard to add a configuration setting for "limit win16 apps to XXX KB RAM", or whatever...
http://bugs.winehq.org/show_bug.cgi?id=19494
--- Comment #2 from jbrown jb999@gmx.de 2010-04-30 12:10:41 --- If only someone who knows how memory assignment is done whould be so kind...
(I can't even figure out the relevant source file.)
http://bugs.winehq.org/show_bug.cgi?id=19494
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |win16 Severity|normal |enhancement
--- Comment #3 from Austin English austinenglish@gmail.com 2012-03-19 14:21:29 CDT --- Still present.
http://bugs.winehq.org/show_bug.cgi?id=19494
J funkysea@gmx.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |funkysea@gmx.com
--- Comment #4 from J funkysea@gmx.com 2013-08-06 14:04:34 CDT --- As a (very ugly) workaround, you may allocate most of your system memory in order to keep only a small amount. I applied this method with success for Entomorph (an old game suffering from this bug, see http://appdb.winehq.org/objectManager.php?sClass=version&iId=25521 ). Here is a link to a program doing this (with the code source in C and compiled versions for 32 and 64 bits): http://funkysea.com/?p=114
I hope this is useful for someone, but it is also only a quick and dirty hack: a better solution would be to have an option to reduce the total available memory in wine.
https://bugs.winehq.org/show_bug.cgi?id=19494
--- Comment #5 from Austin English austinenglish@gmail.com --- Still in 1.7.36.
https://bugs.winehq.org/show_bug.cgi?id=19494
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 50814 --> https://bugs.winehq.org/attachment.cgi?id=50814 Windows 3.11 apps in Wine 1.7.37
Unfortunately I can't reproduce, added a screenshot of some Windows 3.11 apps. My computer has 4Gb of RAM. How do you reproduce this? I certainly have over 2Gb of free RAM.
https://bugs.winehq.org/show_bug.cgi?id=19494
--- Comment #7 from jbrown jb999@gmx.de --- Still in recent 1.7.42.
Bruno Jesus, I'd really like to know how you managed to get the Windows 3.1 write.exe to run.
https://bugs.winehq.org/show_bug.cgi?id=19494
--- Comment #8 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to jbrown from comment #7)
Bruno Jesus, I'd really like to know how you managed to get the Windows 3.1 write.exe to run.
No idea, I used a clean prefix with wine 32 bits. I'm not at home now so I can't give details about the kernel I'm running.
https://bugs.winehq.org/show_bug.cgi?id=19494
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.winehq.org/show | |_bug.cgi?id=18379
https://bugs.winehq.org/show_bug.cgi?id=19494
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|old apps don't run because |Add an option to report |of too much memory |less available memory
https://bugs.winehq.org/show_bug.cgi?id=19494
--- Comment #9 from Bruno Jesus 00cpxxx@gmail.com --- Maybe this patch could have helped? http://source.winehq.org/git/wine.git/commitdiff/5468e37508661ab0740f0066f9e...
https://bugs.winehq.org/show_bug.cgi?id=19494
--- Comment #10 from jbrown jb999@gmx.de --- Still in 1.8.
https://bugs.winehq.org/show_bug.cgi?id=19494
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=19494
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.1.26 Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED Summary|Add an option to report |Windows 3.1 'WRITE.EXE' |less available memory |fails to start, reports | |"Not enough memory for | |Write to complete this | |operation." (apps must be | |installed and run from | |within the WINEPREFIX, | |drive 'C:') CC| |focht@gmx.net
--- Comment #11 from Anastasius Focht focht@gmx.net --- Hello folks,
the reason this bug was created for is invalid.
I found Windows 3.1 disk images from some Internet archive and extracted the Win16 executable 'WRITE.EXE' (and .HLP) using 'msexpand'.
Reproducing the error by running 'WRITE.EXE' from '~/Downloads' directory:
--- snip --- $ WINEDEBUG=+seh,+relay,+int21 wine ./WRITE.EXE >>log.txt 2>&1 ... 0031:Call KERNEL.97: GETTEMPFILENAME(1400,1466028d "WRI",0000,1467:61f6) ret=123f:0f91 ds=1466 0031:Call KERNEL32.GetCurrentDirectoryA(00000104,0068e2a4) ret=7e86811f 0031:Ret KERNEL32.GetCurrentDirectoryA() retval=00000017 ret=7e86811f 0031:Call KERNEL32.GetTempPathA(00000104,0068e2a4) ret=7e868204 0031:Ret KERNEL32.GetTempPathA() retval=00000014 ret=7e868204 0031:Call ntdll.RtlAllocateHeap(00110000,00000000,00000005) ret=7e868239 0031:Ret ntdll.RtlAllocateHeap() retval=0017d858 ret=7e868239 0031:Call KERNEL32.GetTempFileNameA(0068e2a4 "C:\users\focht\Temp\",0017d858 "~WRI",00000000,003cb3f6) ret=7e868274 0031:Ret KERNEL32.GetTempFileNameA() retval=00002cfb ret=7e868274 0031:Call ntdll.RtlFreeHeap(00110000,00000000,0017d858) ret=7e868295 0031:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e868295 0031:Ret KERNEL.97: GETTEMPFILENAME() retval=00002cfb ret=123f:0f91 ds=1466 0031:Call KEYBOARD.6: OEMTOANSI(146661f6 "C:\users\focht\Temp\~WR2cfb.tmp",1467:6162) ret=1247:0038 ds=1466 0031:Call user32.OemToCharA(003cb3f6 "C:\users\focht\Temp\~WR2cfb.tmp",003cb362) ret=7e53be34 0031:Ret user32.OemToCharA() retval=00000001 ret=7e53be34 0031:Ret KEYBOARD.6: OEMTOANSI() retval=ffffffff ret=1247:0038 ds=1466 0031:trace:seh:raise_exception code=c0000005 flags=0 addr=0x31 ip=00000031 tid=0031 0031:trace:seh:raise_exception info[0]=00000000 0031:trace:seh:raise_exception info[1]=ffffffff 0031:trace:seh:raise_exception eax=ffff4743 ebx=00006284 ecx=00000000 edx=02d00003 esi=000060df edi=00000000 0031:trace:seh:raise_exception ebp=00006048 esp=00006044 cs=123f ds=1466 es=1466 fs=0063 gs=006b flags=00210202 0031:trace:seh:call_vectored_handlers calling handler at 0x7e86dafc code=c0000005 flags=0 0031:trace:seh:call_vectored_handlers handler at 0x7e86dafc returned 0 0031:trace:seh:call_stack_handlers calling handler at 0x7e8ac5ac code=c0000005 flags=0 0031:Call DOS int 0x21 ret=123f:00000033 eax=ffff4743 ebx=00006284 ecx=00000000 edx=02d00003 esi=000060df edi=00000000 ebp=00006048 esp=00006044 ds=1466 es=1466 fs=0063 gs=006b ss=1467 flags=00210202 0031:trace:seh:call_stack_handlers handler at 0x7e8ac5ac returned 0 0031:trace:int21:DOSVM_Int21Handler AX=4743 BX=6284 CX=0000 DX=0003 SI=60df DI=0000 DS=1466 ES=1466 EFL=00200202 0031:Call KERNEL32.GetDriveTypeW(0068d676 L"C:") ret=7e86f147 0031:Ret KERNEL32.GetDriveTypeW() retval=00000003 ret=7e86f147 0031:trace:int21:INT21_GetCurrentDirectory drive 3 0031:Call KERNEL32.GetCurrentDirectoryW(00000104,0068d7b4) ret=7e86f765 0031:Ret KERNEL32.GetCurrentDirectoryW() retval=00000017 ret=7e86f765 0031:Call KERNEL32.GetEnvironmentVariableW(0068d6a8 L"=C:",0068d7b4,00000104) ret=7e86f7eb 0031:Ret KERNEL32.GetEnvironmentVariableW() retval=00000000 ret=7e86f7eb 0031:trace:int21:DOSVM_Int21Handler returning: AX=4743 BX=6284 CX=0000 DX=0003 SI=60df DI=0000 DS=1466 ES=1466 EFL=00200202 0031:trace:seh:raise_exception code=c0000005 flags=0 addr=0x3 ip=00000003 tid=0031 0031:trace:seh:raise_exception info[0]=00000000 0031:trace:seh:raise_exception info[1]=ffffffff 0031:trace:seh:raise_exception eax=ffff4743 ebx=00006284 ecx=00000000 edx=02d00003 esi=000060df edi=00000000 0031:trace:seh:raise_exception ebp=00006048 esp=000000fc cs=119f ds=1466 es=1466 fs=0063 gs=006b flags=00210202 0031:trace:seh:call_vectored_handlers calling handler at 0x7e86dafc code=c0000005 flags=0 0031:trace:seh:call_vectored_handlers handler at 0x7e86dafc returned 0 0031:trace:seh:call_stack_handlers calling handler at 0x7e8ac5ac code=c0000005 flags=0 0031:Call DOS int 0x31 ret=119f:00000005 eax=ffff4743 ebx=00006284 ecx=00000000 edx=02d00003 esi=000060df edi=00000000 ebp=00006048 esp=000000fc ds=1466 es=1466 fs=0063 gs=006b ss=11a7 flags=00210202 0031:trace:seh:call_stack_handlers handler at 0x7e8ac5ac returned 0 ... 0031:Call USER.1: MESSAGEBOX(0000,146764d4 "Not enough memory for Write to complete this operation.\n\nQuit one or more applications to increase available memory, and then try again.",14671e78 "Write",0030) ret=1297:0252 ds=1467 --- snip ---
Source: https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/krnl386.exe16/int21.c...
--- snip --- 638 static BOOL INT21_GetCurrentDirectory( CONTEXT *context, BOOL islong ) 639 { 640 char *buffer = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Esi); 641 BYTE drive = INT21_MapDrive( DL_reg(context) ); 642 WCHAR pathW[MAX_PATH]; 643 char pathA[MAX_PATH]; 644 WCHAR *ptr = pathW; 645 646 TRACE( "drive %d\n", DL_reg(context) ); 647 648 if (drive == MAX_DOS_DRIVES) 649 { 650 SetLastError(ERROR_INVALID_DRIVE); 651 return FALSE; 652 } 653 654 /* 655 * Grab current directory. 656 */ 657 658 if (!GetCurrentDirectoryW( MAX_PATH, pathW )) return FALSE; 659 660 if (toupperW(pathW[0]) - 'A' != drive || pathW[1] != ':') 661 { 662 /* cwd is not on the requested drive, get the environment string instead */ 663 664 WCHAR env_var[4]; 665 666 env_var[0] = '='; 667 env_var[1] = 'A' + drive; 668 env_var[2] = ':'; 669 env_var[3] = 0; 670 if (!GetEnvironmentVariableW( env_var, pathW, MAX_PATH )) 671 { 672 /* return empty path */ 673 buffer[0] = 0; 674 return TRUE; 675 } 676 } ... --- snip ---
'INT21_GetCurrentDirectory' with DL = 0x3 = 'C' fails due to current install/working directory drive letter not being 'C' ('Z' by default).
The resulting app error message is typical Microsoft - generic as possible. Just don't give the user a proper hint. It has nothing to do with virtual memory/pagefile etc.
You need to install/copy the apps into the WINEPREFIX and run the app from there ("cd" into prefix).
This works:
--- snip --- $ pwd /home/focht/.wine/drive_c
$ file WRITE.EXE WRITE.EXE: MS-DOS executable, NE for MS Windows 3.x
$ wine ./WRITE.EXE 0030:fixme:ole:OleRegisterClientDoc16 (WINWRITE,(Untitled),...): stub 0030:fixme:ole:OleEnumObjects16 (1, 1467:625c): stub 0030:fixme:ole:OleEnumObjects16 (1, 1467:625c): stub 0030:fixme:ole:OleEnumObjects16 (1, 1467:6320): stub 0030:fixme:ole:OleRevertClientDoc16 (1): stub 0030:fixme:ole:OleRevokeClientDoc16 (1): stub ... --- snip ---
$ sha1sum WRITE.EXE 60e30536b323d0239c07a56d6d20d20ddefa28df WRITE.EXE
$ du -sh WRITE.EXE 240K WRITE.EXE
$ wine --version wine-3.5-91-g3263d51a1f
Regards
https://bugs.winehq.org/show_bug.cgi?id=19494
jbrown jb999@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from jbrown jb999@gmx.de --- This is almost unbelievable, but I can confirm this!
It doesn't matter where WRITE.EXE is installed, you only need to cd to your .wine/drive_c prior to running it.