wxQt, cmake, VS2017: samples immediately crash

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

wxQt, cmake, VS2017: samples immediately crash

Catalin-8
Hello,

Cmake offers what seems to be an easy way to build wxQt with VS 2017. However, the executables of the samples fail to run.

Qt setup:
========
- Qt 5.11.0 is installed from their "universal installer";
- binaries for android_armv7, mingw53 and VS2017_x64 are installed;

Running cmake:
==============
1) set the paths and ran 'Configure';
2) changed wxBUILD_TOOLKIT value to "qt", and ran 'Configure' again;
3) Qt5*_DIR values are wrongly filed in with the path to mingw53 (see above) instead of VS --> corrected manually and ran 'Configure' again;
Final Configure output:
Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.17134.
cotire 1.8.0 loaded.
Which libraries should wxWidgets use?
wxUSE_REGEX: builtin (enable support for wxRegEx class)
wxUSE_ZLIB: builtin (use zlib for LZW compression)
wxUSE_EXPAT: builtin (use expat for XML parsing)
wxUSE_LIBJPEG: builtin (use libjpeg (JPEG file format))
wxUSE_LIBPNG: builtin (use libpng (PNG image format))
wxUSE_LIBTIFF: builtin (use libtiff (TIFF file format))
wxUSE_LIBLZMA: OFF (use liblzma for LZMA compression)
wxUSE_STL: OFF (Use C++ STL classes)
Configured wxWidgets 3.1.2 for Windows-10.0.17134
Min OS Version required at runtime: Windows Vista / Windows Server 2008 (x64 Edition)
Which GUI toolkit should wxWidgets use? qt 5.11.0
Should wxWidgets be compiled into single library? OFF
Should wxWidgets be linked as a shared library? ON
Should wxWidgets support Unicode? ON
What wxWidgets compatibility level should be used? 3.0
Configuring done

4) Hit 'Generate'

5) Hit 'Open Project'
- the generated solution / set of projects looks like quite a mess when opened in VS; it's not really clear which ones of the 160+ projects (!) should be selected for built and building entire solution takes a much longer time due to all samples being built and everything else. (I know close to nothing about cmake, so if this is expected just disregards this point, but in that case I find it really disappointing.)
- I selected and built 'Libraries' project folder, then 'widgets' project. They all built fine.

- When running 'widgets' though, it failed with "The application was unable to start correctly (0xc000007b)."
and VS shows that it was trying to load mingw53_32\bin\Qt5Widgetsd.dll rather than the one in VS path.
- Ultimately I've renamed the VS folder containing Qt5*.dll-s as the mingw one, which triggered a rebuild for 'base', 'core', 'widgets' and 'ZERO-something' projects, but that quickly gave an assert that "no Qt platform plugin could be initialized" and then crashed because
"Unhandled exception thrown: read access violation.
QGuiApplicationPrivate::platform_integration was nullptr."
with the following stack:

Qt5Guid.dll!QGuiApplicationPrivate::createEventDispatcher() Line 1383 C++
Qt5Widgetsd.dll!QApplicationPrivate::createEventDispatcher() Line 182 C++
Qt5Cored.dll!QCoreApplicationPrivate::init() Line 846 C++
Qt5Guid.dll!QGuiApplicationPrivate::init() Line 1409 C++
Qt5Widgetsd.dll!QApplicationPrivate::init() Line 564 C++
Qt5Widgetsd.dll!QApplication::QApplication(int & argc, char * * argv, int _internal) Line 551 C++
wxqt312ud_core_vc_x64_qtcmake.dll!wxApp::Initialize(int & argc, wchar_t * * argv) Line 58 C++
wxbase312ud_vc_x64_qtcmake.dll!wxEntryStart(int & argc, wchar_t * * argv) Line 333 C++
wxbase312ud_vc_x64_qtcmake.dll!wxInitialize(int & argc, wchar_t * * argv) Line 544 C++
wxbase312ud_vc_x64_qtcmake.dll!wxInitializer::wxInitializer(int & argc, wchar_t * * argv) Line 92 C++
wxbase312ud_vc_x64_qtcmake.dll!wxEntryReal(int & argc, wchar_t * * argv) Line 477 C++
wxbase312ud_vc_x64_qtcmake.dll!wxEntry(int & argc, wchar_t * * argv) Line 184 C++
wxqt312ud_core_vc_x64_qtcmake.dll!wxEntry(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * __formal, int nCmdShow) Line 306 C++
widgets.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 286 C++


Any idea what goes wrong here?

Regards,
C

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxQt, cmake, VS2017: samples immediately crash

oneeyeman
Hi, Catalin,

On Thu, Oct 11, 2018 at 2:59 PM 'Catalin' via wx-users
<[hidden email]> wrote:

