I apologize, perhaps I shouldn't have used the word "hang" - what is definite is that the UI is stuck and I can't do anything to cause a signal to be emitted. I can't close the dialog or click a button. I wanted to implement a timer to check occasionally the status of my reply objects, but that timer didn't fire the timeout() signal as well.
If I pause at different moments during this "freeze" I get a different place. Callstack is very long. Here's a sample:
QtCored4.
dll!QLocalePrivate
::stringToUnsLongLong(const QString & number
="127",
int base
=10,
bool * ok
=0x0018d587, QLocalePrivate
::GroupSeparatorMode group_sep_mode
=FailOnGroupSeparators
) Line
4501 + 0x1 bytes C
++ QtCored4.
dll!QString::toULongLong(bool * ok
=0x0018d5d3,
int base
=10) Line
5540 + 0x1d bytes C
++ QtCored4.
dll!QString::toUInt(bool * ok
=0x0018d5d3,
int base
=10) Line
5667 + 0x10 bytes C
++ QtNetworkd4.
dll!parseIp4
(const QString & address
="127.0.0.1",
unsigned int * addr
=0x0018d614
) Line
166 + 0x1a bytes C
++ QtNetworkd4.dll!QHostAddressPrivate::parse() Line 280 + 0xd bytes C++
QtNetworkd4.
dll!QNativeSocketEnginePrivate
::checkProxy(const QHostAddress & address
={...
}) Line
282 + 0xa bytes C
++ QtNetworkd4.
dll!QNativeSocketEngine
::connectToHost(const QHostAddress & address
={...
},
unsigned short port
=80) Line
521 + 0xc bytes C
++ QtNetworkd4.dll!QNativeSocketEngine::connectionNotification() Line 546 C++
QtNetworkd4.
dll!QWriteNotifier
::event(QEvent * e
=0x0018dc6c
) Line
1134 C
++ QtGuid4.
dll!QApplicationPrivate
::notify_helper(QObject * receiver
=0x02a19560,
QEvent * e
=0x0018dc6c
) Line
4462 + 0x11 bytes C
++ QtCored4.dll!qt_internal_proc(HWND__ * hwnd=0x004608fe, unsigned int message=1024, unsigned int wp=1572, long lp=656211984) Line 485 + 0xf bytes C++
user32.dll!762362fa()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!76236d3a()
user32.dll!76236ce9()
user32.dll!762377c4()
user32.dll!7623788a()
QtCored4.
dll!QEventDispatcherWin32
::processEvents(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
={...
}) Line
813 C
++ QtGuid4.
dll!QGuiEventDispatcherWin32
::processEvents(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
={...
}) Line
1170 + 0x15 bytes C
++ QtCored4.
dll!QEventLoop::processEvents(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
={...
}) Line
150 C
++ QtCored4.
dll!QEventLoop::exec(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
={...
}) Line
201 + 0x2d bytes C
++ myApp.exe!main(int argc=1, char * * argv=0x00349a18) Line 157 + 0x6 bytes C++
myApp.exe!_WinMain@16() + 0x7a bytes
myApp.exe!__tmainCRTStartup() Line 578 + 0x35 bytes C
myApp.exe!WinMainCRTStartup() Line 403 C
kernel32.dll!75f333ca()
ntdll.dll!774c9ed2()
ntdll.dll!774c9ea5()
myApp.exe!MyContentInteractive::metaObject() Line 55 + 0x1f bytes C++
ffff648d()
QtCored4.dll!QLocalePrivate::stringToUnsLongLong(const QString & number="127", int base=10, bool * ok=0x0018d587, QLocalePrivate::GroupSeparatorMode group_sep_mode=FailOnGroupSeparators) Line 4501 + 0x1 bytes C++
QtCored4.dll!QString::toULongLong(bool * ok=0x0018d5d3, int base=10) Line 5540 + 0x1d bytes C++
QtCored4.dll!QString::toUInt(bool * ok=0x0018d5d3, int base=10) Line 5667 + 0x10 bytes C++
QtNetworkd4.dll!parseIp4(const QString & address="127.0.0.1", unsigned int * addr=0x0018d614) Line 166 + 0x1a bytes C++
QtNetworkd4.dll!QHostAddressPrivate::parse() Line 280 + 0xd bytes C++
QtNetworkd4.dll!QHostAddress::setAddress(const QString & address="127.0.0.1") Line 655 C++
QtNetworkd4.dll!QHostAddress::QHostAddress(QHostAddress::SpecialAddress address=LocalHost) Line 546 + 0x28 bytes C++
QtNetworkd4.dll!QHostAddress::operator==(QHostAddress::SpecialAddress other=LocalHost) Line 839 + 0xc bytes C++
QtNetworkd4.dll!QNativeSocketEnginePrivate::checkProxy(const QHostAddress & address={...}) Line 282 + 0xa bytes C++
QtNetworkd4.dll!QNativeSocketEngine::connectToHost(const QHostAddress & address={...}, unsigned short port=80) Line 521 + 0xc bytes C++
QtNetworkd4.dll!QNativeSocketEngine::connectionNotification() Line 546 C++
QtNetworkd4.dll!QWriteNotifier::event(QEvent * e=0x0018dc6c) Line 1134 C++
QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x02a19560, QEvent * e=0x0018dc6c) Line 4462 + 0x11 bytes C++
QtGuid4.dll!QApplication::notify(QObject * receiver=0x02a19560, QEvent * e=0x0018dc6c) Line 3862 + 0x10 bytes C++
QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x02a19560, QEvent * event=0x0018dc6c) Line 731 + 0x15 bytes C++
> QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver=0x02a19560, QEvent * event=0x0018dc6c) Line 215 + 0x39 bytes C++
QtCored4.dll!qt_internal_proc(HWND__ * hwnd=0x004608fe, unsigned int message=1024, unsigned int wp=1572, long lp=656211984) Line 485 + 0xf bytes C++
user32.dll!762362fa()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!76236d3a()
user32.dll!76236ce9()
user32.dll!762377c4()
user32.dll!7623788a()
QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 813 C++
QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 1170 + 0x15 bytes C++
QtCored4.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 150 C++
QtCored4.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 201 + 0x2d bytes C++
QtCored4.dll!QCoreApplication::exec() Line 1008 + 0x15 bytes C++
QtGuid4.dll!QApplication::exec() Line 3737 C++
myApp.exe!main(int argc=1, char * * argv=0x00349a18) Line 157 + 0x6 bytes C++
myApp.exe!_WinMain@16() + 0x7a bytes
myApp.exe!__tmainCRTStartup() Line 578 + 0x35 bytes C
myApp.exe!WinMainCRTStartup() Line 403 C
kernel32.dll!75f333ca()
ntdll.dll!774c9ed2()
ntdll.dll!774c9ea5()
myApp.exe!MyContentInteractive::metaObject() Line 55 + 0x1f bytes C++
ffff648d()
To copy to clipboard, switch view to plain text mode
Another one:
user32.dll!762360e2()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!762360e2()
user32.dll!76243958()
> QtCored4.dll!qt_GetMessageHook(int code=0, unsigned int wp=1, long lp=1629528) Line 518 + 0xb bytes C++
user32.dll!76246381()
user32.dll!762380a9()
user32.dll!76238ba1()
ntdll.dll!774a011a()
user32.dll!76240735()
user32.dll!762406eb()
user32.dll!76240751()
QtCored4.
dll!QEventDispatcherWin32
::processEvents(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
={...
}) Line
745 + 0x15 bytes C
++ QtGuid4.
dll!QGuiEventDispatcherWin32
::processEvents(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
={...
}) Line
1170 + 0x15 bytes C
++ QtCored4.
dll!QEventLoop::processEvents(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
={...
}) Line
150 C
++ QtCored4.
dll!QEventLoop::exec(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
={...
}) Line
201 + 0x2d bytes C
++ MyApp.exe!main(int argc=1, char * * argv=0x00349a18) Line 157 + 0x6 bytes C++
MyApp.exe!_WinMain@16() + 0x7a bytes
MyApp.exe!__tmainCRTStartup() Line 578 + 0x35 bytes C
MyApp.exe!WinMainCRTStartup() Line 403 C
kernel32.dll!75f333ca()
ntdll.dll!774c9ed2()
ntdll.dll!774c9ea5()
MyApp.exe!MyContentInteractive::metaObject() Line 55 + 0x1f bytes C++
ffff648d()
user32.dll!762360e2()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!762360e2()
user32.dll!76243958()
> QtCored4.dll!qt_GetMessageHook(int code=0, unsigned int wp=1, long lp=1629528) Line 518 + 0xb bytes C++
user32.dll!76246381()
user32.dll!762380a9()
user32.dll!76238ba1()
ntdll.dll!774a011a()
user32.dll!76240735()
user32.dll!762406eb()
user32.dll!76240751()
QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 745 + 0x15 bytes C++
QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 1170 + 0x15 bytes C++
QtCored4.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 150 C++
QtCored4.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 201 + 0x2d bytes C++
QtCored4.dll!QCoreApplication::exec() Line 1008 + 0x15 bytes C++
QtGuid4.dll!QApplication::exec() Line 3737 C++
MyApp.exe!main(int argc=1, char * * argv=0x00349a18) Line 157 + 0x6 bytes C++
MyApp.exe!_WinMain@16() + 0x7a bytes
MyApp.exe!__tmainCRTStartup() Line 578 + 0x35 bytes C
MyApp.exe!WinMainCRTStartup() Line 403 C
kernel32.dll!75f333ca()
ntdll.dll!774c9ed2()
ntdll.dll!774c9ea5()
MyApp.exe!MyContentInteractive::metaObject() Line 55 + 0x1f bytes C++
ffff648d()
To copy to clipboard, switch view to plain text mode
Added after 41 minutes:
I've recreated the problem using no wrappers:
In my app header file:
//private:
QNetworkAccessManager *mManager;
QNetworkReply *reply;
//private slots:
void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator);
void replyFinished(QNetworkReply *reply);
void downloadProgress
(QString url, qint64 bytesReceived, qint64 bytesTotal
);
void onError(QNetworkReply::NetworkError code);
//private:
QNetworkAccessManager *mManager;
QNetworkReply *reply;
//private slots:
void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator);
void replyFinished(QNetworkReply *reply);
void downloadProgress(QString url, qint64 bytesReceived, qint64 bytesTotal);
void onError(QNetworkReply::NetworkError code);
To copy to clipboard, switch view to plain text mode
In my code file:
// in constructor:
mManager = new QNetworkAccessManager(this);
bool connected = connect(mManager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(replyFinished(QNetworkReply*)));
connected = connect(mManager, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
this, SLOT(authenticationRequired(QNetworkReply*, QAuthenticator*)));
// My update action implementation:
void MyApp::on_actionUpdate_triggered() {
QNetworkRequest request;
urlObj.
setUrl("http://www.google.com/logos/2011/paraguay11-hp.jpg",
QUrl::StrictMode);
request.setUrl(urlObj);
reply = mManager->get(request);
bool ok = connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onError(QNetworkReply::NetworkError)));
}
// And some slots:
void MyApp::authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)
{
qDebug() << DBGTIME << "auth";
}
void MyApp::replyFinished(QNetworkReply *reply)
{
qDebug() << DBGTIME << "finished";
}
void MyApp
::downloadProgress(QString url, qint64 bytesReceived, qint64 bytesTotal
) {
qDebug() << DBGTIME << "downloadProgress";
}
void MyApp::onError(QNetworkReply::NetworkError code)
{
qDebug() << DBGTIME << "error";
}
// in constructor:
mManager = new QNetworkAccessManager(this);
bool connected = connect(mManager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(replyFinished(QNetworkReply*)));
connected = connect(mManager, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
this, SLOT(authenticationRequired(QNetworkReply*, QAuthenticator*)));
// My update action implementation:
void MyApp::on_actionUpdate_triggered() {
QUrl urlObj;
QNetworkRequest request;
urlObj.setUrl("http://www.google.com/logos/2011/paraguay11-hp.jpg", QUrl::StrictMode);
request.setUrl(urlObj);
reply = mManager->get(request);
bool ok = connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onError(QNetworkReply::NetworkError)));
}
// And some slots:
void MyApp::authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)
{
qDebug() << DBGTIME << "auth";
}
void MyApp::replyFinished(QNetworkReply *reply)
{
qDebug() << DBGTIME << "finished";
}
void MyApp::downloadProgress(QString url, qint64 bytesReceived, qint64 bytesTotal)
{
qDebug() << DBGTIME << "downloadProgress";
}
void MyApp::onError(QNetworkReply::NetworkError code)
{
qDebug() << DBGTIME << "error";
}
To copy to clipboard, switch view to plain text mode
Bookmarks