Hello to all.
I have a strange and arandom panic when i launch the browser from a my application .
This error is Application close Browser User 23.
I use this code:
const TInt KWmlBrowserUid = 0x10008D39;
TUid id(TUid::Uid( KWmlBrowserUid ));
HBufC* iParam = iDocument.LoadHTTPGetData();
TInt len = iDocument.iResponseAddress.Length() + iParam->Length();
HBufC* url = HBufC::NewLC(len);
TPtr urlPtr = url->Des();
TBuf <256> iAdd;
iAdd.Copy(iDocument.iResponseAddress);
urlPtr.Copy(iAdd);
urlPtr += iParam->Des();
delete iParam;
iFile.Write(_L8("Dopo la delete"));
TApaTaskList taskList(CEikonEnv::Static()->WsSession());
TApaTask task = taskList.FindApp(TUid::Uid( KWmlBrowserUid ));
TBuf8<256> iAddress;
iAddress.Copy(*url);
TInt StartDocumentCheck = KErrNone;
if (task.Exists())
{
HBufC8* param8 = HBufC8::NewLC(url->Length());
param8->Des().Append(*url);
task.SendMessage(TUid::Uid(0), *param8); // Uid is not used
CleanupStack::PopAndDestroy(); // param8
}
else
{
RApaLsSession appArcSession;
User::LeaveIfError(appArcSession.Connect()); // connect to AppArc server
TThreadId id2;
StartDocumentCheck = appArcSession.StartDocument( *url, TUid::Uid( KWmlBrowserUid ), id2 );
if(StartDocumentCheck== KErrNotFound)
{
CAknInformationNote* informationNote = new (ELeave)CAknInformationNote;
informationNote->ExecuteLD(_L("Impossibile attivare il browser"));
}
I log each step of this function so I can read that the function exit correctly, without error. But the browser is closed with the above panic message.
It's a random error that comes up when I restart IIS web server.
I hope to have been clearful
Thanks in advance.
RdA
did you check SDK docs for the panic, it says like this:
"This panic is raised when any operation that moves or copies data to an 8 bit variant descriptor, causes the length of that descriptor to exceed its maximum length.
It may be caused by any of the copying, appending or formatting member functions and, specifically, by the Insert(), Replace(), Fill(), Fillz() and ZeroTerminate() descriptor member functions. It can also be caused by the SetLength() function."
Thanks for your answer, yucca...but i read the SDK help....
I used debug on the device and i saw that the panic is raised in a Symbian library.
In my function there aren't any kind of error...it's very strange and random error. As said before this erroe comes up when I restart IIS server.