Taking a picture from the camera fails 20% of the time
===

    var camera = {
        		settings : {
            		quality				: 50, 
            		targetWidth 		: 1024,
            		targetHeight 		: 1024,
            		correctOrientation	: true
    			}
        	};
        	
        	var error = function(message) {
        		alert("Error happened while trying to get a picture", message);
        	};
    
        	document.addEventListener("deviceready", function() {
        		
        		camera.toFile = function() {
        			this.settings.destinationType = navigator.camera.DestinationType.FILE_URI; 
        			return this;
        		},
        		camera.toBase64 = function() {
        			this.settings.destinationType = navigator.camera.DestinationType.DATA_URL;    
        			return this;
        		},
        		
        		camera.fromCamera = function() {
        			this.settings.sourceType = navigator.camera.PictureSourceType.CAMERA;
        			return this;
        		};
        		
        		camera.fromLibrary = function() {
        			this.settings.sourceType = navigator.camera.PictureSourceType.PHOTOLIBRARY;
        			return this;
        		};
        		
        		camera.fromPhotoAlbum = function() {
        			this.settings.sourceType = navigator.camera.PictureSourceType.SAVEDPHOTOALBUM;
        			return this;
        		}
        		
        		camera.get  = function(callback) {
        			navigator.camera.getPicture(function(data) {
        				alert("taking a picture successful");
        				callback(data);
        			}, error, camera.settings);
     
        		};
    
        	}, false);
        	

That is my small wrapper for the camera. And I call it like this:

	camera.fromPhotoAlbum().toBase64().get(function(base64){});

And about 20% of the time, the "alert("taking a picture successful");" is never called, while no error is shown. If I cancel taking a picture, an alert with the message "Error happened while trying to get a picture" is shown, so the error callback works. 

Basically nothing happens. I'm running CM9, one of the latest daily releases, could this be the cause? 

