Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt 5.12.2 "camera example" crash at startup
Qt 6.12 LTS is out! See what's new in the release blog

qt 5.12.2 "camera example" crash at startup

Scheduled Pinned Locked Moved Unsolved General and Desktop
17 Posts 5 Posters 5.4k Views
  • 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.
  • L Lim SAS

    Hello eveyone,
    I've been using "camera example" of QT 5.12.2 in ubuntu 18_04 and everyting was fine.

    Then, when I moved to Ubuntu 22_04, this exemple crash at startup.
    Debugger show that it is always in the same thread, called "viewfinderbin-q"

    I've tried online installer, that provides QT 5.15.3, I have the same issue with the same consequence

    Please notice that the QML camera example work fine, I can see my face on webcam !.

    Any idea how to make camera example work ?

    many thanks

    JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on last edited by JoeCFD
    #3

    @Lim-SAS I just tested this example with 5.15.3 on LUbuntu 22.04 and did not have problem to launch it.

    L 1 Reply Last reply
    0
    • S SamiV123

      @Lim-SAS

      build from source with debug info, run in the debugger and have a look at the stack trace.

      L Offline
      L Offline
      Lim SAS
      wrote on last edited by
      #4

      @SamiV123 I will try it next week.

      1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        @Lim-SAS I just tested this example with 5.15.3 on LUbuntu 22.04 and did not have problem to launch it.

        L Offline
        L Offline
        Lim SAS
        wrote on last edited by
        #5

        @JoeCFD Thanks for the try.

        Q1) You were able to see the camera display in real time ?

        Q2) how did you install qt-creator and the multimedia library (offline installer ? sources compilation? online installer ? ubuntu packages ?)

        JoeCFDJ 1 Reply Last reply
        0
        • L Lim SAS

          @JoeCFD Thanks for the try.

          Q1) You were able to see the camera display in real time ?

          Q2) how did you install qt-creator and the multimedia library (offline installer ? sources compilation? online installer ? ubuntu packages ?)

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by
          #6

          @Lim-SAS Sorry I did not see camera display in real time because I do not have camera in my computer. qtcreator is installed by
          sudo apt-get install qtcreator.

          L 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @Lim-SAS Sorry I did not see camera display in real time because I do not have camera in my computer. qtcreator is installed by
            sudo apt-get install qtcreator.

            L Offline
            L Offline
            Lim SAS
            wrote on last edited by
            #7

            @JoeCFD
            ah, ok ... My app crashes only when a camera is there. If not, there is no crash.

            1 Reply Last reply
            0
            • S SamiV123

              @Lim-SAS

              build from source with debug info, run in the debugger and have a look at the stack trace.

              L Offline
              L Offline
              Lim SAS
              wrote on last edited by
              #8

              @SamiV123 said in qt 5.12.2 "camera example" crash at startup:

              source with debug info, run in the debug

              I have been fallowing the https://wiki.qt.io/Building_Qt_5_from_Git tutorial but the compilation fails at early stage. it's annoying.

              jsulmJ 1 Reply Last reply
              0
              • L Lim SAS

                @SamiV123 said in qt 5.12.2 "camera example" crash at startup:

                source with debug info, run in the debug

                I have been fallowing the https://wiki.qt.io/Building_Qt_5_from_Git tutorial but the compilation fails at early stage. it's annoying.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #9

                @Lim-SAS said in qt 5.12.2 "camera example" crash at startup:

                compilation fails at early stage

                If you provide more details maybe somebody will help

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                L 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @Lim-SAS said in qt 5.12.2 "camera example" crash at startup:

                  compilation fails at early stage

                  If you provide more details maybe somebody will help

                  L Offline
                  L Offline
                  Lim SAS
                  wrote on last edited by
                  #10

                  @jsulm
                  Sure, but I think it will take too much time for uncertain result. I will persevere in this way when I will be really desperate ;)

                  As written here : https://doc.qt.io/qt-5/supported-platforms.html
                  there is no support of QT5 for ubuntu 22_04. Maybe my issue has no solution.

                  jsulmJ 1 Reply Last reply
                  0
                  • L Lim SAS

                    @jsulm
                    Sure, but I think it will take too much time for uncertain result. I will persevere in this way when I will be really desperate ;)

                    As written here : https://doc.qt.io/qt-5/supported-platforms.html
                    there is no support of QT5 for ubuntu 22_04. Maybe my issue has no solution.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    @Lim-SAS said in qt 5.12.2 "camera example" crash at startup:

                    there is no support of QT5 for ubuntu 22_04

                    This is wrong. Qt5 works just fine with Ubuntu 22.04. There is no mention of Ubuntu 22.04 simply because it did not exist when that page was created.
                    Ubuntu 22.04 even provides Qt5 packages...

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    L 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @Lim-SAS said in qt 5.12.2 "camera example" crash at startup:

                      there is no support of QT5 for ubuntu 22_04

                      This is wrong. Qt5 works just fine with Ubuntu 22.04. There is no mention of Ubuntu 22.04 simply because it did not exist when that page was created.
                      Ubuntu 22.04 even provides Qt5 packages...

                      L Offline
                      L Offline
                      Lim SAS
                      wrote on last edited by Lim SAS
                      #12

                      @jsulm
                      good news !
                      I wish someone could reproduce my issue. I will reinstall ubuntu from scratch on another computer to double check i'm not crazy

                      JoeCFDJ 1 Reply Last reply
                      0
                      • L Lim SAS

                        @jsulm
                        good news !
                        I wish someone could reproduce my issue. I will reinstall ubuntu from scratch on another computer to double check i'm not crazy

                        JoeCFDJ Offline
                        JoeCFDJ Offline
                        JoeCFD
                        wrote on last edited by JoeCFD
                        #13

                        @Lim-SAS Try the following to see if you can find something if gstreamer is applied in this example.
                        export GST_DEBUG=5
                        or run
                        strace app
                        to see if something is obvious.

                        L 1 Reply Last reply
                        0
                        • JoeCFDJ JoeCFD

                          @Lim-SAS Try the following to see if you can find something if gstreamer is applied in this example.
                          export GST_DEBUG=5
                          or run
                          strace app
                          to see if something is obvious.

                          L Offline
                          L Offline
                          Lim SAS
                          wrote on last edited by
                          #14

                          @JoeCFD
                          after reinstalling ubuntu 22.04 from scratch, I now have an error that is displayed at the very beginning of runtime:
                          cameraBin error : "Internal error: could not render surface"
                          cameraBin error : "Internal data stream error"

                          after 4 hours of search of a similar problem on the internet, I could not find any solution. Does it ring a bell to you ?

                          1 Reply Last reply
                          0
                          • L Offline
                            L Offline
                            Lim SAS
                            wrote on last edited by
                            #15

                            fyi : with a ubuntu 20.04 installation from scratch, camera display works fine...

                            1 Reply Last reply
                            0
                            • L Lim SAS

                              Hello eveyone,
                              I've been using "camera example" of QT 5.12.2 in ubuntu 18_04 and everyting was fine.

                              Then, when I moved to Ubuntu 22_04, this exemple crash at startup.
                              Debugger show that it is always in the same thread, called "viewfinderbin-q"

                              I've tried online installer, that provides QT 5.15.3, I have the same issue with the same consequence

                              Please notice that the QML camera example work fine, I can see my face on webcam !.

                              Any idea how to make camera example work ?

                              many thanks

                              Ketan__Patel__0011K Offline
                              Ketan__Patel__0011K Offline
                              Ketan__Patel__0011
                              wrote on last edited by
                              #16

                              @Lim-SAS
                              You can see this video about Qt Camera Functionlity Or Qt Multimedia Moudle Functionlity.

                              Qt Camera (Connect Camera With Application) : https://youtu.be/hcf9V5R0G6s?si=qLzR2nOpuFnN-4i_

                              Qt Camera And QCameraImageCapture (Camera ImageCapture) :
                              https://youtu.be/CUBoN1Hk168?si=YhjeMQbBGIGvCk3n

                              1 Reply Last reply
                              0
                              • L Offline
                                L Offline
                                Lim SAS
                                wrote on last edited by
                                #17

                                just found how to fix it !
                                execute the magic : sudo apt purge gstreamer1.0-vaapi
                                then it's ok.

                                I hope it helps

                                1 Reply Last reply
                                1

                                • Login

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