Jump to content

Recommended Posts

Posted (edited)

The below code  will cause AutoIt to hard crash  after 18+/- seconds with the error: -1073741819

Sometimes the method succeeds 2+/- seconds, most the time not.

I just updated to AutoCAD2016 and I am getting a high failure rate with my scripts.

Class ID of the target application is AfxMDIFrame110u

I updated SciTE to see if that would help but it did not.

 

ConsoleWrite("AutoIt Ver: " & @AutoItVersion & @CRLF)
ConsoleWrite(@OSVersion& " " & @OSArch & @CRLF)
ConsoleWrite("Build: " & @OSBuild & @CRLF)
ConsoleWrite(@OSServicePack & @CRLF)
ConsoleWrite(@OSType & @CRLF)


$oMyError = ObjEvent("AutoIt.Error","MyErrFunc")
$oAcad = ObjGet("","AutoCAD.application")
If @error Then
    MsgBox( 0 , "" , "Failed")
    Exit
Else
    ConsoleWrite("-Line: " & @ScriptLineNumber & @CRLF & "$oAcad: " & IsObj($oAcad) & @CRLF)
EndIf





Func MyErrFunc()

; Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !"      & @CRLF  & @CRLF & _
;           "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _
;          "err.windescription:"     & @TAB & $oMyError.windescription & @CRLF & _
;         "err.number is: "         & @TAB & hex($oMyError.number,8)  & @CRLF & _
;        "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _
;       "err.scriptline is: "     & @TAB & $oMyError.scriptline     & @CRLF & _
;      "err.source is: "         & @TAB & $oMyError.source         & @CRLF & _
;     "err.helpfile is: "       & @TAB & $oMyError.helpfile       & @CRLF & _
;    "err.helpcontext is: "    & @TAB & $oMyError.helpcontext _
;  )


ConsoleWrite(@CRLF  & @CRLF & "We intercepted a COM Error !"      & @CRLF  & @CRLF & _
           "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _
          "err.windescription:"     & @TAB & $oMyError.windescription & @CRLF & _
         "err.number is: "         & @TAB & hex($oMyError.number,8)  & @CRLF & _
        "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _
       "err.scriptline is: "     & @TAB & $oMyError.scriptline     & @CRLF & _
      "err.source is: "         & @TAB & $oMyError.source         & @CRLF & _
     "err.helpfile is: "       & @TAB & $oMyError.helpfile       & @CRLF & _
    "err.helpcontext is: "    & @TAB & $oMyError.helpcontext    & @CRLF & @CRLF _
  )

    Local $err = $oMyError.number
    If $err = 0 Then $err = -1

    $g_eventerror = $err  ; to check for after this function returns
Endfunc
AutoIt Ver: 3.3.12.0
WIN_7 X64
Build: 7601
Service Pack 1
WIN32_NT
!>23:21:10 AutoIt3.exe ended.rc:-1073741819
+>23:21:10 AutoIt3Wrapper Finished.
>Exit code: 3221225477    Time: 18.86
AutoIt Ver: 3.3.12.0
WIN_7 X64
Build: 7601
Service Pack 1
WIN32_NT
-Line: 14
$oAcad: 1
+>23:23:50 AutoIt3.exe ended.rc:0
+>23:23:50 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 1.995

 

Edited by Shane0000
Posted

Could you try with the latest beta version of AutoIt?

BTW: You are posting in the wrong forum. It's for "ActiveX and DLL versions of AutoIt".

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Im still getting the same output. 

AutoIt Ver: 3.3.13.20
WIN_7 X64
Build: 7601
Service Pack 1
WIN32_NT
!>10:08:24 AutoIt3.exe ended.rc:-1073741819
+>10:08:24 AutoIt3Wrapper Finished.
>Exit code: 3221225477    Time: 25.55

 

I thought lines like below were using COM

$oAcad.Layers.Item("0")

 

Posted

Is it possible for you to test COM with Visual Basic? If it works then we know it is an AutoIt bug.

It's not about COM.
The forum is about other programs calling AutoIt.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Looks like a bug then.

My UDFs and Tutorials:

  Reveal hidden contents

 

  • 5 years later...
Posted

for reference:
https://www.autoitscript.com/trac/autoit/ticket/3020

"No crash under WIn10 and current production 3.3.14"

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...