[Interest] Crash when creating QNetworkAccessManager in qt 5.14.x

Henry Skoglund henry at tungware.se
Wed Feb 5 21:20:29 CET 2020


Hi, maybe you already checked this, but if you have any big wheels like 
a QFileDialog declared static, their ctors most likely will run before 
main(), i.e. some COM/networking activity could occur before main() 
kicks in.

On 2020-02-05 21:10, maitai wrote:
>
> As I said, I now have doubts it comes from COM threading...
>
> I have built a small app with nothing inside, with the same .pro file 
> exactly (qt modules, libs, etc, in the same order). The only 
> difference is HEADERS and SOURCES of course, main.cpp being the same 
> at least until it crashes. No problem in this small app (running in 
> the same directory).
>
> Again for those who missed it:
>
> main.cpp:
>
> QNetworkAccessManager*inet=newQNetworkAccessManager();
> deleteinet;
> QApplicationapp(argc,argv);
> this works.
> QApplicationapp(argc,argv);
>     QNetworkAccessManager*inet=newQNetworkAccessManager();
> deleteinet;
> this crashes on new in our app, not in a sample without HEADERS and SOURCES.
>
> I cannot understand that, certainly there is something obvious I am missing.
>
> Philippe Lelong.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200205/9c6fac4d/attachment.html>


More information about the Interest mailing list