Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT app crash in Gstremer rtspsrc while calling g_free()

QT app crash in Gstremer rtspsrc while calling g_free()

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 415 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.
  • D Offline
    D Offline
    DkDkDk
    wrote on last edited by DkDkDk
    #1

    I have mingw gstreamer 1.18.1 integrated in Qt 5.14.1 app.code compiles and run without error. Qt app get crash in release build. but in debug buid it show asswmbly code and hit break point in that code. after continue code app runs well.

                                                                                       
                                                                                       
    1   ntdll!RtlRegisterSecureMemoryCacheCallback                      0x7ffbd4e569ff 
    2   ntdll!EtwLogTraceEvent                                          0x7ffbd4e213b9 
    3   ntdll!RtlRegisterSecureMemoryCacheCallback                      0x7ffbd4e54d68 
    4   ntdll!EtwLogTraceEvent                                          0x7ffbd4e0c0a0 
    5   ntdll!RtlGetCurrentServiceSessionId                             0x7ffbd4d8c514 
    6   ntdll!RtlFreeHeap                                               0x7ffbd4d8b1e1 
    7   msvcrt!free                                                     0x7ffbd406cadc 
    8   gst_sdp_media_get_caps_from_media          gstsdpmessage.c 3723 0x6f607e42     
    9   gst_rtspsrc_collect_payloads               gstrtspsrc.c    2144 0x2d704454     
    10  gst_rtspsrc_create_stream                  gstrtspsrc.c    2268 0x2d704454     
    11  gst_rtspsrc_open_from_sdp                  gstrtspsrc.c    7813 0x2d704454     
    12  gst_rtspsrc_open                           gstrtspsrc.c    8066 0x2d704454     
    13  gst_rtspsrc_ensure_open                    gstrtspsrc.c    8466 0x2d705cd8     
    14  gst_rtspsrc_play                           gstrtspsrc.c    8492 0x2d705e43     
    15  gst_rtspsrc_thread                         gstrtspsrc.c    9030 0x2d7084ad     
    16  gst_task_func                              gsttask.c       328  0x6dccce10     
    17  ??                                                              0x7ffb8f7f7782 
    18  ??                                                              0x7ffb8f7f6ce1 
    19  ??                                                              0x7ffb8f8252b7 
    20  msvcrt!_beginthreadex                                           0x7ffbd408e634 
    ... <More>                                                                         
    

    I ckeck that this line at github https://github.com/GStreamer/gst-plugins-base/blob/4013b8003e78971dd01b055066c12f8aaadb8897/gst-libs/gst/sdp/gstsdpmessage.c#L3724

    this happens when gstremer try to free some memory.
    250a9bbb-23f1-41a3-938b-5e733640a7d6-image.png

    Christian EhrlicherC 1 Reply Last reply
    0
    • D DkDkDk

      I have mingw gstreamer 1.18.1 integrated in Qt 5.14.1 app.code compiles and run without error. Qt app get crash in release build. but in debug buid it show asswmbly code and hit break point in that code. after continue code app runs well.

                                                                                         
                                                                                         
      1   ntdll!RtlRegisterSecureMemoryCacheCallback                      0x7ffbd4e569ff 
      2   ntdll!EtwLogTraceEvent                                          0x7ffbd4e213b9 
      3   ntdll!RtlRegisterSecureMemoryCacheCallback                      0x7ffbd4e54d68 
      4   ntdll!EtwLogTraceEvent                                          0x7ffbd4e0c0a0 
      5   ntdll!RtlGetCurrentServiceSessionId                             0x7ffbd4d8c514 
      6   ntdll!RtlFreeHeap                                               0x7ffbd4d8b1e1 
      7   msvcrt!free                                                     0x7ffbd406cadc 
      8   gst_sdp_media_get_caps_from_media          gstsdpmessage.c 3723 0x6f607e42     
      9   gst_rtspsrc_collect_payloads               gstrtspsrc.c    2144 0x2d704454     
      10  gst_rtspsrc_create_stream                  gstrtspsrc.c    2268 0x2d704454     
      11  gst_rtspsrc_open_from_sdp                  gstrtspsrc.c    7813 0x2d704454     
      12  gst_rtspsrc_open                           gstrtspsrc.c    8066 0x2d704454     
      13  gst_rtspsrc_ensure_open                    gstrtspsrc.c    8466 0x2d705cd8     
      14  gst_rtspsrc_play                           gstrtspsrc.c    8492 0x2d705e43     
      15  gst_rtspsrc_thread                         gstrtspsrc.c    9030 0x2d7084ad     
      16  gst_task_func                              gsttask.c       328  0x6dccce10     
      17  ??                                                              0x7ffb8f7f7782 
      18  ??                                                              0x7ffb8f7f6ce1 
      19  ??                                                              0x7ffb8f8252b7 
      20  msvcrt!_beginthreadex                                           0x7ffbd408e634 
      ... <More>                                                                         
      

      I ckeck that this line at github https://github.com/GStreamer/gst-plugins-base/blob/4013b8003e78971dd01b055066c12f8aaadb8897/gst-libs/gst/sdp/gstsdpmessage.c#L3724

      this happens when gstremer try to free some memory.
      250a9bbb-23f1-41a3-938b-5e733640a7d6-image.png

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Do not mix debug and release libs. Make sure the release Qt executable also links against the release gstreamer libs and the Debug executable against the debug libs.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      D 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        Do not mix debug and release libs. Make sure the release Qt executable also links against the release gstreamer libs and the Debug executable against the debug libs.

        D Offline
        D Offline
        DkDkDk
        wrote on last edited by
        #3

        @Christian-Ehrlicher I downloaded gstreamer from this link https://gstreamer.freedesktop.org/data/pkg/windows/1.18.1/mingw/
        gstreamer-1.0-devel-mingw-x86_64-1.18.1.msi and
        gstreamer-1.0-mingw-x86_64-1.18.1.msi
        I have installed them both in same folder. which should I used for relese and debug?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DkDkDk
          wrote on last edited by
          #4

          Solved the issue by changing gstreamer version to 1.22.0. and deleting libgstd3d11.dll.
          I guess this issue is due to windows CRT, its not allow to free memory which is allocated by other thread.

          1 Reply Last reply
          0
          • D DkDkDk has marked this topic as solved on

          • Login

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