﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
4026	COM Object/Map/ScriptingDictionary crash when acessing them in specific ways.	anonymous		"it's a rather rare teeny-tiny bug, and there's an easy workaround... still...

Reproducer:

{{{#!autoit
$inp = InputBox('choice', 'test Object(1), Map(2), or ScriptingDictionary(3)?', '1')
if @error then exit
if $inp = 1 then ; -- COM object -- 
#Illegal text at the end of statement (one statement per line).
	Run(""notepad.exe"")
	$hNotepad = WinWait(""[CLASS:Notepad]"")
	$answer = MsgBox(0x24,'...', 'Delete notepad icon from taskbar?')
	if $answer=6 then TaskbarListObj().DeleteTab($hNotepad) ;crashes -- ""Illegal text at the end of statement (one statement per line).""
;~ 	if $answer=6 then (TaskbarListObj().DeleteTab($hNotepad)) ; a workaround that works

elseif $inp = 2 then ; -- Map --
#The requested action with this object has failed.
	$m = Map()
	ConsoleWrite(""$m.greet's type:""&VarGetType($m.greet) & @CRLF)
	$m.greet() ; - crashes: ""The requested action with this object has failed.""

else  ; -- ScriptingDictionary -- 
#Illegal text at the end of statement (one statement per line).
	((Dict())('fn'))(1) ; works
	(Dict())('fn')(2) ; doesnt, yet no crash, no error, no nothing...
	(Dict()('fn'))(3) ; works
	Dict()('fn')(4) ; crashes

EndIf

Func TaskbarListObj()
	Local $sCLSID_TaskbarList = ""{56FDF344-FD6D-11D0-958A-006097C9A090}""
	Local $sIID_ITaskbarList = ""{56FDF342-FD6D-11D0-958A-006097C9A090}""
	Local $sTagITaskbarList = ""HrInit hresult(); AddTab hresult(hwnd); DeleteTab hresult(hwnd); ActivateTab hresult(hwnd); SetActiveAlt hresult(hwnd);""
	Local $oTaskbarList = ObjCreateInterface($sCLSID_TaskbarList, $sIID_ITaskbarList, $sTagITaskbarList)
	$oTaskbarList.HrInit()
	Return $oTaskbarList
EndFunc
Func Map()
	Local $m[]
	$m.greet = sayhi
	Return $m
EndFunc
Func sayhi()
	MsgBox(0x40,'welp','...hi....')
EndFunc
Func Dict()
	Local $d = ObjCreate('Scripting.Dictionary')
	$d('fn') = sayhey
	Return $d
EndFunc
Func sayhey($n)
	ConsoleWrite(' \ o/ heeeey ' &$n& @CRLF)
EndFunc

}}}"	Bug	new		AutoIt	3.3.16.1	None			
