Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:MMAPI Camera MIDlet may fail in allocating memory when taking pictures with Nokia N95 (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Tested with
Devices(s): Nokia N95
Compatibility
Platform(s):
S60 3rd Edition FP1
Article
Created: User:Technical writer 1 (14 Nov 2007)
Last edited: hamishwillee (16 Aug 2013)

Contents

Overview

The MMAPI Camera MIDlet may fail in allocating memory when taking pictures with the Nokia N95.


Description

The Camera MIDlet may fail in allocating memory for taking pictures with the Nokia N95. This applies especially when creating a default image out of byte data and adding the created image to a Form. Failure results in the MIDlet throwing an exception and, usually after launching the MIDlet a couple of times, the application hanging (instead of throwing an exception message) when memory runs out.

How to reproduce

1. Create a Player with the capture string:

Player player = Manager.createPlayer("capture://video")

2.Take a picture with the default values:

byte[] data = videoControl.getSnapshot(null)

3. Create an Image by using the byte array:

Image image = Image.createImage(data, 0, data.length)

4. Append the image to the form:

form.append(image)


Solution

Limit the memory usage by defining the image size to be smaller:

videoControl.getSnapshot("encoding=png&width=320&height=240")
This page was last modified on 16 August 2013, at 06:56.
140 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×