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