0

I am doing some search replace work using OLE Automation. The involved code is somehow the same I posted in This question.

On only one machine I have an "Invalid Variant Operation" error. This error appeared just after upgrading from MSOffice 2003 to 2010. But this occurs only on one pc, i tested on several pcs with office 2010 and the code works great.

I am really stuck, I tried to build with Eureka log And I will paste the call stack at the end of this question.

I hope somebody already stumbled into this problem so you can suggest.

The problem occured at a customer end, there are 100 machines connected to same DB and only on one it doesn't work.

Call Stack Information:
--------------------------------------------------------------------------------------------------
|Address |Module           |Unit        |Class           |Procedure/Method             |Line     |
--------------------------------------------------------------------------------------------------
|*Exception Thread: ID=776; Priority=0; Class=; [Main]                                           |
|------------------------------------------------------------------------------------------------|
|0043554F|Project1.exe|SysUtils.pas|                |DoneExceptions               |17031[25]|
|00435520|Project1.exe|SysUtils.pas|                |DoneExceptions               |17031[25]|
|00435CAA|Project1.exe|SysUtils.pas|                |DoneExceptions               |17031[25]|
|770F48F0|oleaut32.dll     |            |                |VariantClear                 |         |
|00435B43|Project1.exe|SysUtils.pas|                |DoneExceptions               |17031[25]|
|0043590C|Project1.exe|SysUtils.pas|                |DoneExceptions               |17031[25]|
|00435B48|Project1.exe|SysUtils.pas|                |DoneExceptions               |17031[25]|
|00435BE4|Project1.exe|SysUtils.pas|                |DoneExceptions               |17031[25]|
|00407316|Project1.exe|System.pas  |                |_HandleFinally               |14330[39]|
|00407460|Project1.exe|System.pas  |                |_RaiseExcept                 |14712[1] |
|00635EED|Project1.exe|ComObj.pas  |                |DispCallError                |2024[13] |
|004070DA|Project1.exe|System.pas  |                |_HandleAnyException          |13728[81]|
|77E256A3|RPCRT4.dll       |            |                |NdrClientCall2               |         |
|7C80A174|kernel32.dll     |            |                |WideCharToMultiByte          |         |
|0040C4DB|Project1.exe|System.pas  |                |LocaleCharsFromUnicode       |29632[1] |
|0040C4C0|Project1.exe|System.pas  |                |LocaleCharsFromUnicode       |29631[0] |
|00407EFC|Project1.exe|System.pas  |                |CharFromWChar                |17375[3] |
|00407EDC|Project1.exe|System.pas  |                |CharFromWChar                |17372[0] |
|00407F17|Project1.exe|System.pas  |                |CharFromWChar                |17381[1] |
|00407F08|Project1.exe|System.pas  |                |CharFromWChar                |17380[0] |
|004090CE|Project1.exe|System.pas  |                |_UStrToString                |22054[8] |
|00404DA4|Project1.exe|System.pas  |                |Move                         |4808[1]  |
|004090ED|Project1.exe|System.pas  |                |_UStrToString                |22061[15]|
|7C920380|ntdll.dll        |            |                |RtlImageNtHeader             |         |
|00407460|Project1.exe|System.pas  |                |_RaiseExcept                 |14712[1] |
|00635EED|Project1.exe|ComObj.pas  |                |DispCallError                |2024[13] |
|004070DA|Project1.exe|System.pas  |                |_HandleAnyException          |13728[81]|
|00407460|Project1.exe|System.pas  |                |_RaiseExcept                 |14712[1] |
|00635EED|Project1.exe|ComObj.pas  |                |DispCallError                |2024[13] |
|7C913247|ntdll.dll        |            |                |RtlConvertUlongToLargeInteger|         |
|00404A95|Project1.exe|System.pas  |                |_ReallocMem                  |3871[22] |
|00404A88|Project1.exe|System.pas  |                |_ReallocMem                  |3850[1]  |
|00409130|Project1.exe|System.pas  |                |_UStrSetLength               |22152[27]|
|00408198|Project1.exe|System.pas  |                |_UStrAsg                     |17715[1] |
|0040C3EF|Project1.exe|System.pas  |                |UTF8ToUnicodeString          |28576[11]|
|00407DB8|Project1.exe|System.pas  |                |_UStrClr                     |16954[1] |
|0040C404|Project1.exe|System.pas  |                |UTF8ToUnicodeString          |28577[12]|
|7C91E485|ntdll.dll        |            |                |KiUserApcDispatcher          |         |
|7C912B04|ntdll.dll        |            |                |RtlInterlockedPushListSList  |         |
|77E943DB|SHLWAPI.dll      |            |                |SHRegGetValueW               |         |
|77E943E8|SHLWAPI.dll      |            |                |SHRegGetValueW               |         |
|00407460|Project1.exe|System.pas  |                |_RaiseExcept                 |14712[1] |
|00635EED|Project1.exe|ComObj.pas  |                |DispCallError                |2024[13] |
|00635E48|Project1.exe|ComObj.pas  |                |DispCallError                |2011[0]  |
|00635F20|Project1.exe|ComObj.pas  |                |DispatchInvokeError          |2031[1]  |
|00635F1C|Project1.exe|ComObj.pas  |                |DispatchInvokeError          |2031[1]  |
|00635BF9|Project1.exe|ComObj.pas  |                |DispatchInvoke               |1895[108]|
|00635940|Project1.exe|ComObj.pas  |                |DispatchInvoke               |1787[0]  |
|00635E3B|Project1.exe|ComObj.pas  |                |VarDispInvoke                |2002[10] |
|774CF17D|ole32.dll        |            |                |CoCreateInstanceEx           |         |
|77E25AE5|RPCRT4.dll       |            |                |IUnknown_Release_Proxy       |         |
|00435C7A|Project1.exe|SysUtils.pas|                |DoneExceptions               |17031[25]|
|00435BE4|Project1.exe|SysUtils.pas|                |DoneExceptions               |17031[25]|
|004627DF|Project1.exe|Classes.pas |TThread         |Create                       |11471[28]|
|004627D0|Project1.exe|Classes.pas |TThread         |Create                       |11471[28]|
|00501FE5|Project1.exe|ActnList.pas|TContainedAction|Execute                      |448[8]   |
|00501FB4|Project1.exe|ActnList.pas|TContainedAction|Execute                      |440[0]   |
|00502DA0|Project1.exe|ActnList.pas|TCustomAction   |Execute                      |1094[7]  |
|00406498|Project1.exe|System.pas  |                |_CallDynaInst                |11592[1] |
|004626A3|Project1.exe|Classes.pas |TThread         |Create                       |11471[28]|
|00532DA4|Project1.exe|Menus.pas   |TMenuItem       |Click                        |2525[17] |
Community
  • 1
  • 1
UnDiUdin
  • 14,334
  • 37
  • 140
  • 233
  • 2
    try to find differences among this 1 PC and other 99. some time ago i've got error with 1 PC in network, because of thousands and decimal separator, both of them were set to the same value. so, check global system and office settings. – teran Mar 13 '12 at 13:16
  • @teran Thanks for the suggestion. I already changed something in Control Panel /Regional Settings. But what do you mean for Office settings? – UnDiUdin Mar 13 '12 at 13:28
  • it is only suggestion, nothing concrete :) may be switch off Addons, or check security settings; try to run program from another user account (or create new one with default settings). – teran Mar 13 '12 at 13:45

0 Answers0