On 02/01/10 04:19, Paries Luo wrote:
And the connection to openoffice.org was successful. And I had
written the catch to handle all the exception as below:
int DocTranscode::doConvert( int docIndex )
{
Reference<XStorable> ooStore (ooComponent, UNO_QUERY);
Sequence<PropertyValue> storeProps(1);
...
try{
ooStore->storeToURL( OUString::createFromAscii(strOOPathFile), storeProps );
}catch(...) // catch all the exception
{
handleException();
return E_GEN_ERR;
...
}
It runs well when the .doc document is normal. The problem I'm having
is that when I am doing the stability test, I constructed a new
abnormal .doc document with some wildcat string such as "&(()))^%$$",
the API function "XStorable::storeToURL" would not throw any
exception but just core dumped, it seems it had used some invaild
memory in the function "XStorable::storeToURL", and I tried to trace
the exception via the core file, but unfortunately, I could not go
deep into the function XStorable::storeToURL. But I found that,
the position in momery where the core dump happen as:
If the file couldn't be loaded, ooComponent is null, so the crash is
indeed in your code before calling storeToURL.
Niklas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]