Bug 12516 - Error Message camera-ui: "Not enough memory to save photo"
: Error Message camera-ui: "Not enough memory to save photo"
Status: NEW
Product: Maemo 5 Community SSU
general
: unspecified
: N900 Maemo
: Unspecified minor (vote)
: ---
Assigned To: unassigned
: general
:
:
:
:
  Show dependency tree
 
Reported: 2011-11-29 22:55 UTC by Dario
Modified: 2012-02-24 17:24 UTC (History)
3 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Dario (reporter) 2011-11-29 22:55:01 UTC
SOFTWARE VERSION: 
20.2010.36-2maemo16.8 and 21.2011.38-1Tmaemo1 (maybe)

EXACT STEPS LEADING TO PROBLEM: 
1. Never opened the camera app
2. Install CSSU
3. Open the camera app and try to take a photo

EXPECTED OUTCOME: 
You can take the photo.
ACTUAL OUTCOME: 
Error Message. No photo.

REPRODUCIBILITY: 
always
Comment 1 Andre Klapper maemo.org 2011-11-29 23:04:51 UTC
What is the exact error message? Please always post it in bug reports and be as
specific as possible so somebody can try to reproduce...
Comment 2 Dario (reporter) 2011-11-30 19:31:19 UTC
"Memoria insufficente per salvare la foto", italian, in english something like
"Not enough memory for sove a photo", but the memory is empty
Comment 3 Christian Ratzenhofer 2011-12-02 19:08:03 UTC
on the bottom left of the ui, the button right from the number which indicates
how many pics you can still shoot (probably 0 in your case), try to select
internal storage in the menu that pops up
Comment 4 nicolai 2011-12-03 01:25:54 UTC
Thank you for reporting this bug.
Can you tell me if you use a memory
card, if yes, does it have a VFAT partition
(is it usable with the stock camera-ui)?

I added a fix to camera-ui for better handling
of unwritable memory cards (those without a VFAT
partition).

https://gitorious.org/community-ssu/camera-ui/commit/4f248831329fad85fff68add84e648ddfceeff12
Comment 5 Dario (reporter) 2011-12-03 16:51:32 UTC
I don't have a memory card. Tomorrow I'll try to flash my phone and install the
CSSU to reproduce the bug with a "new" N900.
Comment 6 Ben Morris 2012-01-16 15:47:04 UTC
I have the same problem. It says there is not enough space when I select
internal storage, but is fine with taking photos on the MMC (which has less
free space).

$df -h
Filesystem                Size      Used Available Use% Mounted on
[snip]
/dev/mmcblk0p1           27.0G     20.8G      6.2G  77% /home/user/MyDocs
/dev/mmcblk1p1            1.9G    754.7M      1.1G  40% /media/mmc1
Comment 7 Ben Morris 2012-01-22 22:16:22 UTC
Dario, is $INTERNAL_MMC_MOUNTPOINT or $OSSO_PRODUCT_HARDWARE set on your
device? Do you have a /scratchbox directory on your device?

The problem on my device appears to be that I do not have the
INTERNAL_MMC_MOUNTPOINT environment variable set. Running
"INTERNAL_MMC_MOUNTPOINT=/home/user/MyDocs camera-ui" produces the expected
behaviour (except, of course, that two instances of camera-ui open).

Camera-ui uses that environment variable to locate the internal storage during
free space calculation:
https://gitorious.org/community-ssu/camera-ui/blobs/d5002ed3d7d3b9f1b92817c0bab09d245fef44a0/src/storage-helper.c#line180

and returns 0 free space by default (rather than an error) if the variable is
not set.

As far as I can tell, that variable is supposed to have been set by
/etc/osso-af-init/af-defines.sh:
https://maemo.gitorious.org/fremantle-hildon-desktop/osso-af-startup/blobs/64d387f93f72ff51bc36056c1f1d5a0c4982d03a/services/af-defines.sh#line136

It appears in turn that af-defines.sh is not setting it because
$OSSO_PRODUCT_HARDWARE is not set, because at some point I installed a broken
package from extras-devel which created a /scratchbox dir on my N900, and
af-defines.sh does not run /usr/bin/osso-product-info if such a directory
exists (line 106).

By the way, the exact English error message is "Memory full. Unable to save
contents.". I believe the string comes from GVFS.

P.S. Removing the package owning /scratchbox fixed the problem on my device.
Comment 8 Christian Ratzenhofer 2012-02-24 17:24:07 UTC
While the bug is valid the actual problem resides in af-defines.sh since the
initial problem in camera-ui is fixed already.