Archived:MMAPI Camera MIDlet may fail in allocating memory when taking pictures with Nokia N95 (Known Issue)
The MMAPI Camera MIDlet may fail in allocating memory when taking pictures with the Nokia N95.
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:
4. Append the image to the form:
Limit the memory usage by defining the image size to be smaller: