Hi,
I have a class with member variables
CFbsBitmap* iBuffer;
CFbsBitmapDevice* iDevice;
CFbsBitGc* iGc;
In the ConstructL of the class, I do the following:
void CSomeClass::ConstructL()
{
//create the bitmap
iBuffer = new (ELeave) CFbsBitmap();
User::LeaveIfError(iBuffer->Create( Rect().Size(), EColor4K );
//allocate the device
iDevice = CFbsBitmapDevice::NewL(iBuffer);
//ALL FINE UPTO HERE
//allocate the graphics context
User::LeaveIfError(iDevice->CreateContext(iGc));
return;
}
When I run the application with this class through LowMem, I get a KERN-EXEC
3. If i comment out the iGc allocation
ie. User::LeaveIfError(iDevice->CreateContext(iGc));
then I don't get the KERN-EXEC 3, and LowMem shows 0% Test Failed.
The test was carried on a Nokia 3650.
Now, my questions are:
1) Am I missing something in the initialization or is the problem in
CreateContext()?
2) Has anyone else come across such a thing?
3) If the error is in the CreateContext() call, then is this eligible for a
waiver? and if it is, then how do I go about asking for the waiver or
proving it?
Thanks in advance,
Best Regards,
Sameet.
"Sameet" <[email protected]> schreef in bericht
news:PqIHuZAyFHA.2776@extapps30...
> Hi,
>
> I have a class with member variables
> CFbsBitmap* iBuffer;
> CFbsBitmapDevice* iDevice;
> CFbsBitGc* iGc;
>
> In the ConstructL of the class, I do the following:
>
> void CSomeClass::ConstructL()
> {
> //create the bitmap
> iBuffer = new (ELeave) CFbsBitmap();
> User::LeaveIfError(iBuffer->Create( Rect().Size(), EColor4K );
>
> //allocate the device
> iDevice = CFbsBitmapDevice::NewL(iBuffer);
>
> //ALL FINE UPTO HERE
>
> //allocate the graphics context
> User::LeaveIfError(iDevice->CreateContext(iGc));
>
> return;
> }
>
> When I run the application with this class through LowMem, I get a
> KERN-EXEC
> 3. If i comment out the iGc allocation
> ie. User::LeaveIfError(iDevice->CreateContext(iGc));
> then I don't get the KERN-EXEC 3, and LowMem shows 0% Test Failed.
>
> The test was carried on a Nokia 3650.
>
> Now, my questions are:
> 1) Am I missing something in the initialization or is the problem in
> CreateContext()?
> 2) Has anyone else come across such a thing?
> 3) If the error is in the CreateContext() call, then is this eligible for
> a
> waiver? and if it is, then how do I go about asking for the waiver or
> proving it?
What are the types of iDevice and iGc? CFbsBitmapDevice and CFbsBitGc?
I have code looking almost identical, but can't remember having this
crashing. But I haven't tested on a 3650.
--
Sander van der Wal
www.mBrainSoftware.com
Hi,
Thanks for the reply,
>
> What are the types of iDevice and iGc? CFbsBitmapDevice and CFbsBitGc?
>
Yes, they are of the mentioned types.
>
> I have code looking almost identical, but can't remember having this
> crashing. But I haven't tested on a 3650.
>
As I mentioned, when tested the app with the LowMem tool, with the
CreateContext() call enabled, the crash occured. When the call was disabled
in the build, the crash didn't occur and the app got 0% Test Failures. I
wanted to confirm whether the problem was in CreateContext() or there is
something that can be done in my code to solve the problem.
Best Regards,
Sameet.
"Sameet" <[email protected]> schreef in bericht
news:k6K%23iGLyFHA.2520@extapps30...
> Hi,
>
> Thanks for the reply,
>[color=green]
>>
>> What are the types of iDevice and iGc? CFbsBitmapDevice and CFbsBitGc?
>>
> Yes, they are of the mentioned types.
>
>>
>> I have code looking almost identical, but can't remember having this
>> crashing. But I haven't tested on a 3650.
>>
> As I mentioned, when tested the app with the LowMem tool, with the
> CreateContext() call enabled, the crash occured. When the call was
> disabled
> in the build, the crash didn't occur and the app got 0% Test Failures. I
> wanted to confirm whether the problem was in CreateContext() or there is
> something that can be done in my code to solve the problem.[/color]
There is one thing you can investigate, in particular the color depth of the
bitmap. Try setting it to the same color depth as the screen.
Apart from that, there's nothing that is wrong or peculiar with your code
that I can see.
--
Sander van der Wal
www.mBrainSoftware.com
Hi,
> There is one thing you can investigate, in particular the color depth of
the
> bitmap. Try setting it to the same color depth as the screen.
>
I am using iEikonEnv->ScreenDevice()->DisplayMode() as the colour depth.
> Apart from that, there's nothing that is wrong or peculiar with your code
> that I can see.
>
So then, is this a valid case for a waiver? If yes, then how should I go
about asking for the waiver, as in, proving this problem to the test house?
Thanks for the help,
Best Regards,
Sameet.
For applying for waivers see the SymbianSigned website, the entire procedure
is described in detail.
AMK
"Sameet" <[email protected]> wrote in message
news:GKVX8aYyFHA.2212@extapps30...
> Hi,
>[color=green]
>> There is one thing you can investigate, in particular the color depth of
> the
>> bitmap. Try setting it to the same color depth as the screen.
>>
> I am using iEikonEnv->ScreenDevice()->DisplayMode() as the colour depth.
>
>> Apart from that, there's nothing that is wrong or peculiar with your code
>> that I can see.
>>
> So then, is this a valid case for a waiver? If yes, then how should I go
> about asking for the waiver, as in, proving this problem to the test
> house?
>
> Thanks for the help,
>
> Best Regards,
> Sameet.
>
>
>[/color]
So, if the problem only shows in low memory condition why don't you make
sure that you only run your application if enaugh memory is available ...
otherways make a clean exit. You can use LowMem to estimate the minimum
memory level this CreateContext stuff needs.
BR,
Lucian
"Sameet" <[email protected]> wrote in message
news:PqIHuZAyFHA.2776@extapps30...
> Hi,
>
> I have a class with member variables
> CFbsBitmap* iBuffer;
> CFbsBitmapDevice* iDevice;
> CFbsBitGc* iGc;
>
> In the ConstructL of the class, I do the following:
>
> void CSomeClass::ConstructL()
> {
> //create the bitmap
> iBuffer = new (ELeave) CFbsBitmap();
> User::LeaveIfError(iBuffer->Create( Rect().Size(), EColor4K );
>
> //allocate the device
> iDevice = CFbsBitmapDevice::NewL(iBuffer);
>
> //ALL FINE UPTO HERE
>
> //allocate the graphics context
> User::LeaveIfError(iDevice->CreateContext(iGc));
>
> return;
> }
>
> When I run the application with this class through LowMem, I get a
KERN-EXEC
> 3. If i comment out the iGc allocation
> ie. User::LeaveIfError(iDevice->CreateContext(iGc));
> then I don't get the KERN-EXEC 3, and LowMem shows 0% Test Failed.
>
> The test was carried on a Nokia 3650.
>
> Now, my questions are:
> 1) Am I missing something in the initialization or is the problem in
> CreateContext()?
> 2) Has anyone else come across such a thing?
> 3) If the error is in the CreateContext() call, then is this eligible for
a
> waiver? and if it is, then how do I go about asking for the waiver or
> proving it?
>
> Thanks in advance,
>
> Best Regards,
> Sameet.
>
>
"Sameet" <[email protected]> schreef in bericht
news:GKVX8aYyFHA.2212@extapps30...
> Hi,
>[color=green]
>> There is one thing you can investigate, in particular the color depth of
> the
>> bitmap. Try setting it to the same color depth as the screen.
>>
> I am using iEikonEnv->ScreenDevice()->DisplayMode() as the colour depth.
>
>> Apart from that, there's nothing that is wrong or peculiar with your code
>> that I can see.
>>
> So then, is this a valid case for a waiver? If yes, then how should I go
> about asking for the waiver, as in, proving this problem to the test
> house?[/color]
There's a trick you can apply. If you know the size of a CFbsBitGc, you can
allocate and release some memory bigger than a CFbsBitGc, before creating
the GC.
--
Sander van der Wal
www.mBrainSoftware.com
>
> There's a trick you can apply. If you know the size of a CFbsBitGc, you
can
> allocate and release some memory bigger than a CFbsBitGc, before creating
> the GC.
>
Sounds good, will try it out. Thanks for all the help.
Best Regards,
Sameet.