Sign in to follow this  
Followers 0
bshoenhair

Excel COM, Possible 98 issue

4 posts in this topic

Since COM was last updated to get rid of Excel memory bug I have been getting a fatal Excel error when the script closes.

Can someone please verify this probable issue in Win98 ?

Win98 = ERROR

WinXP = No Issues

Note must be AutoIt Beta 3.1.1.4 or greater

This is the error:

EXCEL caused an invalid page fault in
module EXCEL.EXE at 0167:30033d8a.
Registers:
EAX=0041c500 CS=0167 EIP=30033d8a EFLGS=00010206
EBX=00000001 SS=016f ESP=0062fc1c EBP=0062fc2c
ECX=650918d0 DS=016f ESI=0068db24 FS=3ccf
EDX=0062fba2 ES=016f EDI=00000000 GS=0000
Bytes at CS:EIP:
ff 51 08 66 83 7e 24 05 74 4b 8b 46 18 3b c7 74 
Stack dump:
0041c500 00000000 0068f4b0 00000000 308e03ec 30033a8e 00000000 3007568c 0068e3ec 00000000 0041c584 00000000 30033aaf 0068f4b0 0068f54c 30033a8e

Script:

$Excel = ObjCreate("Excel.Application"); Create an Excel Object
if @error then
  Msgbox (0,"","Error creating Excel object. Error code: " & @error)
  exit
endif
if not IsObj($Excel) then
  Msgbox (0,"ExcelTest","I'm sorry, but creation of an Excel object failed.")
  exit
endif
$Excel.Visible = 1 ; Let the guy show himself - Set to 0 to run excel invisible
$NewBook = $Excel.workbooks.add ; Add a new workbook
; Example: Fast Fill some cells with there address
Msgbox (0,"","Click 'ok' to fastfill some cells")
For $c In $NewBook.Sheets("Sheet1").Range("a1:n1").Cells
    $c.Value = $c.Address
    For $i = 1 To 8
        $c.Offset($i,0).Value = $c.Offset($i,0).Address
    Next
Next

msgbox(0,"ExcelTest","Click 'ok' to read the cells in each column.")
$Values = ""
For $c In $NewBook.Sheets("Sheet1").Range("a1:n9").Cells
    $Values = $Values & $c.Text & @TAB
Next
msgbox(0,"Values Read",StringStripWS($Values,3))
$Excel.activeworkbook.saved = 1; To prevent 'yes/no' questions from Excel
$Excel.quit      ; Get rid of him.
$Excel = 0       ; Loose this object.
             ; Object will also be automatically discarded when you exit the script
exit

Share this post


Link to post
Share on other sites



Since COM was last updated to get rid of Excel memory bug I have been getting a fatal Excel error when the script closes.

Can someone please verify this probable issue in Win98 ?

Win98 = ERROR

WinXP = No Issues

Note must be AutoIt Beta 3.1.1.4 or greater

....

<{POST_SNAPBACK}>

Hello,

The FOR..IN loop is broken somehow (without even touching it :-) .

I got also a report about a FOR..IN loop issue from Valik, I have to ask him if that's the same problem.

I can reproduce the problem. It disappears when I leave out the two FOR..IN loops.

Very odd that it only shows up in Windows 98..

But I will look into it!

Thanks for testing the beta ! :-)

Regards,

-Sven

Share this post


Link to post
Share on other sites

I isolated this problem in the AutoIT COM code.

In the FOR..IN loop, some references to objects are not released. After quitting Excel, the EXCEL.EXE tries to release them anyways and crashes doing so.

I fixed this one, together with some other issues.

The fix will be included in the next beta version of AutoIt.

Regards,

-Sven

Share this post


Link to post
Share on other sites

Wonderful, can't wait for next Beta release.

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