PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Symbian Creating Surfaces in a Thread, Won't Work !

Hi,

I'm trying to create a surface from a file into an RThread ..
Code:
((CMyApplication*)aParam)->m_ipaq->CreateSurface(GDSURFACE_SYSTEMMEMORY, _T("Sample.png")));

but the program gets an error
E32USER-CABSE 69
(This panic is raised if no trap handler has been installed. In practice, this occurs if CTrapCleanup::New() has not been called before using the cleanup stack.
)
I solved this problem by doing this:
Code:
CTrapCleanup *cleanup=CTrapCleanup::New();
if(cleanup)
{
TRAP(err,((CMyApplication*)aParam)->m_ipaq->CreateSurface(GDSURFACE_SYSTEMMEMORY, _T("Sample.png")));
TRAP(err,((CMyApplication*)aParam)->m_ipaq->SetColorKey(RGB(255,0,255)));
delete cleanup;
}

but the program gets another error
E32USER-CABSE 44
This panic is raised by the Start(), Stop() and Add() member functions of an active scheduler, a CActiveScheduler. It is caused by attempting to start or stop an active scheduler or by attempting to add an active object, a CActive, to the active scheduler.


Johan, please advice .. I'm using the latest GD 35C

Thanks in advance