Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2819 closed Bug (No Bug)

AutoIt HardCrash with ObjCreate and GUICtrlCreateObj

Reported by: mLipok Owned by:
Milestone: Component: AutoIt
Version: 3.3.13.12 Severity: None
Keywords: Cc:

Description

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

Attachments (0)

Change History (8)

comment:1 by Zedna, 12 years ago

On my Win7 SP1 64bit AutoIt 3.3.13.12
this your script DOESN'T crash.
It runs without any errors.

comment:2 by mLipok, 12 years ago

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "Z:\TOOLs\ActiveX Components\Barcode\ocvitabarcode\OcvitaBarcode_crash.au3" /UserParams    
+>11:41:34 Starting AutoIt3Wrapper v.14.727.1229.0 SciTE v.3.4.4.0   Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0415)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\user\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\user\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.13.12)  from:C:\Program Files (x86)\AutoIt3\Beta  input:Z:\TOOLs\ActiveX Components\Barcode\ocvitabarcode\OcvitaBarcode_crash.au3
+>11:41:34 AU3Check ended.rc:0
>Running:(3.3.13.12):C:\Program Files (x86)\AutoIt3\Beta\autoit3.exe "Z:\TOOLs\ActiveX Components\Barcode\ocvitabarcode\OcvitaBarcode_crash.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
!10
!14
!24
!26
!>11:41:42 AutoIt3.exe ended.rc:-1073741819
+>11:41:42 AutoIt3Wrapper Finished.
>Exit code: 3221225477    Time: 8.263

in reply to:  1 comment:3 by mLipok, 12 years ago

Replying to Zedna:

On my Win7 SP1 64bit AutoIt 3.3.13.12
this your script DOESN'T crash.
It runs without any errors.

it works without crash but only when I comment the second one :

$oBCode = ObjCreate("Ocvita.Barcode")

comment:4 by Zedna, 12 years ago

My output from original script:

>"C:\Program Files (x86)\AutoIt3312\SciTe\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "C:\Users\zedna\Autoit\PZ\BARCODE\OcvitaBarcode\bug test.au3" /UserParams    
+>17:58:13 Starting AutoIt3Wrapper v.2.2.0.3 SciTE v.3.4.1.0   Keyboard:00010405  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0405)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3312\SciTe   UserDir => C:\Program Files (x86)\AutoIt3312\SciTe\AutoIt3Wrapper
>Running AU3Check (3.3.13.12)  from:C:\Program Files (x86)\AutoIt3312\Beta  input:C:\Users\zedna\Autoit\PZ\BARCODE\OcvitaBarcode\bug test.au3
+>17:58:13 AU3Check ended.rc:0
>Running:(3.3.13.12):C:\Program Files (x86)\AutoIt3312\Beta\autoit3.exe "C:\Users\zedna\Autoit\PZ\BARCODE\OcvitaBarcode\bug test.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
!12
!16
!26
!28
!32
+>17:58:17 AutoIt3.exe ended.rc:0
+>17:58:17 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 3.806

comment:5 by mLipok, 12 years ago

I do test on other systems.

comment:6 by mLipok, 12 years ago

Please close this ticket.
It works on other systems only crash on my own.
I'll open new thread in forum.
When I find an answer why this script crash then maybe I will back to this track ticket, or open new.

comment:7 by jchd18, 12 years ago

Resolution: No Bug
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.