>
> Hello,
>
> Cmake offers what seems to be an easy way to build wxQt with VS 2017. However, the executables of the samples fail to run.
>
> Qt setup:
> ========
> - Qt 5.11.0 is installed from their "universal installer";
> - binaries for android_armv7, mingw53 and VS2017_x64 are installed;
>
> Running cmake:
> ==============
> 1) set the paths and ran 'Configure';
> 2) changed wxBUILD_TOOLKIT value to "qt", and ran 'Configure' again;
> 3) Qt5*_DIR values are wrongly filed in with the path to mingw53 (see above) instead of VS --> corrected manually and ran 'Configure' again;
> Final Configure output:
> Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.17134.
> cotire 1.8.0 loaded.
> Which libraries should wxWidgets use?
> wxUSE_REGEX: builtin (enable support for wxRegEx class)
> wxUSE_ZLIB: builtin (use zlib for LZW compression)
> wxUSE_EXPAT: builtin (use expat for XML parsing)
> wxUSE_LIBJPEG: builtin (use libjpeg (JPEG file format))
> wxUSE_LIBPNG: builtin (use libpng (PNG image format))
> wxUSE_LIBTIFF: builtin (use libtiff (TIFF file format))
> wxUSE_LIBLZMA: OFF (use liblzma for LZMA compression)
> wxUSE_STL: OFF (Use C++ STL classes)
> Configured wxWidgets 3.1.2 for Windows-10.0.17134
> Min OS Version required at runtime: Windows Vista / Windows Server 2008 (x64 Edition)
> Which GUI toolkit should wxWidgets use? qt 5.11.0
> Should wxWidgets be compiled into single library? OFF
> Should wxWidgets be linked as a shared library? ON
> Should wxWidgets support Unicode? ON
> What wxWidgets compatibility level should be used? 3.0
> Configuring done
>
> 4) Hit 'Generate'
>
> 5) Hit 'Open Project'
> - the generated solution / set of projects looks like quite a mess when opened in VS; it's not really clear which ones of the 160+ projects (!) should be selected for built and building entire solution takes a much longer time due to all samples being built and everything else. (I know close to nothing about cmake, so if this is expected just disregards this point, but in that case I find it really disappointing.)
> - I selected and built 'Libraries' project folder, then 'widgets' project. They all built fine.
>
> - When running 'widgets' though, it failed with "The application was unable to start correctly (0xc000007b)."
> and VS shows that it was trying to load mingw53_32\bin\Qt5Widgetsd.dll rather than the one in VS path.
> - Ultimately I've renamed the VS folder containing Qt5*.dll-s as the mingw one, which triggered a rebuild for 'base', 'core', 'widgets' and 'ZERO-something' projects, but that quickly gave an assert that "no Qt platform plugin could be initialized" and then crashed because
> "Unhandled exception thrown: read access violation.
> QGuiApplicationPrivate::platform_integration was nullptr."
> with the following stack:
>
> Qt5Guid.dll!QGuiApplicationPrivate::createEventDispatcher() Line 1383 C++
> Qt5Widgetsd.dll!QApplicationPrivate::createEventDispatcher() Line 182 C++
> Qt5Cored.dll!QCoreApplicationPrivate::init() Line 846 C++
> Qt5Guid.dll!QGuiApplicationPrivate::init() Line 1409 C++
> Qt5Widgetsd.dll!QApplicationPrivate::init() Line 564 C++
> Qt5Widgetsd.dll!QApplication::QApplication(int & argc, char * * argv, int _internal) Line 551 C++
> wxqt312ud_core_vc_x64_qtcmake.dll!wxApp::Initialize(int & argc, wchar_t * * argv) Line 58 C++
> wxbase312ud_vc_x64_qtcmake.dll!wxEntryStart(int & argc, wchar_t * * argv) Line 333 C++
> wxbase312ud_vc_x64_qtcmake.dll!wxInitialize(int & argc, wchar_t * * argv) Line 544 C++
> wxbase312ud_vc_x64_qtcmake.dll!wxInitializer::wxInitializer(int & argc, wchar_t * * argv) Line 92 C++
> wxbase312ud_vc_x64_qtcmake.dll!wxEntryReal(int & argc, wchar_t * * argv) Line 477 C++
> wxbase312ud_vc_x64_qtcmake.dll!wxEntry(int & argc, wchar_t * * argv) Line 184 C++
> wxqt312ud_core_vc_x64_qtcmake.dll!wxEntry(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * __formal, int nCmdShow) Line 306 C++
> widgets.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 286 C++

FWIW, widgets sample on Qt also crashes on *nix.
Built with "CXXFLAGS="-std=c++11" ../configure --enable-debug
--with-qt && make && cd samples/widgets && make && ./widgets".

Vadim is aware (see my post couple of days ago), and hopefully will
look at it soon.

Thank you.

>
>
> Any idea what goes wrong here?
>
> Regards,
> C
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxQt, cmake, VS2017: samples immediately crash

Catalin-8
On Friday, 12 October 2018, 00:19:14 EEST, Igor Korot wrote:


> FWIW, widgets sample on Qt also crashes on *nix.

I'm pretty sure it's not the same thing. At least while it attempts to use the wrong dll-s there must be a [-nother] different bug. And it might very well be from cmake setup because the non-cmake-using-configure-and-mingw/gcc way (see docs/qt/install.txt of a recent head) did run 'widgets' sample on both Windows and Ubuntu 18.04.

Regards,
C

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxQt, cmake, VS2017: samples immediately crash

oneeyeman
Catalin,

On Thu, Oct 11, 2018 at 4:54 PM 'Catalin' via wx-users
<[hidden email]> wrote:
>
> On Friday, 12 October 2018, 00:19:14 EEST, Igor Korot wrote:
>
>
> > FWIW, widgets sample on Qt also crashes on *nix.
>
> I'm pretty sure it's not the same thing. At least while it attempts to use the wrong dll-s there must be a [-nother] different bug. And it might very well be from cmake setup because the non-cmake-using-configure-and-mingw/gcc way (see docs/qt/install.txt of a recent head) did run 'widgets' sample on both Windows and Ubuntu 18.04.

Did you try it with the latest master?
I'm about to go home and will try the sample as soon as I will be there.

Thank you.

>
> Regards,
> C
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users