﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2711	_IELoadWait() hung in case of unknown error	anonymous		"I have Embedded IE and sometimes it error-out by showing ""404"" page not found. In this case _IELoadWait($oIE,0,3333) always hung forever.

It seems it happen because of some logic problem in Func IEComErrorUnrecoverable($i_error) as it return $_IEStatus_Success not only when @error=0, but also in case of all unknown errors.

In my case @error=1 and as result _IELoadWait() didn't check for timer to time-out going in infinite loop.



{{{
	Select
		Case __IEIsObjType($o_object, ""browser""); Internet Explorer
			; ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : String($o_object.readyState) = ' & String($o_object.readyState) & @CRLF & '>Error code: ' & @error & '    Extended code: 0x' & Hex(@extended) & @CRLF) ;### Debug Console
			While Not (String($o_object.readyState) = ""complete"" Or $o_object.readyState = 4 Or $f_Abort)
				; Trap unrecoverable COM errors
				If @error Then
					$i_error = @error
					If __IEComErrorUnrecoverable($i_error) Then
						$i_ErrorStatusCode = __IEComErrorUnrecoverable($i_error)
						$f_Abort = True
					EndIf
				ElseIf (TimerDiff($IELoadWaitTimer) > $i_timeout) Then
					$i_ErrorStatusCode = $_IEStatus_LoadWaitTimeout
					$f_Abort = True
				EndIf
				Sleep(100)
			WEnd
;----------------------------------------------------------------------------------

Func __IEComErrorUnrecoverable($i_error)
	Switch $i_error
		; Cross-domain scripting security error
		Case -2147352567 ; ""an exception has occurred.""
			Return $_IEStatus_AccessIsDenied
		Case -2147024891 ; ""Access is denied.""
			Return $_IEStatus_AccessIsDenied
			;
			; Browser object is destroyed before we try to operate upon it
		Case -2147417848 ; ""The object invoked has disconnected from its clients.""
			Return $_IEStatus_ClientDisconnected
		Case -2147023174 ; ""RPC server not accessible.""
			Return $_IEStatus_ClientDisconnected
		Case -2147023179 ; ""The interface is unknown.""
			Return $_IEStatus_ClientDisconnected
			;
		Case Else
			Return $_IEStatus_Success
	EndSwitch
EndFunc   ;==>__IEComErrorUnrecoverable
}}}
"	Bug	closed		Standard UDFs	Other	None	Works For Me		
