[Bug 4689] New: Problem with Internet Exceptions !

Wine Bugs wine-bugs at winehq.org
Wed Mar 1 16:47:11 CST 2006


http://bugs.winehq.org/show_bug.cgi?id=4689

           Summary: Problem with Internet Exceptions !
           Product: Wine
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: P2
         Component: test
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: aran at discardmail.de


Hello.

I have the following code compiled with Visual C++ 6.0 and it run very well
under Wine in Linux until i disconect the Ethernet Cable from the PC and cut of
the connection to the Internet manually.

If i make the same thing with the Programm in windows then the Programm does
immediatly go (less then a Second) to the CInternetException Routine and Catch
there the Lost and Timeouted Connection.

Under Wine the Programm wait about more than 70 Seconds till it show the Message
from the CInternetException Routine.
After this the Programm is for about 60 seconds totally Blocked and crash then
with a Error Message from Wine.

>From my side of View something with the Implementation of the function
"CInternetException" is wrong.
It wait extremly long till it catch the Timeouted Internet Conection block then
the Application Totaly and Crush it after this the Application.

Here is the little Programm code which i use for Compiling it under Visual C++
You need the following two DLL Files if you want it to run under Wine additionaly

MFC42.DLL
MSVCP60.DLL

//-----------------------------------------------------------------------------
	InternetSession= new CInternetSession(
"Mozilla/4.0",INTERNET_OPEN_TYPE_PRECONFIG | INTERNET_FLAG_NO_CACHE_WRITE |
INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_ASYNC);	
	InternetSession->SetOption(INTERNET_OPTION_CONNECT_TIMEOUT,800,0);
	InternetSession->SetOption(INTERNET_OPTION_SEND_TIMEOUT,800,0);
	InternetSession->SetOption(INTERNET_OPTION_RECEIVE_TIMEOUT,800,0);
	InternetSession->SetOption(INTERNET_OPTION_DATA_RECEIVE_TIMEOUT,800,0);
	InternetSession->EnableStatusCallback();
	HttpConnection = InternetSession->GetHttpConnection("www.winpcap.org",
INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_TRANSFER_ASCII,
INTERNET_DEFAULT_HTTP_PORT, "", "" );

	do
	{

	RELOADDATA:

		strcpy(Puffer, "" );
		strcpy(Buffer,"");
		ReadToken_i=0;

		try
		{

			HttpFile =
HttpConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET,"/windump/misc/credits.htm",NULL,
1, NULL, NULL, INTERNET_FLAG_NO_CACHE_WRITE );

			HttpFile->SendRequest();			

			do
			{
				ReadToken_i = HttpFile->Read( Puffer, 512 );

				if(ReadToken_i!=0)
				{
					Puffer[ReadToken_i]='\0';
					strcat(Buffer,Puffer);
				}

			}
			while(ReadToken_i!=0);

			HttpFile->Close();
			delete HttpFile;

		}
 
		catch( CMemoryException *e )
		{
			printf("%s MEMORY FEHLER !!!!!!!!!!!!!!!!!!!!!!\r", "" );
			//e->ReportError();
			e->Delete();

			Sleep(1000);
			goto RELOADDATA;

		}

		catch( CInternetException *e)
		{
			printf("%s !!!!!!!!!! INTERNET FEHLER !!!!!!!!!!!\n", "" );

			e->Delete();

			Sleep(1000);
			goto RELOADDATA;

		}

		catch( CException *e)
		{
			printf("%s EXCEPTION FEHLER !!!!!!!!!!!!!!!!!!!!!!\r", "" );
			//e->ReportError();
			e->Delete();

			Sleep(1000);
			goto RELOADDATA;

		}

		printf("%s\nBuffer\n", Buffer ); //getch(); return 0;
                
                Sleep(1500); // Sleep 1500 before the Next Reload of Data

	}
	while(!kbhit()); // Repeat until a Key is Pressed

	HttpConnection->Close();
	InternetSession->Close();

	delete HttpConnection;
	delete InternetSession;

	return 0;

//------------------------------------------------------------------------------

Thats here what Wine Say in the Error Log message.

wine: Unhandled exception 0xe06d7363 at address 0x404404c0 (thread 000b), starti
 ng debugger...
              Warning: the specified System directory L"c:\\windows\\system32" i
 s not accessible.
                 WineDbg starting on pid 0xa
