[AC-842] Camera Crashes on BB (Blackberry) after take photo if called from View generated by Alloy
GitHub Issue
n/a
Type
Bug
Priority
n/a
Status
Resolved
Resolution
Invalid
Resolution Date
2015-09-15T07:27:09.000+0000
Affected Version/s
n/a
Fix Version/s
n/a
Components
n/a
Labels
TBR, alloy, bb, blackberry, camera, crashes
Reporter
Abdel Bolanos Martinez
Assignee
Shak Hossain
Created
2014-09-05T19:54:03.000+0000
Updated
2016-03-08T07:37:07.000+0000
Description
I redo this issue based on a deeper tracking that I have been doing, so I notice after a lot of tests (compiling titanium_mobile_blackberry) that the issue is not coming from here. In my project I use Alloy and I notice that if I call the camera from view generated by alloy the camera crashes after take a picture.
here is part how to replicate:
1) have a simple view .xml like this simple.xml
2) create the controller for this view like simple.js
function showCamera(e){
Titanium.Media.showCamera({
saveToPhotoGallery : true,
mediaTypes : Titanium.Media.MEDIA_TYPE_PHOTO,
success : function(image) {
}
});
}
3) Now invoke the controller
$.navGroup = Ti.UI.createNavigationGroup();
$.navGroup.setRootWindow(otherWindow);
$.navGroup.open();
var newWindow = Ti.UI.createWindow({});
var newView = Alloy.createController('simple').getView();
$.currentView = newView;
newWindow.add(newView);
$.navGroup.push(newWindow);
After this if you trigger the event that call showCamera the app crashes only in blackberry
After take a photo on a BB (Blackberry) Z10 the app crashes, here is some info:
I manage to debug this from Momentics IDE and here is the crash
Thread [1] (STOPPED) (Suspended : Signal : SIGSEGV:Segmentation fault)
v8::internal::Object::Lookup() at 0x820f774
v8::internal::Object::GetPropertyWithReceiver() at 0x821080e
v8::internal::Runtime::GetObjectProperty() at 0x8251076
v8::internal::GetProperty() at 0x81a5040
v8::Object::Get() at 0x8168d6a
titanium::CallV8ObjectProperty() at 0x809bb3e
titanium::CameraInvocation::cameraCardDone() at 0x8124c6a
0x7a93895e
0x7a93895e
I have read part of the source code of titanium_mobile_blackberry and for some reason that I cant find is like the photo is been taken but when v8 has to call the javascript callback the segmentation happen.
I have attached a test case that you can try to see the error, create an alloy project and copy/paste the folders in the zip file.
No comments