Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. App crash: corrupted size vs. prev_size in fastbins
QtWS25 Last Chance

App crash: corrupted size vs. prev_size in fastbins

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
11 Posts 2 Posters 1.7k 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 Offline
    L Offline
    LeBeef
    wrote on 26 Jun 2024, 11:18 last edited by
    #1

    Dear community,

    I am running a PySide6 app. It has a idle view with a looping video in the background. The application runs 24h a day. 2 or 3 times a day the application crashes without any interaction with the flowing messages:

    QML: Error transferring the data to system memory: -5
    QML: Cannot map a video frame in ReadOnly mode!
    corrupted size vs. prev_size in fastbins
    

    This is the backtrace:

    Thread 61 "QSGRenderThread" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7fff27fff640 (LWP 8354)]
    0x00007ffff66accd1 in __dynamic_cast () from /lib/x86_64-linux-gnu/libstdc++.so.6
    (gdb) bt
    #0  0x00007ffff66accd1 in __dynamic_cast () from /lib/x86_64-linux-gnu/libstdc++.so.6
    #1  0x00007fff4ab23376 in ?? () from /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
    #2  0x00007fff4ab2a241 in ?? () from /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
    #3  0x00007fffa8017e84 in vaSyncSurface () from /lib/x86_64-linux-gnu/libva.so.2
    #4  0x00007fff864ace48 in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/plugins/multimedia/libffmpegmediaplugin.so
    #5  0x00007fff864ad3aa in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/plugins/multimedia/libffmpegmediaplugin.so
    #6  0x00007fff864a8d33 in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/plugins/multimedia/libffmpegmediaplugin.so
    #7  0x00007fff864a8dc7 in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/plugins/multimedia/libffmpegmediaplugin.so
    #8  0x00007fff8594cfb3 in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/plugins/multimedia/libffmpegmediaplugin.so
    #9  0x00007fffc0093149 in QVideoFrame::map(QVideoFrame::MapMode) () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/qml/QtMultimedia/../../lib/libQt6Multimedia.so.6
    #10 0x00007fffc00970fc in QVideoTextureHelper::createTextures(QVideoFrame&, QRhi*, QRhiResourceUpdateBatch*, std::unique_ptr<QVideoFrameTextures, std::default_delete<QVideoFrameTextures> >&&) ()
       from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/qml/QtMultimedia/../../lib/libQt6Multimedia.so.6
    #11 0x00007fffd0035d78 in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/qml/QtMultimedia/../../lib/libQt6MultimediaQuick.so.6
    #12 0x00007fffd0035f1b in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/qml/QtMultimedia/../../lib/libQt6MultimediaQuick.so.6
    #13 0x00007fffef6d29fb in QSGBatchRenderer::Renderer::updateMaterialDynamicData(QSGBatchRenderer::ShaderManagerShader*, QSGMaterialShader::RenderState&, QSGMaterial*, QSGBatchRenderer::Batch const*, QSGBatchRenderer::Element*, int, int) () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/lib/libQt6Quick.so.6
    #14 0x00007fffef6d4d1c in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/lib/libQt6Quick.so.6
    #15 0x00007fffef6d5cfe in QSGBatchRenderer::Renderer::prepareRenderPass(QSGBatchRenderer::Renderer::RenderPassContext*) ()
       from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/lib/libQt6Quick.so.6
    #16 0x00007fffef6d7963 in QSGBatchRenderer::Renderer::render() () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/lib/libQt6Quick.so.6
    #17 0x00007fffef6edc42 in QSGRenderer::renderScene() () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/lib/libQt6Quick.so.6
    #18 0x00007fffef692d8e in QQuickWindowPrivate::renderSceneGraph() () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/lib/libQt6Quick.so.6
    #19 0x00007fffef87c03d in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/lib/libQt6Quick.so.6
    #20 0x00007fffef87d577 in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/lib/libQt6Quick.so.6
    #21 0x00007ffff5afc66d in ?? () from /home/deploy/devel/0095/.venv/lib/python3.12/site-packages/PySide6/Qt/lib/libQt6Core.so.6
    #22 0x00007ffff7494ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
    #23 0x00007ffff7526850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
    

    Environment:

    $ cat /etc/lsb-release 
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=22.04
    DISTRIB_CODENAME=jammy
    DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
    (venv) $ python -V
    Python 3.12.3
    (venv) $ pip list
    Package            Version
    ------------------ --------
    annotated-types    0.7.0
    certifi            2024.6.2
    pip                24.1
    pydantic           2.7.4
    pydantic_core      2.18.4
    PySide6            6.7.2
    PySide6_Addons     6.7.2
    PySide6_Essentials 6.7.2
    sentry-sdk         2.6.0
    setuptools         70.1.0
    shiboken6          6.7.2
    typing_extensions  4.12.2
    urllib3            2.2.2
    

    The qml snippet:

    Video {
        id: bgVideo
        anchors.fill: parent
        autoPlay: true
        loops: MediaPlayer.Infinite
        source: "idle_animation.mp4"
    }
    

    You you have an idea what could cause those crashes?

    Kind regards

    Nils

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 26 Jun 2024, 19:58 last edited by
      #2

      Hi,

      Did you try to check system logs to see if there was something wrong going on ?
      What about memory used by your application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply 27 Jun 2024, 13:43
      0
      • S SGaist
        26 Jun 2024, 19:58

        Hi,

        Did you try to check system logs to see if there was something wrong going on ?
        What about memory used by your application ?

        L Offline
        L Offline
        LeBeef
        wrote on 27 Jun 2024, 13:43 last edited by
        #3

        Hi @SGaist,

        fortunately we are logging all the pc resources, but there was nothing unusual during the crash and nothing unusual in syslog. Another error I saw around the crash is this:

        [AVHWFramesContext @ 0x7f7b28051180] Failed to sync surface 0x3f: 1 (operation failed).
        
        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 28 Jun 2024, 19:22 last edited by
          #4

          What about dmesg ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          L 1 Reply Last reply 1 Jul 2024, 07:52
          0
          • S SGaist
            28 Jun 2024, 19:22

            What about dmesg ?

            L Offline
            L Offline
            LeBeef
            wrote on 1 Jul 2024, 07:52 last edited by
            #5

            @SGaist said in App crash: corrupted size vs. prev_size in fastbins:

            dmesg

            Unfortunately no messages related to the crashes.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 1 Jul 2024, 20:31 last edited by
              #6

              Strange...
              What is your video hardware ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              L 1 Reply Last reply 3 Jul 2024, 11:36
              0
              • S SGaist
                1 Jul 2024, 20:31

                Strange...
                What is your video hardware ?

                L Offline
                L Offline
                LeBeef
                wrote on 3 Jul 2024, 11:36 last edited by
                #7

                @SGaist We have our app running on two different systems. One has a Nvidia GPU and one has intel graphics. It happens only on the one with intel graphics. Here are the details:

                        *-display
                             description: VGA compatible controller
                             product: Alder Lake-P Integrated Graphics Controller
                             vendor: Intel Corporation
                             physical id: 2
                             bus info: pci@0000:00:02.0
                             logical name: /dev/fb0
                             version: 0c
                             width: 64 bits
                             clock: 33MHz
                             capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
                             configuration: depth=32 driver=i915 latency=0 mode=1920x1080 resolution=1920,1080 visual=truecolor xres=1920 yres=1080
                             resources: iomemory:600-5ff iomemory:400-3ff irq:165 memory:6000000000-6000ffffff memory:4000000000-400fffffff ioport:3000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff
                
                L 1 Reply Last reply 3 Jul 2024, 12:08
                0
                • L LeBeef
                  3 Jul 2024, 11:36

                  @SGaist We have our app running on two different systems. One has a Nvidia GPU and one has intel graphics. It happens only on the one with intel graphics. Here are the details:

                          *-display
                               description: VGA compatible controller
                               product: Alder Lake-P Integrated Graphics Controller
                               vendor: Intel Corporation
                               physical id: 2
                               bus info: pci@0000:00:02.0
                               logical name: /dev/fb0
                               version: 0c
                               width: 64 bits
                               clock: 33MHz
                               capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
                               configuration: depth=32 driver=i915 latency=0 mode=1920x1080 resolution=1920,1080 visual=truecolor xres=1920 yres=1080
                               resources: iomemory:600-5ff iomemory:400-3ff irq:165 memory:6000000000-6000ffffff memory:4000000000-400fffffff ioport:3000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff
                  
                  L Offline
                  L Offline
                  LeBeef
                  wrote on 3 Jul 2024, 12:08 last edited by
                  #8

                  PS: It happens on multiple instances of intel, which playback different video files.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 3 Jul 2024, 18:44 last edited by
                    #9

                    Ok, so at least there's some common point of failure.

                    Which backend are you using ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    L 1 Reply Last reply 8 Jul 2024, 10:43
                    0
                    • S SGaist
                      3 Jul 2024, 18:44

                      Ok, so at least there's some common point of failure.

                      Which backend are you using ?

                      L Offline
                      L Offline
                      LeBeef
                      wrote on 8 Jul 2024, 10:43 last edited by LeBeef 7 Aug 2024, 10:44
                      #10

                      @SGaist Since I did not set anything with an ENV var I guess it is using ffmpeg right?

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 8 Jul 2024, 18:38 last edited by SGaist 7 Aug 2024, 18:38
                        #11

                        Since you are using 6.7, that should be the default yes.

                        You can check that by setting the QT_DEBUG_PLUGINS environment variable to 1 in the terminal where you start your application.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        4/11

                        28 Jun 2024, 19:22

                        topic:navigator.unread, 7
                        • Login

                        • Login or register to search.
                        4 out of 11
                        • First post
                          4/11
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved