[XA2 Plus][4.4.0.68] Main Camera not working

REPRODUCIBILITY: 100%
OS VERSION: 4.4.0.68
HARDWARE: XA2+
UI LANGUAGE: german
REGRESSION:

DESCRIPTION:

Main camera is not working. When starting Camera App front camera shows a preview. I can do pics of myself… Switching to main camera is not possible - it shows the preview of the front camera.
Using Advanced Camera App I can switch to main camera - preview stays black an resolution is shown as “320x240”. After a few seconds the app switches back to front camera.

Using Alien Dalvik main camera is working with all apps which uses the camera.

PRECONDITIONS:

Problem occurred when the devices had run off battery (ca 2%) and did a “emergency” switch off.

STEPS TO REPRODUCE:

EXPECTED RESULT:

Main camera is working.

ACTUAL RESULT:

MODIFICATIONS:

ADDITIONAL INFORMATION:

1 Like

I think this is a regression from previous versions and happens as well on my XA2+ since 4.4.0.(68?).
As far as I observed it this is a conflict with Android apps accessing the app.

When this happens I can switch to Signal messenger open the camera, main camera gives me a black frame, toggle to front camera until I see my face and toggle back to main camera. This, in general, reactivates camera, also for native apps. Unfortunately only for a very short period.

1 Like

Thank you for that advice. But it does not solve the problem. I did toggeling the camera in Android apps. Native apps doesn’t work after that. Even switching off Android support did not help. Maybe I consider de/re-install Android support. I tell if it helps.

1 Like

You could try to start jolla-camera from command line and see what it has to say. I don’t know about debug flags, but IIRC it’s quite verbose already.

Actually, yesterday my method to toggle cameras in Android app didn’t work with OpenCamera and neither with WhatsApp, but always with Signal messenger.
Before you uninstall Android, try to disable automatic launch at boot, restart your phone and observer whether this helps.

Thank you for your help…

Called from command line it says:

[D] unknown:0 - Using Wayland-EGL
[W] unknown:20 - file:///usr/lib/qt5/qml/com/jolla/camera/settings/CameraDeviceToggle.qml:20: TypeError: Cannot read property ‘length’ of undefined
[D] onCompleted:105 - ViewPlaceholder requires a SilicaFlickable parent
corrupted double-linked list

Line 20 in CameraDeviceToggle.qml says:

readonly property bool _supportNotEnabled: model.length > 1 && labels.length === 0

properties ared defined in line 8,9:

property var labels: []
property alias model: repeater.model

It looks like this bug report: [4.3.0.12] Jolla camera (also torch) does not start at all - as well as videos do not play

If yes, then apply this solution.

Actually Android / AlienDalvik does make a change. If I have AlienDalvik running native camera (often) fails. Stopping AlienDalvik makes camera work again.

This is my output with AlienDalvik running and non working camera, actually there’s a crash when I close the camera app with swipe down

[nemo@xa2 ~]$ jolla-camera
[D] unknown:0 - Using Wayland-EGL
[D] unknown:0 - Geoclue client path: "/org/freedesktop/Geoclue/Master/client134"
[W] unknown:20 - file:///usr/lib/qt5/qml/com/jolla/camera/settings/CameraDeviceToggle.qml:20: TypeError: Cannot read property 'length' of undefined
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
[W] unknown:0 - CameraBin error: "Could not initialize supporting library."
corrupted double-linked list
Aborted (core dumped)

This is after I stop AlienDalvik and camera starts working without any other interaction:

[nemo@xa2 ~]$ jolla-camera
[D] unknown:0 - Using Wayland-EGL
[D] unknown:0 - Geoclue client path: "/org/freedesktop/Geoclue/Master/client135"
[W] unknown:20 - file:///usr/lib/qt5/qml/com/jolla/camera/settings/CameraDeviceToggle.qml:20: TypeError: Cannot read property 'length' of undefined
[D] onCompleted:105 - ViewPlaceholder requires a SilicaFlickable parent
corrupted double-linked list
Aborted (core dumped)

I have sometimes similar problems ~ and seems that it is somehow related to available memory.

In my case what helps when the XA2 Ultra rear camera stops working is giving a few quite strong taps with a finger to the glass covering the camera lens. Whatever causes it (apparently the lens somehow gets stuck sometimes), it always works for me. Try it, why not.

1 Like

Actually, that rings some faint bells and whistles… Signal was quite keen on reserving the camera, for whatever reason that is. I couldn’t reproduce it on my Android device. (Perhaps it doesn’t correctly release the camera, or something.) You could try disabling the camera permission from the Signal app (Settings > Apps > Signal > Open Android Settings) and rebooting the phone.

2 Likes

Sorry neither stopping Alien Dalvik nor booting without Alien Dalvik Support solves the problem.

Does not work. On the other hand, main camera works with Android apps. So it should be no mechanical problem.

Actually there ist about 5GB userdata und about 550MB systemdata left. In my eyes this is OK. What should be considered as enough?

Let me please point to the console output of jolla-camera instruction. I see there 2 main things. There is a problem with toggling… (CameraDeviceToggle.qml). Line 20 blames a property which is undefined or even null. Because there is no null check before, the property is expected not to be null. I think it is property model alias repeater.model. As I am not familar with that stuff correct me please when I am wrong. Help is very welcome.

2 Likes

I mean RAM…sorry …

After Reboot, boot without Alien Dalvik there is about 2GB Ram free. No, it does not solve the problem.

The error isn’t the line itself; if model is null here, there’s a problem elsewhere “before” that. IIUC model contains the available cameras (or back cameras), so the detection of the cameras has failed already.

Have you tried to select different settings in Settings > Apps > Camera? Just setting them to something else and back again can fix some configuration issues.

Another thing that I could think of is some files being corrupted. You could try re-installing some packages to replace any corrupted files (this is a partial list of dependencies of jolla-camera):

pkcon install --allow-reinstall gstreamer1.0-plugins-bad gstreamer1.0-plugins-good jolla-camera-lockscreen jolla-camera-settings nemo-qml-plugin-configuration-qt5 nemo-qml-plugin-dbus-qt5 nemo-qml-plugin-policy-qt5 nemo-qml-plugin-systemsettings qr-filter-qml-plugin qt5-qtdeclarative-import-models2 qt5-qtdeclarative-import-multimedia qt5-qtdeclarative-import-positioning qt5-qtdeclarative-import-sensors qt5-qtmultimedia-plugin-mediaservice-gstcamerabin qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer sailfish-components-gallery-qt5 sailfish-components-media-qt5

I just did this with my Xperia 10 II, and it survived :sweat_smile: Well, at least Camera and Advanced Camera still work on Sailfish side, and OpenCamera on the Android side. Reinstalling packages should not be able to break anything, but treat this as a software update, and make backups as necessary.

1 Like

After running the commands described in the other thread it didn’t make any (visible) changes nor install/update any packages, however my camera works since then. Hope it will stay this way.

2 Likes

@jollajo, from what you’ve written it’s unclear to me (as I think it might be to you too) whether or not this is a duplicate of the camera bug @pherjung flagged up.

Would you be able to report back and let us know whether it recurs or not, please? If it does recur, then that would suggest something else is happening.