[Moto G 4G Android Development] zeus_5:
I have been running the OP's build for about a week now. The OP says the camera works and although that was technically true in the first couple of days - it did work albeit inconsistently - today it seemed to stop working altogether.

The stock camera app that comes with the ROM stops right after it's launched. Trying to use the camera from other apps (WhatsApp, Signal, Discord) doesn't work either.

The following log is me clicking on the camera app icon, waiting for it to launch + crash and repeating.

09-15 05:10:22.125 577 596 W ActivityManager: Activity pause timeout for ActivityRecord{8b26283 u0 com.android.camera2/com.android.camera.CameraLauncher t266 f}
09-15 05:10:22.162 1660 1832 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
09-15 05:10:22.171 1702 1710 W System : A resource failed to call close.
09-15 05:10:22.171 1702 1710 W System : A resource failed to call close.
09-15 05:10:22.178 1660 1832 D vndksupport: Loading /vendor/lib/hw/gralloc.msm8226.so from current namespace instead of sphal namespace.
09-15 05:10:22.913 577 586 I system_server: NativeAlloc concurrent copying GC freed 28671(1729KB) AllocSpace objects, 15(620KB) LOS objects, 42% free, 11MB/19MB, paused 173us total 281.067ms
09-15 05:10:22.962 577 1655 W ActivityManager: Force finishing activity com.android.camera2/com.android.camera.CameraLauncher
09-15 05:10:22.980 577 1655 I ActivityManager: Killing 8337:com.android.camera2/u0a63 (adj 900): crash
09-15 05:10:22.984 577 599 W libprocessgroup: kill(-8337, 9) failed: No such process
09-15 05:10:22.997 294 378 W SurfaceFlinger: Attempting to destroy on removed layer: AppWindowToken{12f4c39 token=Token{24a0c00 ActivityRecord{8b26283 u0 com.android.camera2/com.android.camera.CameraLauncher t266}}}#0
09-15 05:10:22.997 294 378 W SurfaceFlinger: Attempting to destroy on removed layer: 16eec8c com.android.camera2/com.android.camera.CameraLauncher#0
09-15 05:10:22.997 294 378 W SurfaceFlinger: Attempting to destroy on removed layer: Task=266#0
09-15 05:10:23.013 577 4913 D OpenGLRenderer: endAllActiveAnimators on 0x95a90b80 (RippleDrawable) with handle 0x94a6a880
09-15 05:10:23.029 577 599 W libprocessgroup: kill(-8337, 9) failed: No such process
09-15 05:10:23.050 577 619 W ActivityManager: setHasOverlayUi called on unknown pid: 8337
09-15 05:10:23.073 242 242 I Zygote : Process 8337 exited due to signal (9)
09-15 05:10:23.074 577 599 W libprocessgroup: kill(-8337, 9) failed: No such process
09-15 05:10:23.074 577 599 I libprocessgroup: Successfully killed process cgroup uid 10063 pid 8337 in 89ms
09-15 05:10:23.189 294 378 W SurfaceFlinger: Attempting to set client state on removed layer: Dim Layer for - mAboveAppWindowsContainers#0
09-15 05:10:23.189 294 378 W SurfaceFlinger: Attempting to destroy on removed layer: Dim Layer for - mAboveAppWindowsContainers#0
09-15 05:10:23.195 294 378 W SurfaceFlinger: Attempting to destroy on removed layer: 380b97 Application Error: com.android.camera2#0
09-15 05:10:23.819 941 941 I InputDispatcher: type=1400 audit(0.0:842): avc: denied { call } for uid=1000 scontext=u:r:system_server:s0 tcontext=u:r:init:s0 tclass=binder permissive=1
09-15 05:10:23.982 577 1104 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.android.camera2 cmp=com.android.camera2/com.android.camera.CameraLauncher bnds=[549,1020][675,1180]} from uid 10004
09-15 05:10:24.075 577 598 I ActivityManager: Start proc 8425:com.android.camera2/u0a63 for activity com.android.camera2/com.android.camera.CameraLauncher
09-15 05:10:24.083 8425 8425 I Zygote : seccomp disabled by setenforce 0
09-15 05:10:24.100 8425 8425 E android.camera: Not starting debugger since process cannot load the jdwp agent.
09-15 05:10:24.284 8425 8425 W SoundPool: Use of stream types is deprecated for operations other than volume control
09-15 05:10:24.284 8425 8425 W SoundPool: See the documentation of SoundPool() for what to use instead with android.media.AudioAttributes to qualify your playback use case
09-15 05:10:24.285 8425 8425 I CAM_OneCamFtrCnfgCrtr: CaptureModule? true
09-15 05:10:24.338 8425 8425 D OpenGLRenderer: Skia GL Pipeline
09-15 05:10:24.358 8425 8425 W CAM_Log : Tag RoundedThumbnailView is 1 chars longer than limit.
09-15 05:10:24.515 8425 8425 I CAM_Profiler: [250.135ms][ui] GUARD: CameraActivity.onCreateTasks - [199.215ms] setContentView()
09-15 05:10:24.531 8425 8425 I CAM_Profiler: [266.812ms][ui] GUARD: CameraActivity.onCreateTasks - [16.677ms] Configure Camera UI
09-15 05:10:24.545 8425 8451 W CAM2PORT_AndCamAgntImp: Releasing camera without any camera opened.
09-15 05:10:24.564 8425 8425 I CameraManagerGlobal: Connecting to camera service
09-15 05:10:24.612 8425 8425 W SoundPool: Use of stream types is deprecated for operations other than volume control
09-15 05:10:24.612 8425 8425 W SoundPool: See the documentation of SoundPool() for what to use instead with android.media.AudioAttributes to qualify your playback use case
09-15 05:10:24.617 8425 8425 E SoundPool: error loading /product/media/audio/ui/camera_click.ogg
09-15 05:10:24.618 8425 8425 I CAM_Profiler: [ 57.864ms][ui] GUARD: CaptureModule.init - STOP
09-15 05:10:24.618 8425 8425 I CAM_Profiler: [353.361ms][ui] GUARD: CameraActivity.onCreateTasks - [58.561ms] Init CurrentModule
09-15 05:10:24.624 8425 8425 V NFC : this device does not have NFC support
09-15 05:10:24.631 8425 8425 I CAM_Profiler: [366.349ms][ui] GUARD: CameraActivity.onCreateTasks - STOP
09-15 05:10:24.660 1660 1660 W LauncherTransition: Failed to animate, surface got destroyed.
09-15 05:10:24.671 8425 8463 I OMXClient: IOmx service obtained
09-15 05:10:24.672 8425 8464 I OMXClient: IOmx service obtained
09-15 05:10:24.678 380 477 I OMXMaster: makeComponentInstance(OMX.google.vorbis.decoder) in <unknown> process
09-15 05:10:24.680 380 1404 I OMXMaster: makeComponentInstance(OMX.google.vorbis.decoder) in <unknown> process
09-15 05:10:24.698 253 253 W AshmemAllocator: ashmem_create_region(32768) returning hidl_memory(0xb5d96170, 32768)
09-15 05:10:24.727 253 253 I chatty : uid=1000(system) /system/bin/hw/android.hidl.allocator@1.0-service identical 4 lines
09-15 05:10:24.727 253 253 W AshmemAllocator: ashmem_create_region(32768) returning hidl_memory(0xb5d96170, 32768)
09-15 05:10:24.730 8425 8425 I CAM_Profiler: [ 34.798ms][ui] GUARD: CaptureModule.resume - STOP
09-15 05:10:24.730 8425 8425 I CAM_Profiler: [ 79.254ms][ui] GUARD: CameraActivity.resume - [35.543ms] mCurrentModule.resume
09-15 05:10:24.731 8425 8425 I CAM_Profiler: [ 79.783ms][ui] GUARD: CameraActivity.resume - STOP
09-15 05:10:24.731 253 253 W AshmemAllocator: ashmem_create_region(32768) returning hidl_memory(0xb5d96170, 32768)
09-15 05:10:24.771 253 253 I chatty : uid=1000(system) /system/bin/hw/android.hidl.allocator@1.0-service identical 12 lines
09-15 05:10:24.771 253 253 W AshmemAllocator: ashmem_create_region(32768) returning hidl_memory(0xb5d96170, 32768)
09-15 05:10:24.801 8425 8471 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I741a3d36ca)
09-15 05:10:24.801 8425 8471 I Adreno-EGL: OpenGL ES Shader Compiler Version: E031.29.00.00
09-15 05:10:24.801 8425 8471 I Adreno-EGL: Build Date: 04/04/16 Mon
09-15 05:10:24.801 8425 8471 I Adreno-EGL: Local Branch: mybranch19053788
09-15 05:10:24.801 8425 8471 I Adreno-EGL: Remote Branch: quic/LA.BF.1.1.3_rb1.12
09-15 05:10:24.801 8425 8471 I Adreno-EGL: Local Patches: NONE
09-15 05:10:24.801 8425 8471 I Adreno-EGL: Reconstruct Branch: NOTHING
09-15 05:10:24.809 8425 8471 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
09-15 05:10:24.809 8425 8471 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
09-15 05:10:24.809 8425 8471 I OpenGLRenderer: Initialized EGL, version 1.4
09-15 05:10:24.809 8425 8471 D OpenGLRenderer: Swap behavior 1
09-15 05:10:24.826 8425 8471 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
09-15 05:10:24.839 8425 8471 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
09-15 05:10:24.844 8425 8471 D vndksupport: Loading /vendor/lib/hw/gralloc.msm8226.so from current namespace instead of sphal namespace.
09-15 05:10:24.892 8425 8425 I CAM_FocusRingView: Computing center via view bounds.
09-15 05:10:24.933 8425 8473 I OMXClient: IOmx service obtained
09-15 05:10:24.933 380 477 I OMXMaster: makeComponentInstance(OMX.google.vorbis.decoder) in <unknown> process
09-15 05:10:24.942 253 253 W AshmemAllocator: ashmem_create_region(32768) returning hidl_memory(0xb5d96170, 32768)
09-15 05:10:24.942 8425 8473 E ACodec : hidl's AshmemAllocator failed at the transport: Status(EX_TRANSACTION_FAILED): 'FAILED_TRANSACTION: '
09-15 05:10:24.943 8425 8473 E ACodec : Failed to allocate buffers after transitioning to IDLE state (error 0xfffffff4)
09-15 05:10:24.943 8425 8473 E ACodec : signalError(omxError 0x80001001, internalError -12)
09-15 05:10:24.943 8425 8473 E MediaCodec: Codec reported err 0xfffffff4, actionCode 0, while in state 5
09-15 05:10:24.944 8425 8473 W AHierarchicalStateMachine: Warning message AMessage(what = 'omxI') = {
09-15 05:10:24.944 8425 8473 W AHierarchicalStateMachine: int32_t type = 0
09-15 05:10:24.944 8425 8473 W AHierarchicalStateMachine: int32_t event = 0
09-15 05:10:24.944 8425 8473 W AHierarchicalStateMachine: int32_t data1 = 0
09-15 05:10:24.944 8425 8473 W AHierarchicalStateMachine: int32_t data2 = 1
09-15 05:10:24.944 8425 8473 W AHierarchicalStateMachine: } unhandled in root state.
09-15 05:10:24.946 8425 8460 E NdkMediaCodec: sf error code: -12
09-15 05:10:24.958 8425 8460 E SoundPool: Unable to load sample
09-15 05:10:24.966 8425 8471 D vndksupport: Loading /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
09-15 05:10:24.968 8425 8471 D vndksupport: Loading /vendor/lib/hw/gralloc.msm8226.so from current namespace instead of sphal namespace.
09-15 05:10:24.977 8425 8476 I OMXClient: IOmx service obtained
09-15 05:10:24.977 380 1404 I OMXMaster: makeComponentInstance(OMX.google.vorbis.decoder) in <unknown> process
09-15 05:10:24.987 253 253 W AshmemAllocator: ashmem_create_region(32768) returning hidl_memory(0xb5d96170, 32768)
09-15 05:10:24.988 8425 8476 E ACodec : hidl's AshmemAllocator failed at the transport: Status(EX_TRANSACTION_FAILED): 'FAILED_TRANSACTION: '
09-15 05:10:24.988 8425 8476 E ACodec : Failed to allocate buffers after transitioning to IDLE state (error 0xfffffff4)
09-15 05:10:24.988 8425 8476 E ACodec : signalError(omxError 0x80001001, internalError -12)
09-15 05:10:24.988 8425 8476 E MediaCodec: Codec reported err 0xfffffff4, actionCode 0, while in state 5
09-15 05:10:24.991 8425 8476 W AHierarchicalStateMachine: Warning message AMessage(what = 'omxI') = {
09-15 05:10:24.991 8425 8476 W AHierarchicalStateMachine: int32_t type = 0
09-15 05:10:24.991 8425 8476 W AHierarchicalStateMachine: int32_t event = 0
09-15 05:10:24.991 8425 8476 W AHierarchicalStateMachine: int32_t data1 = 0
09-15 05:10:24.991 8425 8476 W AHierarchicalStateMachine: int32_t data2 = 1
09-15 05:10:24.991 8425 8476 W AHierarchicalStateMachine: } unhandled in root state.
09-15 05:10:24.992 8425 8460 E NdkMediaCodec: sf error code: -12
09-15 05:10:24.994 8425 8460 E SoundPool: Unable to load sample
09-15 05:10:24.995 577 619 I ActivityManager: Displayed com.android.camera2/com.android.camera.CameraLauncher: +957ms
09-15 05:10:25.004 8425 8425 I CAM_FocusRingView: Computing center via view bounds.
09-15 05:10:25.004 8425 8425 I chatty : uid=10063(com.android.camera2) identical 1 line
09-15 05:10:25.020 8425 8425 I CAM_FocusRingView: Computing center via view bounds.
09-15 05:10:25.025 998 1022 I ndroid.systemu: NativeAlloc concurrent copying GC freed 1892(163KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 4MB/8MB, paused 153us total 331.366ms
09-15 05:10:25.028 8425 8461 I CAM_OneCamera1Opnr: Opening Camera: CameraId{Api2='0',Api1:0}
09-15 05:10:25.045 8425 8461 I CameraManager: Using legacy camera HAL.
09-15 05:10:25.049 370 1221 I CameraService: CameraService::connect call (PID -1 "com.android.camera2", camera ID 0) for HAL version default and Camera API version 1
09-15 05:10:25.050 370 1221 E CameraService: CameraService::connect X (PID 8425) rejected (cannot connect from device user 0, currently allowed device users: )
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: Handling Camera Disabled Failure:
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: java.lang.Exception
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: at com.android.camera.FatalErrorHandlerImpl.onCameraDisabledFailure(FatalErrorHandlerImpl.java:100)
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: at com.android.camera.one.v2.Camera2OneCameraOpenerImpl.open(Camera2OneCameraOpenerImpl.java:212)
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: at com.android.camera.CaptureModule.openCameraAndStartPreview(CaptureModule.java:1372)
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: at com.android.camera.CaptureModule.access$1900(CaptureModule.java:107)
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: at com.android.camera.CaptureModule$10.run(CaptureModule.java:653)
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
09-15 05:10:25.052 8425 8461 E CAM_FatalErrorHandler: at java.lang.Thread.run(Thread.java:764)
09-15 05:10:25.060 8425 8461 E CAM_CameraUtil: Show fatal error dialog
09-15 05:10:25.063 8425 8461 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
09-15 05:10:25.063 8425 8461 E AndroidRuntime: Process: com.android.camera2, PID: 8425
09-15 05:10:25.063 8425 8461 E AndroidRuntime: java.lang.RuntimeException: Can't create handler inside thread Thread[AsyncTask #1,5,main] that has not called Looper.prepare()
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at android.os.Handler.<init>(Handler.java:205)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at android.os.Handler.<init>(Handler.java:118)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at android.app.Dialog.<init>(Dialog.java:123)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at android.app.AlertDialog.<init>(AlertDialog.java:201)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at android.app.AlertDialog$Builder.create(AlertDialog.java:1099)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at android.app.AlertDialog$Builder.show(AlertDialog.java:1124)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at com.android.camera.util.CameraUtil.showError(CameraUtil.java:327)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at com.android.camera.FatalErrorHandlerImpl.onCameraDisabledFailure(FatalErrorHandlerImpl.java:111)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at com.android.camera.one.v2.Camera2OneCameraOpenerImpl.open(Camera2OneCameraOpenerImpl.java:212)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at com.android.camera.CaptureModule.openCameraAndStartPreview(CaptureModule.java:1372)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at com.android.camera.CaptureModule.access$1900(CaptureModule.java:107)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at com.android.camera.CaptureModule$10.run(CaptureModule.java:653)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
09-15 05:10:25.063 8425 8461 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
09-15 05:10:25.068 577 1027 W ActivityManager: Force finishing activity com.android.camera2/com.android.camera.CameraLauncher
09-15 05:10:25.085 577 597 I ActivityManager: Showing crash dialog for package com.android.camera2 u0
09-15 05:10:25.180 577 4913 I OpenGLRenderer: Initialized EGL, version 1.4
09-15 05:10:25.180 577 4913 D OpenGLRenderer: Swap behavior 1
09-15 05:10:25.188 294 378 W SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen com.android.camera2#0
09-15 05:10:25.188 294 378 W SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen com.android.camera2#0
09-15 05:10:25.229 577 4913 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
09-15 05:10:25.246 577 4913 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
09-15 05:10:25.247 577 4913 D vndksupport: Loading /vendor/lib/hw/gralloc.msm8226.so from current namespace instead of sphal namespace.
09-15 05:10:25.282 8425 8441 I android.camera: Background concurrent copying GC freed 13793(991KB) AllocSpace objects, 14(280KB) LOS objects, 49% free, 1849KB/3MB, paused 114us total 137.288ms
09-15 05:10:25.364 577 597 W Looper : Slow dispatch took 167ms android.ui h=android.view.Choreographer$FrameHandler c=android.view.Choreographer$FrameDisplayEventReceiver@cd4fbd8 m=0
09-15 05:10:25.579 577 596 W ActivityManager: Activity pause timeout for ActivityRecord{541b1e4 u0 com.android.camera2/com.android.camera.CameraLauncher t267 f}
09-15 05:10:25.612 1660 1832 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
09-15 05:10:25.621 1660 1832 D vndksupport: Loading /vendor/lib/hw/gralloc.msm8226.so from current namespace instead of sphal namespace.
09-15 05:10:25.944 323 353 I ThermalEngine: Sensor:batt_therm:33900 mC
09-15 05:10:26.596 577 1027 W ActivityManager: Force finishing activity com.android.camera2/com.android.camera.CameraLauncher
09-15 05:10:26.621 577 1027 I ActivityManager: Killing 8425:com.android.camera2/u0a63 (adj 900): crash
09-15 05:10:26.623 577 599 W libprocessgroup: kill(-8425, 9) failed: No such process
09-15 05:10:26.645 294 378 W SurfaceFlinger: Attempting to destroy on removed layer: 17d45dc com.android.camera2/com.android.camera.CameraLauncher#0
09-15 05:10:26.645 294 378 W SurfaceFlinger: Attempting to destroy on removed layer: Task=267#0
09-15 05:10:26.654 577 619 W ActivityManager: setHasOverlayUi called on unknown pid: 8425
09-15 05:10:26.664 577 4913 D OpenGLRenderer: endAllActiveAnimators on 0x8f679b00 (RippleDrawable) with handle 0x9616bf30
09-15 05:10:26.666 577 599 W libprocessgroup: kill(-8425, 9) failed: No such process
09-15 05:10:26.666 577 599 I libprocessgroup: Successfully killed process cgroup uid 10063 pid 8425 in 42ms
09-15 05:10:26.674 242 242 I Zygote : Process 8425 exited due to signal (9)
09-15 05:10:26.838 294 1047 W SurfaceFlinger: Attempting to set client state on removed layer: Dim Layer for - mAboveAppWindowsContainers#0
09-15 05:10:26.838 294 1047 W SurfaceFlinger: Attempting to destroy on removed layer: Dim Layer for - mAboveAppWindowsContainers#0
09-15 05:10:26.844 294 1047 W SurfaceFlinger: Attempting to destroy on removed layer: eb78304 Application Error: com.android.camera2#0

What is your--
Phone model: XT1039.
Lineage version: 16.0 (unofficial).
Lineage Download url: Same link as in the OP.
Gapps version: ARM platform, Android 9.0, pico variant.

Did you--
wipe: Yes. As per the official wiki, with TWRP I did 'format data' and wiped Cache and System.
restore with titanium backup: No.
reboot after having the issue: Yes.

Are you using--
a task killer: No.
a non-stock kernel: Whatever Allstargaurav is using on the unofficial build.
LineageSettings/Performance settings (other than stock): Should be mostly stock.
Dual SIM: No.
other modifications: Installed Magisk, Override DNS, and Equalizer FX.

Provide any additional information (observations/frequency of problem/last version it worked on/etc) as needed:
Camera sometimes failed to init. 2 days after install, it stopped working altogether.