This site is no longer active and is available for archival purposes only. Registration and login is disabled.

GapiDraw 3.5 Bug - Creating Surface in Symbian Thread


GapiDraw 3.5 Bug - Creating Surface in Symbian Thread

Postby Dynz » May 27, 2005 @ 10:23am

Dynz
 


Postby Guest » Jun 5, 2005 @ 12:17pm

Guest
 


Postby Dynz » Jun 9, 2005 @ 10:43am

I have tried creating a surface in a thread using mbm file as follows

void CMyApplication::StartAppThreadFunctionL(TAny* aParam) {
CMyApplication *engine = static_cast<CMyApplication*>(aParam);

_TCHAR szPath[MAX_PATH];
_tcscpy(szPath,_T("E:\\Images\\Library\\1.mbm"));

engine->gsBigThumbnail = new CGapiSurface(engine->m_pGapiDraw);
HRESULT hr = E_FAIL;
hr = engine->gsBigThumbnail->CreateSurface(GDSURFACE_SYSTEMMEMORY, szPath,0); ...
}


When I try to access the engine->gsBigThumbnail in my main process as shown below the program crashes.

hr = pSurface->BltFast(10, 10, gsBigThumbnail, NULL, GDBLTFAST_KEYSRC, NULL);


If I initialise gsBigThumbnail = new CGapiSurface(m_pGapiDraw); in the main process then the line above doesn't crash but returns err GDERR_NOTINITIALIZED. In the thread the CreateSurface returns GD_OK, so I'm assuming it is created fine.

My thread is created as follows:

TInt res = KErrNone;
User::LeaveIfError( res = ProcessPhotos.Create( _L("ProcessPhotos") ,CMyApplication::StartAppThreadFunction, 16384,1024*1024,1024*1024,this)); ProcessPhotos.SetPriority(EPriorityNormal);
ProcessPhotos.Resume();

TInt CMyApplication::StartAppThreadFunction(TAny* aParam) {
CTrapCleanup * cleanup = CTrapCleanup::New();
TInt err;
if( cleanup == NULL )
{
err = KErrNoMemory;
}
else
{
TRAP( err, StartAppThreadFunctionL(aParam) );
}
delete cleanup;
return err;
}

Please advise
Dynz
 


ErrRd works this way

Postby none » Sep 13, 2005 @ 9:10am

none
 


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron