Camera (Dev Preview) app crashing

So:

  1. You open the terminal
  2. You run the millipixels command
  3. You close the window using phosh
  4. You run the millipixels command
  5. You receive this log: Camera (Dev Preview) app crashing

Is that right?

1 Like

Yes, this is right.

Do you see aything camera-related in dmesg when that happens?
Does this happen every time you try?

Iā€™ve got today afternoon this output as well:

[0:43:41.565239608] [3527]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0
[0:43:41.578035042] [3531] ERROR SimplePipeline simple.cpp:1292 No sensor found
No such camera: /base/soc@0/bus@30800000/i2c@30a50000/camera@2dinvalid

But when I tried to collect sudo dmesg | grep s5k3l6xx or 3-002d or hi846 or 2-0020 or mipi-csi2 I was unsuccessful while copy/paste ā€¦, anyway main message was: Consider updating driver s5k3l6xx to match on endpoints or Consider updating driver hi846 to match on endpoints. Iā€™ve got i2c messages there as well.

In short if two Terminal windows used it is possible to reproduce here related crash output as well (and hope this helps you somewhat):


P.S. I do not mind testing above with another firmware (when available).

This is causing the same message, but for different reasons. But it suggests that your original error is the device being busy when it shouldnā€™t.

1 Like

I can see two instances of Millipixels on that screenshot, so Iā€™m not sure whether it really shouldnā€™t be busy.

Never mind, i fixed this baby bug myself.

I installed millipixels_0.21.0-1+librem5ci80262.90b35e4_arm64.deb and rebooted.

Millipixels will open only if I have the camera switch off.

Could you post the log when the switch is on?

Yeah, this screenshot canā€™t come from the original error report for which I reconstructed the steps, because that one closes the program.

I did load the second deb file as well.

With the switches on:

purism@pureos:~$ millipixels
Found config file at /usr/share/millipixels/config/purism,librem5r4.ini
Adding camera big from config
matched GRBG8 to GRBG8 3
matched GRBG8 to GRBG8 3
Adding camera selfie from config
matched GBRG16 to GBRG16 14
matched GBRG16 to GBRG16 14
Found postprocessor script at /usr/share/millipixels/movie.sh
Found postprocessor script at /usr/share/millipixels/postprocess.sh
No such path: Os { code: 2, kind: NotFound, message: "No such file or directory" }
mp_device_list_find_remove imx7-csi s5k3l6xx 3-002d
18: there's csi, looking for s5k3l6xx 3-002d
18: there's csi capture, looking for s5k3l6xx 3-002d
18: there's imx8mq-mipi-csi2 30a70000.csi, looking for s5k3l6xx 3-002d
18: there's hi846 2-0020, looking for s5k3l6xx 3-002d
17: there's csi, looking for s5k3l6xx 3-002d
17: there's csi capture, looking for s5k3l6xx 3-002d
17: there's imx8mq-mipi-csi2 30b60000.csi, looking for s5k3l6xx 3-002d
17: there's s5k3l6xx 3-002d, looking for s5k3l6xx 3-002d
found!
devname /dev/video1
17: there's csi, looking for s5k3l6xx 3-002d
17: there's csi capture, looking for s5k3l6xx 3-002d
17: there's imx8mq-mipi-csi2 30b60000.csi, looking for s5k3l6xx 3-002d
17: there's s5k3l6xx 3-002d, looking for s5k3l6xx 3-002d
found!
linking flags 0 source 15:0 sink 10:0
MPDevice: MEDIA_IOC_SETUP_LINK error 22, Invalid argument
Segmentation fault
1 Like

Yes, as @dos kindly noted in his post here this was reason that I made related screenshot, yet I cannot recall that Iā€™ve had two instances of Camera app open during very first crash (likely, as I lost some time to get there, but I couldnā€™t). Anyway, probability that another instance of Camera was open (but I didnā€™t catch this) is very, very high and therefore I think that Terminal app should have some kind of awareness, like when typing into second opened Terminal CLI nautilus (works without any message, while flips to the currently opened instance, just fine behavior) and in particular firefox-esr:

