L
LEK
My problem is my product has crash when I ran it over night. Then I
dump call stack and found that it happen at VariantClear function. I
think it is the problem of varaint variable send as parameter to this
function. The dump file tell me that this variable have initialized
before. But I don't know what value store in this variable because I
use vc2003 that it can't monitor a variant variable.
My question is what is the behavior of VariantClear function lead to
this problem?
And how can I prevent this problem before call VariantClear?
Call stack:
0391eb5c 2200e324 04666938 00000000 03f18b90 oleaut32!VariantClear
+0x52
0391eb94 28508ae6 0391ec16 e219652c 403cd758 Dexutil!
CMrvMTVarRange::setFloat+0xb4 [c:\dev\trunk_dex5.1\dll\dexutil\source
\m_mtvarrange.cpp @ 1259]
0391ee34 28509249 0391fbd8 2854fe28 00000007 MrvTsi!
CTsiClientItemBaseImp::FillRow+0x4e6 [c:\dev\trunk_dex5.1\dll\mrvtsi
\tsiclientitembaseimp.cpp @ 741]
0391f0f4 2850635b 0391fbd8 0397da78 039e0818 MrvTsi!
CTsiClientItemBaseImp:ataLoad+0x3e9 [c:\dev\trunk_dex5.1\dll\mrvtsi
\tsiclientitembaseimp.cpp @ 853]
0391fb68 491058e5 01000140 00004002 00000000 MrvTsi!CBGetData+0x103b
[c:\dev\trunk_dex5.1\dll\mrvtsi\tsiclientitembaseimp.cpp @ 260]
0391fc54 49126c1e 00050336 77d4cefd 00000000 TSI500!tsiQueryInterface
+0x3fd0
0391fc64 49122859 00942318 00000000 2850b730 TSI500!tsiQueryInterface
+0x25309
00000000 00000000 00000000 00000000 00000000 TSI500!tsiQueryInterface
+0x20f44
My source code:
INT16 CMrvMTVarRange::setFloat(const XYZ &xyz, FLOAT64 Value)
{
SAFEARRAY_LOCK_FAILS_WITH(M_ERR);
//<PS> Access violation
//EMPTY_ENTRY(pVar, M_ERR);
VARIANT *pVar = getVariantPtr(xyz);
if (!pVar || (VariantClear(pVar) != S_OK))
return M_ERR;
//<PS>
V_VT(pVar) = VT_R8;
V_R8(pVar) = Value;
return M_OK;
}
dump call stack and found that it happen at VariantClear function. I
think it is the problem of varaint variable send as parameter to this
function. The dump file tell me that this variable have initialized
before. But I don't know what value store in this variable because I
use vc2003 that it can't monitor a variant variable.
My question is what is the behavior of VariantClear function lead to
this problem?
And how can I prevent this problem before call VariantClear?
Call stack:
0391eb5c 2200e324 04666938 00000000 03f18b90 oleaut32!VariantClear
+0x52
0391eb94 28508ae6 0391ec16 e219652c 403cd758 Dexutil!
CMrvMTVarRange::setFloat+0xb4 [c:\dev\trunk_dex5.1\dll\dexutil\source
\m_mtvarrange.cpp @ 1259]
0391ee34 28509249 0391fbd8 2854fe28 00000007 MrvTsi!
CTsiClientItemBaseImp::FillRow+0x4e6 [c:\dev\trunk_dex5.1\dll\mrvtsi
\tsiclientitembaseimp.cpp @ 741]
0391f0f4 2850635b 0391fbd8 0397da78 039e0818 MrvTsi!
CTsiClientItemBaseImp:ataLoad+0x3e9 [c:\dev\trunk_dex5.1\dll\mrvtsi
\tsiclientitembaseimp.cpp @ 853]
0391fb68 491058e5 01000140 00004002 00000000 MrvTsi!CBGetData+0x103b
[c:\dev\trunk_dex5.1\dll\mrvtsi\tsiclientitembaseimp.cpp @ 260]
0391fc54 49126c1e 00050336 77d4cefd 00000000 TSI500!tsiQueryInterface
+0x3fd0
0391fc64 49122859 00942318 00000000 2850b730 TSI500!tsiQueryInterface
+0x25309
00000000 00000000 00000000 00000000 00000000 TSI500!tsiQueryInterface
+0x20f44
My source code:
INT16 CMrvMTVarRange::setFloat(const XYZ &xyz, FLOAT64 Value)
{
SAFEARRAY_LOCK_FAILS_WITH(M_ERR);
//<PS> Access violation
//EMPTY_ENTRY(pVar, M_ERR);
VARIANT *pVar = getVariantPtr(xyz);
if (!pVar || (VariantClear(pVar) != S_OK))
return M_ERR;
//<PS>
V_VT(pVar) = VT_R8;
V_R8(pVar) = Value;
return M_OK;
}