Sign in to follow this  
Followers 0
Spiff59

Abend 0xC000005 in Aut2exe.exe at 7C9109F9

5 posts in this topic

I couldn't get past TRAC's spam filter to make a ticket out of this...

The attached (rough, unfinished) code runs interpretively out of SciTe, but causes a crash when you attempt to compile it. This seems to be related to file size, as adding, deleting, or changing ANY line of code in the script allows for a successful compile. I've changed the code considerably and things work fine for me now, but I thought you might like to see a condition that can cause aut2exe.exe to crash.

Thanks.

Grr... Can't attach the au3 file in TRAC for a bug report: "Akismet says content is spam"

Grr grr... Can't paste it in TRAC system either, still "spam"

#include <GuiConstants.au3>
#include <GuiListView.au3>
#include <ExcelCOM_UDF.au3> 
#include <Process.au3> 
#include <Misc.au3> 
If _Singleton (@ScriptName, 1) = 0 Then; prevent duplicate processes
    ProcessClose(@ScriptName)
EndIf

Dim $x, $y, $Users, $MWDDF_USER[51], $Work_User, $MWDDF_CONNECTIONS[51], $ListView, $GUI_handle, $Button_Rescan

$ADS_Path = "Provider=Advantage OLE DB Provider;Data Source=\\Screamer\MediData\CFC\mwddf.add;User Id=user;Password=password;"

Query_MWDDF()
GUI()

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $Button_Rescan
            Query_MWDDF()
            GUIDelete($GUI_handle)
            GUI()
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
Wend
Exit

;===============================================================================================
Func Query_MWDDF()
    $oADO = ObjCreate("ADODB.Connection")
    $oADO.mode = 2;(2=adModeRead; 3=adModeReadWrite; 12=adModeShareExcludive)1
    If Not IsObj($oADO) Then MsgBox(1,"error", "! Error")
    $oADO.Open($ADS_Path)
    If @error Then
        MsgBox(0, "ERROR", "Failed to connect to the database")
        Exit
    EndIf
    $SQL = "execute procedure sp_mgGetTableUsers('\\Screamer\Medidata\CFC\mwddf.add')"
    $oRS = ObjCreate("ADODB.Recordset")
    $oRS.Open($SQL, $oADO)
    $x = 0
    While Not $oRS.EOF
        $Work_User = StringStripWS($oRS("UserName").value, 2)
        If $x = 0 Then
            $x = 1
            $MWDDF_USER[$x] = $Work_User
            $MWDDF_CONNECTIONS[$x] = 1
        Else
            $found = 0
            For $y = 1 to $x
                If $Work_User = $MWDDF_USER[$y] Then
                    $found = 1
                    ExitLoop
                EndIf
            Next    
            If $found = 1 Then
                $MWDDF_CONNECTIONS[$y] += 1
            Else
                $x += 1
                $MWDDF_USER[$x] = $Work_User
                $MWDDF_CONNECTIONS[$x] = 1
            EndIf               
        EndIf
        $oRS.movenext
    WEnd
    $oRS.Close
    $oADO.Close
    $Users = 0
    For $y = 1 to $x 
        If $MWDDF_USER[$y] = @ComputerName Then
            $MWDDF_CONNECTIONS[$y] -= 1
        EndIf
        If $MWDDF_CONNECTIONS[$y] > 0 Then
            $Users += 1
        EndIf
    Next
EndFunc
; ==============================================================================================
Func GUI()
    $GUI_handle = GuiCreate("Who's in Medisoft/OH?   1.21", 300, 70 + ($Users * 17.9))
;   $GUI_handle = GuiCreate("Who's in Medisoft? 1.21", 300, 70 + ($Users * 17.9))
    GUISetFont (10, 400, 0)
    $Button_Rescan = GUICtrlCreateButton("RESCAN", 10, 5, 80, 22)
    $ListView = GuiCtrlCreateListView("   USER |CONNECTIONS", 10, 32, 280, 22 + ($Users * 17.9), $LVS_SORTASCENDING)
    _GUICtrlListView_SetColumnWidth ($ListView, 0, 120)
    _GUICtrlListView_SetColumnWidth ($ListView, 1, 120)
    For $y = 1 to $x 
        If $MWDDF_CONNECTIONS[$y] > 0 Then
            GuiCtrlCreateListViewItem($MWDDF_USER[$y] & "|" & $MWDDF_CONNECTIONS[$y], $ListView)
        EndIf
    Next
    GUISetFont (8, 400, 0)
;   GuiCtrlCreateLabel("THIS PROGRAM COUNTS AS 1 CONNECTION FROM: " & @ComputerName, 10, 55 + ($Users * 17.6), 400, 16)
;   GuiCtrlSetColor(-1, 0xFF0000); red
    GUISetState ()
EndFunc

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

What AutoIt3 version are you using and which ExcelCOM_UDF.au3 file?

Pardon, I'm running with the 3.2.12.0 release.

It's the 1.4 (01-04-08) version of ExcelCOM_UDF.

But that include is leftover code from a script I used as a template for this program, ExcelCoM is not referenced anywhere in this example and was removed from a later version of the script.

The commented line on the GUIcreate command is when the crash became apparent, I'd just made the title of the GUI a little more descriptive. Uncomment the old GUIcreate and comment the one with the longer description and all works. But, it doesn't seem as if that is related, as changing anything, anywhere in the code seems to get the compile working.

PS - the error report that XP wants to send to MS does mention "Application: Aut2exe.exe Module: ntdll.dll". Am guessing it's an interal call to ntdll.dll that is actually crashing?

Edited by Spiff59

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I am running the latest available production version 3.2.12.1 and downloaded this ExcelCOM_UDF and all compiles fine.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I am running the latest available production version 3.2.12.1 and downloaded this ExcelCOM_UDF and all compiles fine.

Jos

I d/l'ed 12.1 and installed it (allowing it to uninstall 12.0), then cut-and-pasted the code from above into a new txt document, renamed it to .au3, then I right clicked, chose "compile script" and got the same error. The error report does report Aut2exe.exe version 13.2.12.1 now, as well as ntdll.dll version 5.1.2600.5512. I did kill any other processes I could and still got the error. But... since the second I changed any line of code in that script things started to work, I'm not in need of a fix here. I just thought you might find it of interest. I can post/send you the error report if you like or any other info, , or we could just drop this, as I doubt I'll ever encounter the exact recipe for recreating it again.

Thanks.

Edited by Spiff59

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0