@dcz, please note (as cannot find another here related crash issue describing approach) that that it is not about above screenshot, as it is about Terminal awareness on which apps are indeed open.

EDIT: @datagram40, there might be slight chance that Camera actually works when power supply connected? Sorry if bothering, yet wish you success in solving this issue of yours.

Do you mean that millipixels opens only when you have the lowest HKS (opposite side at the Volāˆ’ height) in upper position?

Please run gdb millipixels

then enter ā€œrā€ in the terminal

once it crashes, enter ā€œbtā€.

This is why I ask for accurate instructions for reproducing an error. If itā€™s reproducible, donā€™t write from memory. Write out the numbered steps you did. This saves a lot of confusion. Only if itā€™s not easily reproducible, then write out what you remember, but also say that you canā€™t reproduce it.

2 Likes

@dcz, thanks for your understanding! Understanding of that Iā€™m actually another simple user (and not even projecting to become decent/knowledgeable developer some day, just too late for myself). I was kind of lost yesterday, thatā€™s all, but you kindly and anyway didnā€™t mind to help me get out of this situation.

1 Like

It looks to me like phosh isnā€™t fully closing out the camera, since killing it from the terminal seems to not cause the issue but swiping the app away does.

@Quarnero to confirm, can you open Millipixels normally, then kill it using the terminal (killall millipixels), then open it normally again and see what happens?

1 Like

I was asking me and investigating what was blowing up my files /var/log/messages and /var/log/syslog. Normally they contain per day between 10 and 10000 lines, but on January 17 after 3pm to 4pm they contain 7126487 lines and all of the same message:

Jan 17 15:58:25 pureos sm.puri.Phosh.desktop[151155]: MPCamera: VIDIOC_DQBUF error 22, Invalid argument

see:

fgrep 'MPCamera: VIDIOC_DQBUF error 22, Invalid argument' syslog | wc -l
7126487

I vaguely remember that I shoot a photo which was never saved to ~/Pictures and I had to kill the process millipixel.

Should I file a bug issue or is this know?

1 Like

@Gavaudan, I can confirm that killall millipixels is my favorite command, at least for today. This command closes normaly opened millipixels indeed. And as I thought that Camera can be opened normally again and again I got this (yesterday I have had the same screen but as I couldnā€™t make screenshot and wasnā€™t much focused I just skipped this):


Now and after closing above, let me try to get this screen again (this might take another hour, as I just came back). Iā€™ll try to reproduce this again, so I can try to explain how I got there.

EDIT: Iā€™ve opened millipixels with touch. Afterwards Iā€™ve run millipixels within Terminal (and got: Selected camera is not available. Is it turned on? screen/window, second one besides having Camera already opened, as Iā€™ve posted the same ā€œtwinsā€ screenshot yesterday) and when tried to close it got above Some commands are still running warning, by trying to slide away this Terminal window, where millipixels command was running.

Meaning also that when Camera already opened with touch and executing afterwards millipixels within CLI that after closing (swapping away) ā€œIs it turned on?ā€ screen Iā€™ve got (and still able to reproduce) crash output within Terminal window.

@dcz, Iā€™ve just tried to redo my homework well (while I still like your Camera), and this time hope that this post serves the purpose (not that Iā€™m 100% sure as again not 100% focused)? Also, until yesterday I was not accustomed to get such errors (whatever I execute as first ā€¦ and is already opened ā€¦, meaning when I run something once and forget that this app is running in the background my OS should let me know this, serves myself well, Iā€™m quite sure, if not old :zipper_mouth_face:, or both).

@Gavaudan, killall millipixels closes both related windows (from second Terminal window) with Terminated:

Ctrl+C closes just the Is it turned on? window. Iā€™ve got few of them too (by executing within few Terminal windows millipixels but actually crushing it, not running it):

Ctrl+C closes the terminal, but since you started the Millipixels process from within the terminal, the terminal is now the parent process of Millipixels. If you kill a parent process, you kill its children, so what youā€™re experiencing is expected behavior in that regard.

Also (if it isnā€™t already clear) if you open Millipixels from phosh and then attempt to open it again from the terminal, you are expected (I should think) to get the error that the camera is not available, since itā€™s actively being used by the first Millipixels.

1 Like