by lewg2 » Fri Aug 07, 2015 12:03 am
I've gotten similar allocation and vector error messages -- but not always -- with the following setup:
Aoo 4.1.1 on Win 8.1, HP 2-in-1 with 8gb ram and 220gb SSD
I run the macro to clean up a *.csv file imported successfully into Calc (unicode UTF-8, if that's relevant). It does basic searches, deletes rows and columns, adds columns and formulas, etc. I don't know how to code directly, so it's a series of recorded then modified steps.
The crash
The macro first goes to the top of the file and then does a simple forward search for string "trade history". That's where it crashes. Here's the code:
'REMOVE EXTRANEOUS ROWS ABOVE, BELOW RELEVANT ONES
rem ----------------------------------------------------------------------
' find trade history row, select all rows back to the top and delete them
dim args2(1) as new com.sun.star.beans.PropertyValue
args2(0).Name = "SearchItem.SearchString"
args2(0).Value = "trade history"
args2(1).Name = "SearchItem.Backward"
args2(1).Value = false
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args2())
The file recovery
It goes immediately to window that says "unexpected error...has crashed...these files will be recovered". The spreadsheet window is gone. I have gotten the allocation and vector messages, but not always.
Then it goes to the recovery window. "Start recovery", import again succeeds.
The next macro run
And then, after the file recovery, the macro works. This is absolutely consistent. Basically I call up the file, let it crash, recover the file, and then re-run the macro to get my work done.
Today I recorded a little macro to go to the top of the file and then search for a known string. I called up/imported the file, ran the new little search macro, and it crashed. Recovered the file, re-ran the test search macro, and it works.
Note: this did not happen on my old W7 machine -- it ran flawlessly for a couple of years. But then I recently got the W8.1 machine and this starts happening. I can live with it, but....
Ubuntu 16.04