QNetworkAccessManager 在获取时崩溃
QNetworkAccessManager crashes on get
QNetworkAccessManager 工作得很好,然后每次在非常简单的 get() 方法上开始崩溃:
QNetworkReply *reply = myManager->get(QNetworkRequest(QUrl(myUrl)));
堆栈如下:
0 RtlpAllocateHeap ntdll 0x77a93364
1 RtlAllocateHeap ntdll 0x77a93074
2 RtlDebugAllocateHeap ntdll 0x77b310d3
3 RtlpAllocateHeap ntdll 0x77aeb16e
4 RtlAllocateHeap ntdll 0x77a93074
5 _heap_alloc_base MSVCR100D 0x53be8343
6 _nh_malloc_dbg MSVCR100D 0x53bf697c
7 _nh_malloc_dbg MSVCR100D 0x53bf671f
8 _nh_malloc_dbg MSVCR100D 0x53bf66cc
9 malloc MSVCR100D 0x53bf9c5b
10 operator new MSVCR100D 0x53be7db1
11 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53cecbff
12 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53efa480
13 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53dbc736
14 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53db97d1
15 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53db9d26
16 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e0ea8b
17 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e2417c
18 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53db8d02
19 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53db9f4d
20 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e2c690
21 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e2d020
22 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e2c13b
23 QNetworkProxy::setPassword QtNetworkd4 0x536593e3
24 QNetworkProxy::setPassword QtNetworkd4 0x53658a58
25 QNetworkProxy::setPassword QtNetworkd4 0x53656eb4
26 QNetworkProxy::setPassword QtNetworkd4 0x5365359e
27 QNetworkProxy::setPassword QtNetworkd4 0x536534b8
28 QNetworkProxy::setPassword QtNetworkd4 0x536537ea
29 QNetworkProxy::setPassword QtNetworkd4 0x5360c06f
30 QNetworkProxy::setPassword QtNetworkd4 0x5360b2ec
31 get command here myfile.cpp 73 0x552b9123
32 main main.cpp 409 0x13aca9
33 WinMain qtmain_win.cpp 131 0xa0e55a
34 __tmainCRTStartup crtexe.c 547 0xa0d7d0
35 WinMainCRTStartup crtexe.c 371 0xa0d55f
36 BaseThreadInitThunk kernel32 0x75f9336a
37 __RtlUserThreadStart ntdll 0x77a992b2
38 _RtlUserThreadStart ntdll 0x77a99285
P.S。现在有时会在这一行开始崩溃:
QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();
其他团队成员 运行 当然,此代码在其他 PC 和地方没有问题。可能是什么原因?!网络问题、杀毒软件、防火墙(尝试关闭两者都没有成功)等等?!为什么它调用 QNetworkProxy::setPassword?!我没有代理,也尝试过明确设置 NoProxy
但没有成功。可能是什么问题?有什么想法吗?
重新安装 Qt 和 creator 有帮助。
QNetworkAccessManager 工作得很好,然后每次在非常简单的 get() 方法上开始崩溃:
QNetworkReply *reply = myManager->get(QNetworkRequest(QUrl(myUrl)));
堆栈如下:
0 RtlpAllocateHeap ntdll 0x77a93364 1 RtlAllocateHeap ntdll 0x77a93074 2 RtlDebugAllocateHeap ntdll 0x77b310d3 3 RtlpAllocateHeap ntdll 0x77aeb16e 4 RtlAllocateHeap ntdll 0x77a93074 5 _heap_alloc_base MSVCR100D 0x53be8343 6 _nh_malloc_dbg MSVCR100D 0x53bf697c 7 _nh_malloc_dbg MSVCR100D 0x53bf671f 8 _nh_malloc_dbg MSVCR100D 0x53bf66cc 9 malloc MSVCR100D 0x53bf9c5b 10 operator new MSVCR100D 0x53be7db1 11 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53cecbff 12 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53efa480 13 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53dbc736 14 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53db97d1 15 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53db9d26 16 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e0ea8b 17 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e2417c 18 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53db8d02 19 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53db9f4d 20 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e2c690 21 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e2d020 22 QByteArrayMatcher::~QByteArrayMatcher QtCored4 0x53e2c13b 23 QNetworkProxy::setPassword QtNetworkd4 0x536593e3 24 QNetworkProxy::setPassword QtNetworkd4 0x53658a58 25 QNetworkProxy::setPassword QtNetworkd4 0x53656eb4 26 QNetworkProxy::setPassword QtNetworkd4 0x5365359e 27 QNetworkProxy::setPassword QtNetworkd4 0x536534b8 28 QNetworkProxy::setPassword QtNetworkd4 0x536537ea 29 QNetworkProxy::setPassword QtNetworkd4 0x5360c06f 30 QNetworkProxy::setPassword QtNetworkd4 0x5360b2ec 31 get command here myfile.cpp 73 0x552b9123 32 main main.cpp 409 0x13aca9 33 WinMain qtmain_win.cpp 131 0xa0e55a 34 __tmainCRTStartup crtexe.c 547 0xa0d7d0 35 WinMainCRTStartup crtexe.c 371 0xa0d55f 36 BaseThreadInitThunk kernel32 0x75f9336a 37 __RtlUserThreadStart ntdll 0x77a992b2 38 _RtlUserThreadStart ntdll 0x77a99285
P.S。现在有时会在这一行开始崩溃:
QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();
其他团队成员 运行 当然,此代码在其他 PC 和地方没有问题。可能是什么原因?!网络问题、杀毒软件、防火墙(尝试关闭两者都没有成功)等等?!为什么它调用 QNetworkProxy::setPassword?!我没有代理,也尝试过明确设置 NoProxy
但没有成功。可能是什么问题?有什么想法吗?
重新安装 Qt 和 creator 有帮助。