Unhandled exception: 0xe06d7363 in 32-bit code (0x40440524).
In 32 bit mode.
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:1007 GS:0000
 EIP:40440524 ESP:4064ab90 EBP:4064abec EFLAGS:00000216(   - 00      - IAP1)
 EAX:4042ce89 EBX:4049fa14 ECX:00000000 EDX:e06d7363
 ESI:4064ac10 EDI:4064abb0
Stack dump:
0x4064ab90:  e06d7363 00000001 00000000 404404c0
0x4064aba0:  00000003 19930520 4064ac44 5f4b4938
0x4064abb0:  403415f0 00000010 4017aba0 401bd6f8
0x4064abc0:  4064abe8 40185dfc 402f0020 403415f8
0x4064abd0:  00000000 402f0000 402f0000 4086b5dc
0x4064abe0:  4086b5dc 40341478 00000000 4064ac18
0200: sel=1007 base=402e2000 limit=00001fff 32-bit rw-
Backtrace:
=>1 0x40440524 RaiseException+0x64 in kernel32 (0x40440524)
  2 0x40849658 _CxxThrowException+0x38 in msvcrt (0x40849658)
err:dbghelp:pe_load_dbg_file -Unable to peruse .DBG file MFC42.dbg ("MFC42.dbg")
  3 0x5f4265b8 375+0x3ce in mfc42 (0x5f4265b8)                                 
  4 0x5f425ce5 367+0xd41 in mfc42 (0x5f425ce5)
  5 0x004015f2 EntryPoint+0xe3 in downloadhttp (0x004015f2)
  6 0x40468d04 in kernel32 (+0x48d04) (0x40468d04)
  7 0x4001bce7 wine_switch_to_stack+0x17 in libwine.so.1 (0x4001bce7)
0x40440524 RaiseException+0x64 in kernel32: leal        0xfffffff4(%ebp),%esp
Modules:
Module  Address                 Debug info      Name (60 modules)

  3 0x5f4265b8 375+0x3ce in mfc42 (0x5f4265b8)                                 
  4 0x5f425ce5 367+0xd41 in mfc42 (0x5f425ce5)
  5 0x004015f2 EntryPoint+0xe3 in downloadhttp (0x004015f2)
  6 0x40468d04 in kernel32 (+0x48d04) (0x40468d04)
  7 0x4001bce7 wine_switch_to_stack+0x17 in libwine.so.1 (0x4001bce7)
0x40440524 RaiseException+0x64 in kernel32: leal        0xfffffff4(%ebp),%esp
Modules:
Module  Address                 Debug info      Name (60 modules)
PE      0x00400000-00405000     Export          downloadhttp
ELF     0x40000000-40017000     Deferred        ld-linux.so.2
ELF     0x40017000-40031000     Export          libwine.so.1
ELF     0x40031000-4014e000     Deferred        libc.so.6
ELF     0x4014f000-40153000     Deferred        libdl.so.2
ELF     0x40153000-401c8000     Deferred        ntdll<elf>
  \-PE  0x40160000-401c8000     \               ntdll
ELF     0x401c8000-402be000     Deferred        libwine_unicode.so.1
ELF     0x402be000-402e1000     Deferred        libm.so.6
ELF     0x402e4000-402ee000     Deferred        libnss_files.so.2
ELF     0x40401000-404fb000     Export          kernel32<elf>
ELF     0x40b7c000-40c04000     Deferred        ole32<elf>
  \-PE  0x40b90000-40c04000     \               ole32
ELF     0x40c04000-40c4b000     Deferred        rpcrt4<elf>
  \-PE  0x40c10000-40c4b000     \               rpcrt4
ELF     0x40c4b000-40c69000     Deferred        iphlpapi<elf>
  \-PE  0x40c50000-40c69000     \               iphlpapi  
ELF     0x40c69000-40d2b000     Deferred        shell32<elf>
  \-PE  0x40c80000-40d2b000     \               shell32
ELF     0x40d2b000-40dd6000     Deferred        comctl32<elf>
  \-PE  0x40d30000-40dd6000     \               comctl32   
ELF     0x40dd6000-40e05000     Deferred        uxtheme<elf>
  \-PE  0x40de0000-40e05000     \               uxtheme
ELF     0x40e18000-40e1e000     Deferred        libnss_dns.so.2
ELF     0x40e60000-40e73000     Deferred        libresolv.so.2  
PE      0x5f400000-5f4ed000     Export          mfc42
PE      0x780c0000-78121000     Deferred        msvcp60
ELF     0x7bf00000-7bf07000     Deferred        <wine-loader>

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list