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

coroberti . coroberti at gmail.com
Tue Feb 4 10:45:27 CET 2020


Sorry, I meant allocation of QNetworkAccessManager object
by new operator (dynamic) versus its allocation on function scope (static).

Kind regards,
Robert

On Tue, Feb 4, 2020 at 11:31 AM maitai <maitai at virtual-winds.org> wrote:
>
> Thanks Robert,
>
> What do you mean by dynamic allocation versus static? In our app all our
> libs are linked statically, all qt libs are dynamics, I cannot change
> that easily.
>
> Philippe.
>
> Le 04-02-2020 09:07, coroberti . a écrit :
> > Dear Philippe,
> > Try to change dynamic allocation to static and if the matters come to
> > order,
> > there's some memory corruption as my experience.
> >
> > jm2c
> >
> > Kind regards,
> > Robert Iakobashvili
> > ............................
> >
> > On Tue, Feb 4, 2020 at 10:02 AM maitai <maitai at virtual-winds.org>
> > wrote:
> >>
> >> Hi all,
> >>
> >> While the mail list was broken I did some further experiments:
> >>
> >> If I move the creation of QNetworkAccessManager into main.cpp, it also
> >> crashes, but only if I put it after QApplication app(argc, argv);
> >>
> >> The funny part being that if I create a QneworkAccessManager before
> >> and
> >> just delete it, then my regular QNetworkAccessManager instantiated in
> >> MainWindow does not crash anymore.
> >>
> >> So my workaround is in main.cpp:
> >>
> >>      QNetworkAccessManager *inet = new QNetworkAccessManager();
> >>      QApplication app(argc, argv);
> >>      delete inet;
> >>
> >> And then all is back to OK.
> >>
> >> I have tried to reproduce that in a small sample but failed. I have
> >> build a small app with the same qt modules, the same linked libraries,
> >> running in the same directory, but failed to reproduce it.
> >>
> >> Any idea about what can go wrong here?
> >>
> >> Thanks
> >> Philippe
> >>
> >> Le 01-02-2020 20:11, maitai a écrit :
> >> > Hi all
> >> >
> >> > I am trying to upgrade from qt5.13.2/MSVC2017 to Qt5.14.1/MSVC2017
> >> >
> >> > In 5.14.1 (and 0) app is crashing on "QNetWorkAccessManager
> >> > *inetManager = new QNetWorkAccessManager()", while all is OK in
> >> > previous Qt versions
> >> >
> >> > I cannot debug this on Windows. I have removed all old dlls etc
> >> > (including SSL ones) in the directory where app is running. Obviously
> >> > something is wrong on my side since I cannot believe
> >> > QNetworkAccessManager is broken in Qt5.14.x/Windows..
> >> >
> >> > Any idea?
> >> > _______________________________________________
> >> > Interest mailing list
> >> > Interest at qt-project.org
> >> > https://lists.qt-project.org/listinfo/interest
> >> _______________________________________________
> >> Interest mailing list
> >> Interest at qt-project.org
> >> https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest


More information about the Interest mailing list