Main camera does not start

Another (maybe completely unrelated but yet to do with camera) observation:

from time to time I felt that my XA2 gets warm even not heavily used, just some browsing and mails open
did not really bother …

But this morning it got warm right after switching on
it was switched off and charged over night
I did my normal mail and browser check, felt it getting warm and shut down apps
then a few hours later I heard this well known sound, checked battery and it was down to 10% after maybe 5h
I checked with top and found the android process consuming 24% CPU

cameras+ 3297 21.1 0.6 153868 16444 ? Sl 01:46 160:33 /vendor/bin/hw/android.hardware.camera.provider@2.4-service

I opened camera app --> black window
switched to selfie mode and back --> cam working
checked with top, normal
temperature went down soon

Bump.

Any news on this?

What can I do to assist in debugging?

1 Like

Well, update to 3.4.0.24 solved this magically…

for the record, on my device (xa2) this is still present on 3.4.0.24

3 Likes

As @enrish I still have the problem with the camera. I have a XA2 (single SIM) with SFOS 3.4.0.24. Yesterday I tried to evoke the error. But it wasn’t possible. But after charging I tried the camera today morning and it didn’t work. So I did what @peterleinchen recomanded (in terminal on the phone):

devel-su -c kill -9 $(ps aux | grep .*android\.hardware.camera.* | tr -s ' ' |  cut -f2 -d' '); killall -r .*camera.*;

I got the error:

kill: sending signal to 22552 failed: No process found
cameraserver(8354): Opteration not permitted
.*camera.*: no process found

But anyway afterwords the camera worked again.

What can I do to fix the camera problem? Or how I can help to solve it?

I wrote above command from memory.
Both kill needs to be executed as root!
So better to do devel-su first and then issue both commands.
As one-liner (updated):
devel-su; kill -9 $(ps aux | grep .*android\.hardware\.camera.* | grep -v grep | tr -s ' ' | cut -f2 -d' ') || kill -9 $(ps aux | grep .*android\.hardware\.camera.* | grep -v grep | tr -s ' ' | cut -f3 -d' '); killall -r .*camera.*; echo done; exit

Good, so android can server is/was the culprit.

No idea, this is up to @Jolla!
(I still believe in bad menory management or misuage from Android side…)

1 Like

Just got this on XA2 Ultra Dual SIM / SFOS 4.3.0.15.

While I was taking pictures, the main (rear) camera suddenly stopped working (black screen, no reaction to shutter button/icon). I rebooted the phone. After that, access to the rear camera disappeared completely and only the front camera was available and set as default (even pressing the “Torch/Flashlight” button was enabling the flash of the front camera). In Advanced Camera only one camera could be selected - the front one. In CSD Tool the rear camera could be selected for test but kept failing (black screen, spinning wheel, no reaction to pressing the shutter button). Multiple reboots didn’t change anything.

Strangely, what did help right away was turning off the Android support, then the main camera became available and normally working. And so far it continues to work, even after a few reboots, and with Alien Dalvik running.

1 Like

I’m late to the party here.

XA2 Plus.

I have been seeing this problem for a very long time, but it never quite bothered me enough to follow-up on it. For me it happens a few times a month. But when it happens, it typically happens a lot.

For a while, switching to the front camera and then back to the rear camera works-around it. But eventually, even that fails.

On a good day, the camera takes 10-60 seconds to start. Although I don’t think that that was the case when the bug first appeared.

A restart usually (always?) fixes it for me.

@ksandom: this bug has been through quite some history already, and it looks like this should now be working okay. The internal bug that was tracked against it has also been marked as resolved since 4.0.1.

Would you mind please creating a new bug describing exactly what the issue is that you’re experiencing? This would be a big help to ensure different issues don’t get mixed together.

In the meantime, I’ve tagged this bug as “fixed”, but if there are strong objections that the original bug as described has not been fixed, then please say.

Hi @flypig, when marking the bug as fixed, please provide root cause and/or fix which was applied so we can track it later if the issue pops back up. A detailed bug report deserves a root cause analysis and fix in my humble opinion

Thank you!

Yes, it is good being able to jump directly to the solution.
As there are hundreds of bug reports, it’s a lot of work. Maybe we should more often ask the OP to mark as solved and eventually edit the 1st post to sum up?

I get that putting together a good bug report isn’t straightforward, and we do our best to respect that effort (we certainly appreciate it). As such I generally do my best to provide feedback, and specifically links to fixing commits, where I can. Unfortunately this isn’t always possible.

In this case, Jolla’s testing team were able to reliably reproduce the bug. Certain potential causes were investigated and ruled out. Over the period of two releases significant changes were made to the camera stack, particularly as it relates to Android App Support. In subsequent testing it wasn’t possible to reproduce the issue.

Are you still experiencing the bug @Swayer?

I’d definitely encourage this, yes.

@flypig This bug is not fixed. Camera and flashlight still work hit-or-miss when Android App Support is enabled.
With it disabled, they work all the time.

Xperia XA2, Sailfish 4.4.

1 Like

Hi @Idesmi, thanks for checking this. Would you mind providing a bit more detail just so I can tally it with our internal bug report (e.g. the steps you go through to reproduce it, the exact outcome that you get), please?

Can you give advice on what evidence migh be useful to collect?

I could reproduce it on a xa2 with 4.4.0.64:

  • have quite full memory (dont know if necessary)
  • open camera app, camera works
  • close camera app
  • open plantnet (android app) and start the camera from there
  • IS camera error popup, SHOULD camera works
  • wait, close apps (actually closed plantnet only i think)
  • start plantnet, open camera in there
  • camera works
  • close plantnet
  • open camera app
  • IS camera black, SHOULD camera works

everything in normal quick succession except the waiting part

It’s really to try to establish whether this is an identical bug (identical behaviour) or a slightly different bug. For example, does the same message ‘Can’t start Camera, please restart your phone’ appear? Is it related to how many browser tabs are open? Do the same workarounds apply? Anything that gives an indication.

I appreciate it sounds like I’m being picky: I’m not suggesting there’s no bug here, but all this info is helpful in diagnosing the problem, and therefore makes it easier to fix.

Yes, this already helpful, thank you. Do you get the same for WhatsApp using the same steps as the OP?

1 Like

Yes, I get the same results as the OP, as soon as I free memory the camera works again.

I cant try the switch camera workaround however, because when the front camera is black, there is no button for this

1 Like

@flypig the camera error was not tied to open browser tabs, that was just the way I picked, to fill up memory to reproduce it for you guys. What Thigg has posted seems similar to what I saw, and having less than 2GB (1.4Gb, 1.6Gb) of phone memory seemed to ‘help?’ reproduce the issue.

1 Like

@flypig Sorry for the slow reply. I see that the conversation has progressed in a healthy way :slight_smile:

It’s been a while since I’ve seen this exact issue, although it feels significantly more recent than 4.0.1 [, but I could be wrong]. - I run a lot of patches, so I’m typically a month or two behind the latest.

I’m currently on 4.3. I’ll look again to see if 4.4 is now viable for me.

[edit: Also, thank you very much for all the effort that you and team are putting into keeping Sailfish alive.]

1 Like