Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

MMAP gives exception when initialising camera #204

@martienpoels-bank2loyalty

Description

Hi,

I was realy frustrated about the bullseye 64 bit implementation, which I need to run a onnx recognition under c#.
I tried running the new tools libcamera-still and after a few succesfull creation of stills the os reports memory corruption. So that libcamera stuff seems like a nightmare path. Also no C# support zero/nada...

Now I have installed ubuntu server 21.10 64 bit on a pi4b 1Gb.
Running "raspistill" works like a charm.
So halleluia I thought, I installed v4l-utils and it's output showed mmal devices. Promising....

bcm2835-codec-decode (platform:bcm2835-codec):
/dev/video10
/dev/video11
/dev/video12
/dev/media1

bcm2835-isp (platform:bcm2835-isp):
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/media0

mmal service 16.1 (platform:bcm2835-v4l2-0):
/dev/video0

I installed .dotnet sdk 5.0.401 on the device, including the latest version of MMAL. But unfortunately the lib crashes on initialisation.

mmal: mmal_component_create_core: could not find component 'vc.ril.camera'
Unhandled exception. MMALSharp.MMALNotImplementedException: Function not implemented. Unable to create component
at MMALSharp.MMALNativeExceptionHelper.MMALCheck(MMAL_STATUS_T status, String message)
at MMALSharp.MMALComponentBase.CreateComponent(String name)
at MMALSharp.MMALComponentBase..ctor(String name)
at MMALSharp.Components.MMALCameraComponent..ctor()
at MMALSharp.MMALCamera..ctor()
at MMALSharp.MMALCamera.<>c.<.cctor>b__30_0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue() at System.Lazy1.get_Value()
at MMALSharp.MMALCamera.get_Instance()
at PeopleDetectFirmware.MMAL_camera.CameraControl..ctor(Boolean monitorOn, Boolean useRaw, ICameraControl itf, MMALEncoding encodingType, MMALEncoding pixelFormat, Int32 width, Int32 height, Int32 quality) in D:\GitHub_HomeAutomation\ai\PeopleDetectFirmware\PeopleDetectFirmware\MMAL-camera\CameraControl.cs:line 40
at PeopleDetectFirmware.FirmwareCore..ctor() in D:\GitHub_HomeAutomation\ai\PeopleDetectFirmware\PeopleDetectFirmware\FirmwareCore.cs:line 15
at PeopleDetectFirmware.Program.Main() in D:\GitHub_HomeAutomation\ai\PeopleDetectFirmware\PeopleDetectFirmware\Program.cs:line 28
Aborted (core dumped)

relevant output form uname -a
5.13.0-1008-raspi #9-Ubuntu SMP PREEMPT Wed Sep 29 08:27:44 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

I set LD_DEBUG=files and now it shows where it happens:

file=/lib/aarch64-linux-gnu/libmmal.so [0]; needed by /lib/aarch64-linux-gnu/libmmal_core.so [0] (relocation dependency)
12125:
mmal: mmal_component_create_core: could not find component 'vc.ril.camera'
Unhandled exception.

Any idea what's going on? Am I missing a library that I could check for. Or is just 64bit killing me..

Please help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions