﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1549	Call to _SQLite_Escape causes exception abend in certain circumstances	jmansheim@…	Jpm	"I have a program which parses html pages and inserts the data into a SQLite database.  In certain circumstances, when I parse sections of text, _SQLite_Escape abends with an exception error.  AutoIt reports an Exit Code of -1073741819.

Program Code:

{{{
#include <IE.au3>
#include <SQLite.au3>
#include <SQLite.dll.au3>

_SQLite_Startup ()

$lawWindow = _IECreate ()
_IENavigate($lawWindow, ""file://I:\laws\testbadfile.htm"", 1)
$fullText = _IEBodyReadText ($lawWindow)
$escapedText = _SQLite_Escape($fullText) 
}}}

Two files are attached, one which does not produce the error (testgoodfile.htm) and one which does produce the error (testbadfile.htm).  Be sure that you change the path to the file in the _IENavigate function call.

The SQLite.au3 version included with AutoIt 3.3.3.0 works fine on both files and all others I have seen.

Any SQLite.au3 versions includedwith AutoIt 3.3.4.0 or later do not work on both files and the success is intermitant.  

I believe the error is happening in the function 
_ _SQLite_Utf8StructToString during this call:
{{{
$aResult = DllCall(""Kernel32.dll"", ""int"", ""MultiByteToWideChar"", ""uint"", 65001, ""dword"", 0, ""ptr"", DllStructGetPtr($tText), ""int"", -1, _
						""wstr"", DllStructGetPtr($tWstr), ""int"", $aResult[0])
}}}
"	Bug	closed	3.3.7.0	Standard UDFs	3.3.6.0	None	Fixed	SQLite _SQLite_Escape dll	
