Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

QNetworkAccessManager gives an error



  • Hi, I just installed openssl to make HTTP request with QNetworkAccessManager, but I think I did something wrong.

    On a fresh QT template in visual studio, I simply create a QNetworkAccessManager object or pointer and it gives me this error :

    " Invalid parameter passed to C runtime function. "

    If I continue the code and make a request, everything works as expected but I still get this error. It pops up in the console about 16 time every ~10 seconds.

    What did I do wrong?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of Qt are you using ?
    What version of OpenSSL did you install ?
    How did you install it ?


  • Moderators

    hi @mstackoverflow and welcome

    I noticed this message in one of the earlier version of Qt5.12 but I think it fixed itself.
    For me this was related to QML &! QSettings



  • @sgaist said in QNetworkAccessManager gives an error:

    Hi and welcome to devnet,

    What version of Qt are you using ?
    What version of OpenSSL did you install ?
    How did you install it ?

    I have QT 5.13.0 32-bit.
    I have downloaded and installed the 32-bit light version of this : https://slproweb.com/products/Win32OpenSSL.html .
    I got it from what I read on stackoverflow, I hope it was a reliable source.
    I've run the .exe and default install. Also, I've put "libcrypto-1_1.dll" and "libssl-1_1.dll" in the debug folder.

    Seeing this error I tried reinstalling openssl so I deleted the openssl in "Add or remove programs" but my program was still working so I don't think I've deleted it properly. It works even without the dlls.

    @j-hilk said in QNetworkAccessManager gives an error:

    hi @mstackoverflow and welcome

    I noticed this message in one of the earlier version of Qt5.12 but I think it fixed itself.
    For me this was related to QML &! QSettings

    I'm running Qt5.13 on visual studio 2019 with a fresh QT template. Is "QML &! QSettings" suppose to be somewhere?


  • Moderators

    @mstackoverflow

    I'm running Qt5.13 on visual studio 2019 with a fresh QT template. Is "QML &! QSettings" suppose to be somewhere?

    I‘m not using 5.13, but I asume it would be fixed there by now.
    Also, when your using pure QWidgets and do not use QSettings in your app, than it probably won‘t apply to your situation anyway.



  • @j-hilk said in QNetworkAccessManager gives an error:

    I‘m not using 5.13, but I asume it would be fixed there by now.

    Unfortunately, I still get the error on 5.13 .


  • Lifetime Qt Champion

    If it's still working despite remove OpenSSL, it means that you have these dlls in one of the folders listed in the PATH environment variable. If you want to ensure the version you want your application to use, copy the libraries in the same folder as your application.



  • @SGaist

    I am using Qt 5.12.3, Visual Studio 2017, and platform windows.

    Qt version:
    bd5b661d-5201-48c2-85ba-dc15f0eacf3a-image.png

    I have same issue. My application is work fine but compiler output is printing Invalid parameter passed to C runtime function. .
    I copy update openSSL libraries at $(OutDir) of my application. still got same warning.

    Below code I try on separate project.

    #include <QtCore/QCoreApplication>
    #include <qnetworkaccessmanager.h>
    
    int main(int argc, char *argv[])
    {
    	QCoreApplication a(argc, argv);
    	QNetworkAccessManager networkAccess;
    	return a.exec();
    }
    

    Compile Output:

    Qt VS Tools: QML debug: Debugging project 'NetworkAccess'...
    Qt VS Tools: QML debug: DISABLED: QML debugging disabled in Qt project settings
    'NetworkAccess.exe' (Win32): Loaded '***********\NetworkAccess\debug\NetworkAccess.exe'. Symbols loaded.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Program Files\AVAST Software\Avast\x86\aswhook.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Qt\5.12.3\msvc2017\bin\Qt5Networkd.dll'. Symbols loaded.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Qt\5.12.3\msvc2017\bin\Qt5Cored.dll'. Symbols loaded.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\SHCore.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\windows.storage.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\profapi.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptsp.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dnsapi.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mpr.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\netapi32.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\userenv.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\netutils.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\srvcli.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
    The thread 0x1cf8 has exited with code 0 (0x0).
    'NetworkAccess.exe' (Win32): Loaded 'C:\Qt\5.12.3\msvc2017\plugins\bearer\qgenericbearerd.dll'. Symbols loaded.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dhcpcsvc6.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dhcpcsvc.dll'. Cannot find or open the PDB file.
    'NetworkAccess.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    The thread 0x3838 has exited with code 0 (0x0).
    The program '[4452] NetworkAccess.exe' has exited with code 0 (0x0).
    

    Do you want me try any other things ?

    @MStackoverflow did you solve issue?



  • As Thiago Macieira suggest in https://bugreports.qt.io/browse/QTBUG-70917. To Solve this issue remove qgenericbearerd from plugin from location Qt\5.12.3\msvc2017\plugins\bearer\.
    and it is working. it is not printing warning.

    another solution is to update the windows build to 9d05c5df-e81b-4291-b966-a584300264f1-image.png


Log in to reply