﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2819	AutoIt HardCrash with ObjCreate and GUICtrlCreateObj	mLipok		"I found a nice script here:
http://www.autoitscript.com/forum/topic/141103-barcode-udf/page-2#entry1117722

I was trying to use it and I had HardCrash.

It happen on production and latest beta AutoIt

you can get ActiveX: OcvitaBarcode.ocx here:
http://ocvita.ru/content/view/90/35/

exactly :
http://ocvita.ru/downloads/ocvitabarcode.php



----

Here is my smalest reproduction script with comment:


{{{
Global $oBCode, $oBCodeGUI


$GUI = GUICreate(""OCVITA_BARCODE by AutoIt3, Valery Ivanov, 19 September, 2013"", 400, 400, -1, -1)
$oBCode = ObjCreate(""Ocvita.Barcode"")
$oBCode.symbology = 1
$oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280)
GUISetState()

ConsoleWrite('!' & @ScriptLineNumber & @CRLF)
; check - if step 1 is OK
$oBCode.AboutBox()

ConsoleWrite('!' & @ScriptLineNumber & @CRLF)
CRASH_IS_HERE_RefreshBCode(2)

; check - if step 2 is OK
$oBCode.AboutBox()

Func CRASH_IS_HERE_RefreshBCode($NewSymIndex)

	; Crash only if this ObjCreate is used - comment them to avoid crash
	$oBCode = ObjCreate(""Ocvita.Barcode"")
	ConsoleWrite('!' & @ScriptLineNumber & @CRLF)
	$oBCode.symbology = $NewSymIndex
	ConsoleWrite('!' & @ScriptLineNumber & @CRLF)

	; !!!!!!!!! EXACTLY HERE
	$oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280)
	ConsoleWrite('!' & @ScriptLineNumber & @CRLF)
EndFunc   ;==>CRASH_IS_HERE_RefreshBCode
}}}


----


And I want to ask:
if you can add some @error chcecking to:
ObjCreate()
and
GUICtrlCreateObj()

mLipok
"	Bug	closed		AutoIt	3.3.13.12	None	No Bug		
