gpt4 book ai didi

c++ - QNetworkAccessManager 在获取时崩溃

转载 作者:行者123 更新时间:2023-12-01 19:06:34 28 4
gpt4 key购买 nike

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. Now sometimes start to crash in this line:

QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();

其他团队成员在其他电脑和地方运行此代码当然不会出现问题。可能是什么原因?!网络问题、防病毒软件、防火墙(尝试将两者都关闭但没有成功)等?!为什么它调用 QNetworkProxy::setPassword?!我没有代理,尝试显式设置 NoProxy 但没有成功。可能是什么问题?有什么想法吗?

最佳答案

通过重新启动重新安装 Qt 和 Creator 会有所帮助。

关于c++ - QNetworkAccessManager 在获取时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35185446/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com