Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
darkberry
Posts: 178
Registered: ‎11-19-2008

Strange storage error when testing app on device

I'm programming an aplication that needs to store three images on persistent memory after downloading via HTTP. The images are relatively small png files 32x32 created as Bitmaps and then stored as ARGB int[].

When grouping images with the following code:

 

ObjectGroup.createGroup(image);

 

It throws an ObjectGroupTooBigException with certain images. It only happens with devices, while all goes fine in simulator. According to javadoc, this only occurs if the total size of the group exceeds 64 KB.

Testing it with three similar images (32x32 pixels, 1.37 KB) the exception is not thrown. Then I try replacing one of the images with a bigger one (64x32, but 1.33 KB, less size than others) and the exception is thrown. Testing it with bigger images gives the same result.
I have tested it with several models, including recent devices like Bold.
I can't explain why this happens since the total size of the images is far from 64 KB limit.

 

Please use plain text.
Developer
peter_strange
Posts: 19,526
Registered: ‎07-14-2008

Re: Strange storage error when testing app on device

When you say the images are samll, are you talking abut their size as png files or as ARGB int[];
Please use plain text.
Developer
darkberry
Posts: 178
Registered: ‎11-19-2008

Re: Strange storage error when testing app on device

The app is intended for saving three different images, the first one being an icon while the others are bigger images, for use as banners. However, as the exception was thrown only with these two images, I tryed passing as second and third images two copies of the icon, wich is smaller, to see if it was a problem of size. This way there is no error. They are the same file, so the ARGB array is the same too.
Please use plain text.
Administrator
MSohm
Posts: 14,082
Registered: ‎07-09-2008
My Carrier: Bell

Re: Strange storage error when testing app on device

Can you post the code you are using to store the images and create the group?  What version of BlackBerry handheld software are you testing on?  You can find this under Options, About on the BlackBerry handheld.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.