Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Dev Drones
  3. Sentinel
  4. Sentinel segmentation fault after running voxl-uvc-server -v [camera id] -d

Sentinel segmentation fault after running voxl-uvc-server -v [camera id] -d

Scheduled Pinned Locked Moved Sentinel
30 Posts 4 Posters 7.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Alex KushleyevA Alex Kushleyev

    @AndriiHlyvko , we have gotten another report about this recently. It seem there is a bug in libuvc which has been fixed, but we are using older version of the library.

    Inserting the following check at the line below has been reported to fix the issue:

    if (strmh->got_bytes + data_len > strmh->cur_ctrl.dwMaxVideoFrameSize) {
        UVC_DEBUG("Transfer too large and will overflow the buffer. Dropping data!");
        _uvc_swap_buffers(strmh);
        return;
      }
    

    here: https://github.com/modalai/libuvc/blob/3fb2d2fd31f215f76bd5d6782785385fd0927ce5/src/stream.c#L757

    It seems the fix in the official libuvc release is here:
    https://github.com/libuvc/libuvc/blob/master/src/stream.c#L779
    https://github.com/libuvc/libuvc/blob/master/src/stream.c#L787

    We have not fixed this officially, please look at the code snippet i provided official fix and implement something similar until we fix it.

    Alex

    A Offline
    A Offline
    AndriiHlyvko
    Contributor
    wrote on last edited by
    #21

    Thanks @Alex-Kushleyev . Do you know if there are any differences between using the voxl fork of libuvc vs compiling the master libuvc? I was thinking of just building the master libuvc but I am not sure if modalai did any changes to it.

    Alex KushleyevA 1 Reply Last reply
    0
    • A AndriiHlyvko

      Thanks @Alex-Kushleyev . Do you know if there are any differences between using the voxl fork of libuvc vs compiling the master libuvc? I was thinking of just building the master libuvc but I am not sure if modalai did any changes to it.

      Alex KushleyevA Offline
      Alex KushleyevA Offline
      Alex Kushleyev
      ModalAI Team
      wrote on last edited by
      #22

      @AndriiHlyvko , you can see the changes that we made to the original fork : https://github.com/modalai/libuvc/commits/modalai-master (just the three top commits).

      You may definitely try to use the latest master from the official repo, but we have not tested it. I believe there was some discussion recently about moving our code to latest, but we have not done it yet.

      Alex

      A 1 Reply Last reply
      0
      • Alex KushleyevA Alex Kushleyev

        @AndriiHlyvko , you can see the changes that we made to the original fork : https://github.com/modalai/libuvc/commits/modalai-master (just the three top commits).

        You may definitely try to use the latest master from the official repo, but we have not tested it. I believe there was some discussion recently about moving our code to latest, but we have not done it yet.

        Alex

        A Offline
        A Offline
        AndriiHlyvko
        Contributor
        wrote on last edited by
        #23

        @Alex-Kushleyev just tested with latest master. The seg fault is gone and it seems to be working fine. One new problem that I have after moving to libuvc master is that the video stream from the boson+ looks wrong (the video is green 😕 ). Its only wrong for boson+ and not the boson. I'll keep debugging the issue. I was thinking maybe the boson+ sends incomplete frames in the uvc callback but I'm not sure.

        A 1 Reply Last reply
        0
        • A AndriiHlyvko

          @Alex-Kushleyev just tested with latest master. The seg fault is gone and it seems to be working fine. One new problem that I have after moving to libuvc master is that the video stream from the boson+ looks wrong (the video is green 😕 ). Its only wrong for boson+ and not the boson. I'll keep debugging the issue. I was thinking maybe the boson+ sends incomplete frames in the uvc callback but I'm not sure.

          A Offline
          A Offline
          AndriiHlyvko
          Contributor
          wrote on last edited by
          #24

          @Alex-Kushleyev figured it out. I had a bug that I introduced. I broke the mapping between UVC_FRAME_FORMAT enum and the voxl IMAGE_FORMAT enum in my fork of the uvc-server. Right now uvc streaming is working well with the boson+

          Alex KushleyevA 1 Reply Last reply
          0
          • A AndriiHlyvko

            @Alex-Kushleyev figured it out. I had a bug that I introduced. I broke the mapping between UVC_FRAME_FORMAT enum and the voxl IMAGE_FORMAT enum in my fork of the uvc-server. Right now uvc streaming is working well with the boson+

            Alex KushleyevA Offline
            Alex KushleyevA Offline
            Alex Kushleyev
            ModalAI Team
            wrote on last edited by
            #25

            @AndriiHlyvko , that's great!

            If you are willing to help out and share your changes on top of libuvc master, it should help us get this updated more quickly 🙂

            Thank you

            Alex

            A 1 Reply Last reply
            0
            • Alex KushleyevA Alex Kushleyev

              @AndriiHlyvko , that's great!

              If you are willing to help out and share your changes on top of libuvc master, it should help us get this updated more quickly 🙂

              Thank you

              Alex

              A Offline
              A Offline
              AndriiHlyvko
              Contributor
              wrote on last edited by
              #26

              @Alex-Kushleyev sure. Should I make a merge request for it and tag you in it?

              Alex KushleyevA 1 Reply Last reply
              0
              • A AndriiHlyvko

                @Alex-Kushleyev sure. Should I make a merge request for it and tag you in it?

                Alex KushleyevA Offline
                Alex KushleyevA Offline
                Alex Kushleyev
                ModalAI Team
                wrote on last edited by
                #27

                @AndriiHlyvko , yes and please tag @Eric-Katzfey who will probably review and merge.

                Thank you!

                Alex

                A 1 Reply Last reply
                0
                • Alex KushleyevA Alex Kushleyev

                  @AndriiHlyvko , yes and please tag @Eric-Katzfey who will probably review and merge.

                  Thank you!

                  Alex

                  A Offline
                  A Offline
                  AndriiHlyvko
                  Contributor
                  wrote on last edited by
                  #28

                  Hey @Alex-Kushleyev and @Eric-Katzfey here is the MR https://gitlab.com/voxl-public/voxl-sdk/third-party/voxl-libuvc/-/merge_requests/3#59f81c123b3abbcb97274545796dd18706c3e106

                  Alex KushleyevA 1 Reply Last reply
                  0
                  • A AndriiHlyvko

                    Hey @Alex-Kushleyev and @Eric-Katzfey here is the MR https://gitlab.com/voxl-public/voxl-sdk/third-party/voxl-libuvc/-/merge_requests/3#59f81c123b3abbcb97274545796dd18706c3e106

                    Alex KushleyevA Offline
                    Alex KushleyevA Offline
                    Alex Kushleyev
                    ModalAI Team
                    wrote on last edited by
                    #29

                    @AndriiHlyvko , Thank you! I will ask @Eric-Katzfey to review at his convenience.

                    Alex KushleyevA 1 Reply Last reply
                    0
                    • Alex KushleyevA Alex Kushleyev

                      @AndriiHlyvko , Thank you! I will ask @Eric-Katzfey to review at his convenience.

                      Alex KushleyevA Offline
                      Alex KushleyevA Offline
                      Alex Kushleyev
                      ModalAI Team
                      wrote on last edited by
                      #30

                      @AndriiHlyvko,

                      I just ran into the same issue while testing Boson (in my case I was testing the 16-bit Boson streaming mode). The libuvc issue caused a crash, since i did not use a fixed version of libuvc. However, what actually caused the buffer overflow was the fact that Boson was reporting smaller buffer requirements for RAW16 during query (it was reporting width * height * 1.5 , just like for YUV, but actual frame size was width * height * 2, so uvc pipeline allocated smaller buffer and overflow happened with the full frame came in.

                      Was this the same issue with your Boson tests or did you experience something else?

                      Thanks!

                      Alex

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      ModalAI
                      Categories Recent Tags ModalAI.com Docs
                      © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups