Qt & Gstreamer on Windows crashes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Qt & Gstreamer on Windows crashes

Daniel Johnson
I got a working Qt/Gstreamer app on Linux in 2 hours. On Windows I can't get past gst_init. It compiles just fine but crashes on launch. The debugger won't even give me a crash report. I'm guessing it has to do with delayed linking. I haven't had any luck with either mingw-64 or visual studio compiler. I'm currently trying to compile both Qt and Gstreamer with mingw in the guess it's some ABI incompatibility from them being built differently, but that's my only guess. I've been at this all day. Any ideas?

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Qt & Gstreamer on Windows crashes

Matthew Waters
Assuming the issue is c++ abi differences between GStreamer and Qt, you need to ensure that both Qt and GStreamer's qml plugin are built against the same c++ abi.  This generally means the msvc c++ abi as Qt and GStreamer have/had different mingw compiler versions with different c++ abis.

On Sun., 8 Mar. 2020, 14:50 Daniel Johnson, <[hidden email]> wrote:
I got a working Qt/Gstreamer app on Linux in 2 hours. On Windows I can't get past gst_init. It compiles just fine but crashes on launch. The debugger won't even give me a crash report. I'm guessing it has to do with delayed linking. I haven't had any luck with either mingw-64 or visual studio compiler. I'm currently trying to compile both Qt and Gstreamer with mingw in the guess it's some ABI incompatibility from them being built differently, but that's my only guess. I've been at this all day. Any ideas?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Qt & Gstreamer on Windows crashes

Daniel Johnson
On Sat, Mar 7, 2020, 9:45 PM Matthew Waters <[hidden email]> wrote:
Assuming the issue is c++ abi differences between GStreamer and Qt, you need to ensure that both Qt and GStreamer's qml plugin are built against the same c++ abi.  This generally means the msvc c++ abi as Qt and GStreamer have/had different mingw compiler versions with different c++ abis.

Do I need the QML plugin at all? I was just going to use the xid, or HWND and video overlay. The Qt documentation seems to indicate that msvc isn't supported with the open source version of Qt Creator, so I wouldn't have thought it was compiled with msvc. 

Is there a good way to figure out what something is compiled with using a tool that looks at the PE binaries? I'm not even sure I have 64 bit versions. I'd be happy to compile Gstreamer from source to match Qt, or vice versa or compile both. I just haven't figured out how to even diagnose the problem other than guess and check which has so far been very time consuming and unproductive. It never gets to the point that I can printf, or attach a debugger, but compiles without warnings. 



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Qt & Gstreamer on Windows crashes

Matthew Waters
Hi,

You don't need the qml plugin however that may be where your problem lies.  I have also never used Qt Creator on Windows but used qmake manually.

Without more exact information on what combinations you have tried I cannot help you other than what I've mentioned previously.  That you need to get the compiler environment correct between GStreamer and Qt as they may have different expectations for the runtime environment both for C++ and C.

Look through dependency walker (or equivalent) for differing CRT, debug vs release CRT, CRT version differences, C++ ABIs, C/C++ compiler versions, MSVC vs GCC, 32-bit vs 64-bit libraries or application, PATH environment variable setup, etc.

Cheers
-Matt

On 9/3/20 11:28 am, Daniel Johnson wrote:
On Sat, Mar 7, 2020, 9:45 PM Matthew Waters <[hidden email]> wrote:
Assuming the issue is c++ abi differences between GStreamer and Qt, you need to ensure that both Qt and GStreamer's qml plugin are built against the same c++ abi.  This generally means the msvc c++ abi as Qt and GStreamer have/had different mingw compiler versions with different c++ abis.

Do I need the QML plugin at all? I was just going to use the xid, or HWND and video overlay. The Qt documentation seems to indicate that msvc isn't supported with the open source version of Qt Creator, so I wouldn't have thought it was compiled with msvc. 

Is there a good way to figure out what something is compiled with using a tool that looks at the PE binaries? I'm not even sure I have 64 bit versions. I'd be happy to compile Gstreamer from source to match Qt, or vice versa or compile both. I just haven't figured out how to even diagnose the problem other than guess and check which has so far been very time consuming and unproductive. It never gets to the point that I can printf, or attach a debugger, but compiles without warnings. 



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (499 bytes) Download Attachment