Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: QNetworkAccessManager smart handling of timeouts / network errors

  1. #1
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question QNetworkAccessManager smart handling of timeouts / network errors

    I'm working with QNetworkAccessManager and I have some cases in which the whole application hangs after the get() call if there was no network connection. (For example if I don't allow the outgoing connection via the firewall dialog).

    My implementation supports multiple active downloads. I've seen some online advice (here / StackOverflow I think) about using timers to check the downloadProgress. But is there really no better way to do this?

    Sorry if I'm being vague - I'd just like to hear about other possible solutions.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    QNetworkAccessManager shouldn't behave like that. Please show us your code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    Thanks for your constant assistance.

    I have a wrapper for QNetworkAccessManager and a small DownloadInfo object wrapping the QNetworkReply objects.

    My scenario is the following: after the download call is run my firewall asks me whether to allow the connection or not. If I choose to block it, the application hangs.

    In my constructor I connect to the finished signal which is not fired in this case:

    Qt Code:
    1. connect(manager, SIGNAL(finished(QNetworkReply*)),
    2. this, SLOT(replyFinished(QNetworkReply*)));
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. void NetAccessWrapper::download(const QString &url, const QString &destinationPath)
    2. {
    3. QUrl urlObj;
    4. QNetworkRequest request;
    5. urlObj.setUrl(url, QUrl::StrictMode);
    6. request.setUrl(urlObj);
    7. QNetworkReply *reply = manager->get(request);
    8.  
    9. // Just in case I'm connecting to the error signal which is not emitted
    10. bool ok = connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onError(QNetworkReply::NetworkError)));
    11.  
    12. // Container for the reply object
    13. DownloadInfoWrapper *downloadInfo = new DownloadInfoWrapper(reply);
    14. downloadInfo->url = url;
    15. downloadInfo->targetFileName = destinationPath;
    16.  
    17. // QMap of download info objects
    18. activeDownloads.insert(url, downloadInfo);
    19.  
    20. // This signal is also not fired in this case
    21. connect(downloadInfo, SIGNAL(downloadProgress(QString, qint64, qint64)), this, SLOT(downloadProgress(QString, qint64, qint64)));
    22. }
    To copy to clipboard, switch view to plain text mode 


    Added after 22 minutes:


    In case this is relevant, the whole thing is called from a modal dialog.

    I see some posts about connecting to a readyRead signal.. but my issue is how can I tell if this signal is never emitted. I see waitForReadyRead is not implemented for QNetworkReply so I'm a bit lost.
    Last edited by frankiefrank; 17th May 2011 at 15:07.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    And how do you know your application hangs? Do the windows get repainted when you obscure them with other windows?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    The windows do get repainted but the UI is blocked and the taskbar icon doesn't minimize/restore the window. Both the main window and the dialog from within I'm running the network related code do not respond.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    Quote Originally Posted by frankiefrank View Post
    The windows do get repainted
    So your application doesn't hang if it is still executing code.

    but the UI is blocked and the taskbar icon doesn't minimize/restore the window. Both the main window and the dialog from within I'm running the network related code do not respond.
    Use a debugger to see where the control flow in your application is at the moment when you experience this behaviour.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    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:

    Qt Code:
    1. 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++
    2. QtCored4.dll!QString::toULongLong(bool * ok=0x0018d5d3, int base=10) Line 5540 + 0x1d bytes C++
    3. QtCored4.dll!QString::toUInt(bool * ok=0x0018d5d3, int base=10) Line 5667 + 0x10 bytes C++
    4. QtNetworkd4.dll!parseIp4(const QString & address="127.0.0.1", unsigned int * addr=0x0018d614) Line 166 + 0x1a bytes C++
    5. QtNetworkd4.dll!QHostAddressPrivate::parse() Line 280 + 0xd bytes C++
    6. QtNetworkd4.dll!QHostAddress::setAddress(const QString & address="127.0.0.1") Line 655 C++
    7. QtNetworkd4.dll!QHostAddress::QHostAddress(QHostAddress::SpecialAddress address=LocalHost) Line 546 + 0x28 bytes C++
    8. QtNetworkd4.dll!QHostAddress::operator==(QHostAddress::SpecialAddress other=LocalHost) Line 839 + 0xc bytes C++
    9. QtNetworkd4.dll!QNativeSocketEnginePrivate::checkProxy(const QHostAddress & address={...}) Line 282 + 0xa bytes C++
    10. QtNetworkd4.dll!QNativeSocketEngine::connectToHost(const QHostAddress & address={...}, unsigned short port=80) Line 521 + 0xc bytes C++
    11. QtNetworkd4.dll!QNativeSocketEngine::connectionNotification() Line 546 C++
    12. QtNetworkd4.dll!QWriteNotifier::event(QEvent * e=0x0018dc6c) Line 1134 C++
    13. QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x02a19560, QEvent * e=0x0018dc6c) Line 4462 + 0x11 bytes C++
    14. QtGuid4.dll!QApplication::notify(QObject * receiver=0x02a19560, QEvent * e=0x0018dc6c) Line 3862 + 0x10 bytes C++
    15. QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x02a19560, QEvent * event=0x0018dc6c) Line 731 + 0x15 bytes C++
    16. > QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver=0x02a19560, QEvent * event=0x0018dc6c) Line 215 + 0x39 bytes C++
    17. QtCored4.dll!qt_internal_proc(HWND__ * hwnd=0x004608fe, unsigned int message=1024, unsigned int wp=1572, long lp=656211984) Line 485 + 0xf bytes C++
    18. user32.dll!762362fa()
    19. [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
    20. user32.dll!76236d3a()
    21. user32.dll!76236ce9()
    22. user32.dll!762377c4()
    23. user32.dll!7623788a()
    24. QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 813 C++
    25. QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 1170 + 0x15 bytes C++
    26. QtCored4.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 150 C++
    27. QtCored4.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 201 + 0x2d bytes C++
    28. QtCored4.dll!QCoreApplication::exec() Line 1008 + 0x15 bytes C++
    29. QtGuid4.dll!QApplication::exec() Line 3737 C++
    30. myApp.exe!main(int argc=1, char * * argv=0x00349a18) Line 157 + 0x6 bytes C++
    31. myApp.exe!_WinMain@16() + 0x7a bytes
    32. myApp.exe!__tmainCRTStartup() Line 578 + 0x35 bytes C
    33. myApp.exe!WinMainCRTStartup() Line 403 C
    34. kernel32.dll!75f333ca()
    35. ntdll.dll!774c9ed2()
    36. ntdll.dll!774c9ea5()
    37. myApp.exe!MyContentInteractive::metaObject() Line 55 + 0x1f bytes C++
    38. ffff648d()
    To copy to clipboard, switch view to plain text mode 

    Another one:

    Qt Code:
    1. user32.dll!762360e2()
    2. [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
    3. user32.dll!762360e2()
    4. user32.dll!76243958()
    5. > QtCored4.dll!qt_GetMessageHook(int code=0, unsigned int wp=1, long lp=1629528) Line 518 + 0xb bytes C++
    6. user32.dll!76246381()
    7. user32.dll!762380a9()
    8. user32.dll!76238ba1()
    9. ntdll.dll!774a011a()
    10. user32.dll!76240735()
    11. user32.dll!762406eb()
    12. user32.dll!76240751()
    13. QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 745 + 0x15 bytes C++
    14. QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 1170 + 0x15 bytes C++
    15. QtCored4.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 150 C++
    16. QtCored4.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 201 + 0x2d bytes C++
    17. QtCored4.dll!QCoreApplication::exec() Line 1008 + 0x15 bytes C++
    18. QtGuid4.dll!QApplication::exec() Line 3737 C++
    19. MyApp.exe!main(int argc=1, char * * argv=0x00349a18) Line 157 + 0x6 bytes C++
    20. MyApp.exe!_WinMain@16() + 0x7a bytes
    21. MyApp.exe!__tmainCRTStartup() Line 578 + 0x35 bytes C
    22. MyApp.exe!WinMainCRTStartup() Line 403 C
    23. kernel32.dll!75f333ca()
    24. ntdll.dll!774c9ed2()
    25. ntdll.dll!774c9ea5()
    26. MyApp.exe!MyContentInteractive::metaObject() Line 55 + 0x1f bytes C++
    27. 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:
    Qt Code:
    1. //private:
    2. QNetworkAccessManager *mManager;
    3. QNetworkReply *reply;
    4.  
    5. //private slots:
    6. void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator);
    7. void replyFinished(QNetworkReply *reply);
    8. void downloadProgress(QString url, qint64 bytesReceived, qint64 bytesTotal);
    9. void onError(QNetworkReply::NetworkError code);
    To copy to clipboard, switch view to plain text mode 

    In my code file:
    Qt Code:
    1. // in constructor:
    2. mManager = new QNetworkAccessManager(this);
    3. bool connected = connect(mManager, SIGNAL(finished(QNetworkReply*)),
    4. this, SLOT(replyFinished(QNetworkReply*)));
    5. connected = connect(mManager, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
    6. this, SLOT(authenticationRequired(QNetworkReply*, QAuthenticator*)));
    7.  
    8. // My update action implementation:
    9. void MyApp::on_actionUpdate_triggered() {
    10. QUrl urlObj;
    11. QNetworkRequest request;
    12. urlObj.setUrl("http://www.google.com/logos/2011/paraguay11-hp.jpg", QUrl::StrictMode);
    13. request.setUrl(urlObj);
    14. reply = mManager->get(request);
    15. bool ok = connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onError(QNetworkReply::NetworkError)));
    16. }
    17.  
    18. // And some slots:
    19. void MyApp::authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)
    20. {
    21. qDebug() << DBGTIME << "auth";
    22. }
    23.  
    24. void MyApp::replyFinished(QNetworkReply *reply)
    25. {
    26. qDebug() << DBGTIME << "finished";
    27. }
    28.  
    29. void MyApp::downloadProgress(QString url, qint64 bytesReceived, qint64 bytesTotal)
    30. {
    31. qDebug() << DBGTIME << "downloadProgress";
    32. }
    33.  
    34. void MyApp::onError(QNetworkReply::NetworkError code)
    35. {
    36. qDebug() << DBGTIME << "error";
    37. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by frankiefrank; 17th May 2011 at 17:03.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    It looks like events are processed, everything should work fine. The request should eventually timeout. If you want someone else to test your program, please provide a minimal compilable example reproducing the problem.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. The following user says thank you to wysota for this useful post:

    frankiefrank (17th May 2011)

  10. #9
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    Thank you, I'll try to do this later and update here in the thread.

  11. #10
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    I couldn't upload the .zip file here because of size limitations, but here's a link to download it:
    https://rapidshare.com/files/2404840...AccessDemo.zip

    This project has a simple window with a button. The constructor initializes QNetworkAccessManager and connects to the finished/authentication required signal. Generated QNetworkReply objects' error signals are also connected to.

    I have Norton Internet Security installed. When the network request is activated a window asks me whether to allow the connection. If I deny it, I get the described behavior.

    Note: this is only if I *block* the connection, if there's no network connection to begin with the behavior is as expected (the error signal is emitted, followed by a finished signal).

  12. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    Are you aware what a minimal example is? How come it didn't fit into the forum's limitations? How much code is there? 100 files?

    Please reupload your project and make sure it only contains source files -- no executable and no intermediate files. We need four files at max -- a .pro file, a main.cpp file and optionally one .cpp and one .h file for any classes you want to implement. If you really have to, provide a .ui file too.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  13. #12
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    I'm sorry, I work with VS2008, took too many files into the zip. Should be fine now.
    Attached Files Attached Files

  14. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    I have a different firewall than you do so my equivalent of you clicking your firewall button is the following three rules:
    bash Code:
    1. iptables -I OUTPUT -p tcp -d 74.125.77.99 -j DROP
    2. iptables -I OUTPUT -p tcp -d 74.125.77.147 -j DROP
    3. iptables -I OUTPUT -p tcp -d 74.125.77.104 -j DROP
    To copy to clipboard, switch view to plain text mode 

    ... where the three IP addresses are what the dns returns for www.google.com.

    After I run the program and click the "Connect" button, I don't experience any weird behaviour (actually I don't experience any feedback at all) -- I can resize and move the window as usual. Is there something else that should be happening?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  15. #14
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    When exactly do you call these commands?

    If it's before running the application, this is weird because this means the finished() signal is not emitted even though there's definitely a get() call.

    To simulate my case, if you have a popup for the firewall question, this should occur after the get() is called. THEN if I'm not allowing the connection I'd get the UI being stuck as I described.

  16. #15
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    Quote Originally Posted by frankiefrank View Post
    When exactly do you call these commands?
    Before running the application, of course.

    If it's before running the application, this is weird because this means the finished() signal is not emitted even though there's definitely a get() call.
    Why would it be emitted?

    To simulate my case, if you have a popup for the firewall question, this should occur after the get() is called. THEN if I'm not allowing the connection I'd get the UI being stuck as I described.
    The popup is meaningless. What's important is that no packets go through and no information is returned to the transmitting application. Remember that your firewall semantics is "deny/drop unless accepted" and not "accept unless denied", so you have "drop" by default and only accepting the popup causes an "accept" (the packets don't go through the firewall between the time the popup shows and you click the "allow" button).

    Try using wireshark to monitor the exact traffic between your application and the firewall to see if the firewall informes your app that it drops the connection if you want. But whatever the firewall does, it shouldn't prevent the application from processing events.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  17. The following user says thank you to wysota for this useful post:

    frankiefrank (18th May 2011)

  18. #16
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    Quote Originally Posted by wysota View Post
    Why would it be emitted?
    If I understand the documentation, if a request fails (in this case because of the firewal) it should cause one or more of these signals to be emitted: error / finished / downloadProgress (with 0 value for both bytes recieved and total).

    That's definitely the case for me if there's no network to begin with - you get an error signal with the code "host not found".

    Quote Originally Posted by wysota View Post
    But whatever the firewall does, it shouldn't prevent the application from processing events.
    That sounds sensible, but it's definitely the behavior I'm experiencing. I'll try monitoring the traffic as you suggest but I'm not sure what I'm looking for. Could this be an issue specific to Qt and Norton Internet Security?

  19. #17
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    Quote Originally Posted by frankiefrank View Post
    If I understand the documentation, if a request fails (in this case because of the firewal) it should cause one or more of these signals to be emitted: error / finished / downloadProgress (with 0 value for both bytes recieved and total).
    The point is the application has no idea that no packets went through. The firewall would have to return a "connection refused" packet to the application. iptables doesn't do that with its DROP policy (REJECT would have done that). The application will learn of the failure only when the network operation times out and the system notifies us about it (usually after 5-10 minutes depending on the system settings).

    That's definitely the case for me if there's no network to begin with - you get an error signal with the code "host not found".
    That's a different situation.

    That sounds sensible, but it's definitely the behavior I'm experiencing.
    I'm not so sure since your windows get redrawn.
    Could this be an issue specific to Qt and Norton Internet Security?
    I'd say this was specific to Norton Internet Security. I wouldn't be suprised if another firewall behaved differently. Maybe it's a matter of tweaking the settings.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  20. #18
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    Can I open a bug with Qt if it's suspected as a compatibility issue with a product?

  21. #19
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    Quote Originally Posted by frankiefrank View Post
    Can I open a bug with Qt if it's suspected as a compatibility issue with a product?
    You can do that, sure. But first verify that is indeed the case. So far you are only assuming so.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  22. #20
    Join Date
    Jan 2006
    Posts
    10
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Windows

    Default Re: QNetworkAccessManager smart handling of timeouts / network errors

    My guess is that your QT library was built against SSL. QNetworkAccessManager looks for the ssl dlls, libeay32.dll and ssleay32.dll. The Win32 LoadLibrary hangs the entire process, UI, signals slots, everything, while it attempts to load these dlls. Copy these dlls to your executable's directory and the loads will quickly succeed.

Similar Threads

  1. QNetworkAccessManager and network errors
    By lukass in forum Newbie
    Replies: 8
    Last Post: 23rd February 2011, 10:23
  2. Network statistics with QNetworkAccessManager
    By The_Fallen in forum Qt Programming
    Replies: 7
    Last Post: 20th September 2010, 01:01
  3. get network stream with QNetworkAccessManager
    By Remco in forum Qt Programming
    Replies: 0
    Last Post: 26th August 2010, 16:25
  4. Replies: 0
    Last Post: 7th August 2010, 09:55
  5. QNetworkAccessManager get request causing QSslSocket errors
    By Runtime Technologies in forum Qt Programming
    Replies: 5
    Last Post: 29th July 2009, 22:57

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.