Microsoft Visual C++ Runtime Library error on new QNetworkAccessManager();



  • @QNetworkAccessManager *manager = new QNetworkAccessManager();@
    or
    @QNetworkAccessManager *manager = new QNetworkAccessManager(this);@
    causes
    !http://www.karadis.net/blog/wp-content/uploads/2011/02/IE8_32bit_print_error.jpg(Microsoft Visual C++ Runtime Library error)!
    Installation of vcredist_x86, vcredist_x64 2010, 2013 and also Qt\5.4.0\vcredist\vcredist_x86.exe did not help.
    qt-opensource-windows-x86-mingw491_opengl-5.4.0
    Windows 7 x64.



  • qt-opensource-windows-x86-mingw491_opengl-5.4.0
    probably means your compiler should be mingw.

    I am not an expert in it, but I doubt it is binary compatible with MS VC.
    So I do not see how installing VC redistributable could help.
    Make sure you do not mix components built with different compilers.

    Regards,
    Alex


  • Moderators

    First thing you should do is run it under a debugger and see what it tells you. Creating a QNAM instance is not the problem. It's a symptom of some other problem.
    Sounds like you mixed up some dlls on deployment.
    Did you copy the right dlls from Qt directory to your app directory? Which ones and from where to where exactly?


  • Moderators

    Your reply somehow vanished during today's forum blackout, but I'm responding to what I got in email notification.

    Don't pollute PATH. It's a bad practice and will cause problems, especially if you have multiple Qt versions. Also don't modify PATH on users computers. That's just rude.
    You are expected to copy Qt dlls to the app directory. That's how you deploy it.
    To check if the right dlls are loaded go to Window -> Views ->Debugger Log. Then start debugging your app. The log will output all loaded modules paths. You can verify it finds the right ones.
    Remember that the debug version should load dlls with "d" at the back of the name e.g. Qt5Cored.dll



  • Of course I will not deploy app in this way, i just trying understand why MS VC++ Runtume Library gives error.
    From debug log i see that dlls paths correct:
    bq. C:\Qt\5.4.0\5.4\mingw491_32\bin\Qt5Cored.dll
    C:\Qt\5.4.0\Tools\mingw491_32\opt\bin\libgcc_s_dw2-1.dll
    C:\Qt\5.4.0\Tools\mingw491_32\opt\bin\libwinpthread-1.dll
    C:\Qt\5.4.0\5.4\mingw491_32\bin\libstdc++-6.dll
    C:\Qt\5.4.0\5.4\mingw491_32\bin\icuin53.dll
    C:\Qt\5.4.0\5.4\mingw491_32\bin\icuuc53.dll
    C:\Qt\5.4.0\5.4\mingw491_32\bin\icudt53.dll
    C:\Qt\5.4.0\5.4\mingw491_32\bin\Qt5Qmld.dll
    C:\Qt\5.4.0\5.4\mingw491_32\bin\Qt5Networkd.dll
    C:\Qt\5.4.0\5.4\mingw491_32\bin\Qt5Widgetsd.dll
    C:\Qt\5.4.0\5.4\mingw491_32\bin\Qt5Guid.dll
    C:\Qt\5.4.0\5.4\mingw491_32\plugins\platforms\qwindowsd.dll
    C:\Qt\5.4.0\5.4\mingw491_32\plugins\qmltooling\qmldbg_tcpd.dll
    C:\Qt\5.4.0\5.4\mingw491_32\qml\QtQuick.2\qtquick2plugind.dll
    C:\Qt\5.4.0\5.4\mingw491_32\bin\Qt5Quickd.dll
    C:\Qt\5.4.0\5.4\mingw491_32\qml\QtQuick\Controls\qtquickcontrolsplugind.dll
    C:\Qt\5.4.0\5.4\mingw491_32\qml\QtQuick\Window.2\windowplugind.dll
    C:\Qt\5.4.0\5.4\mingw491_32\qml\QtQuick\Dialogs\dialogplugind.dll
    C:\Qt\5.4.0\5.4\mingw491_32\qml\QtQuick\Layouts\qquicklayoutsplugind.dll
    C:\Qt\5.4.0\5.4\mingw491_32\qml\QtQuick\PrivateWidgets\widgetsplugind.dll
    C:\Qt\5.4.0\5.4\mingw491_32\plugins\bearer\qgenericbearerd.dll
    C:\Qt\5.4.0\5.4\mingw491_32\plugins\bearer\qnativewifibearerd.dll

    There is what i get from debug log after executing
    @networkAccessManager = new QNetworkAccessManager(this);@
    line (is there spoiler in message post tools?):
    dNOTE: INFERIOR RUN REQUESTED
    sRun requested...
    dState changed from InferiorStopOk(14) to InferiorRunRequested(10) [master]
    --- token barrier ---
    dNOTE: INFERIOR RUN REQUESTED
    sRun requested...
    dState changed from InferiorStopOk(14) to InferiorRunRequested(10)
    sRunning requested...
    <203-exec-continue

    203^running
    dNOTE: INFERIOR RUN OK
    sRunning.
    dState changed from InferiorRunRequested(10) to InferiorRunOk(11)
    dNOTE: INFERIOR RUN OK
    sRunning.
    dState changed from InferiorRunRequested(10) to InferiorRunOk(11) [master]
    *running,thread-id="all"
    dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.

    =thread-created,id="19",group-id="i1"
    sThread 19 created
    ~"[New Thread 5724.0x930]\n"
    s[New Thread 5724.0x930]
    *running,thread-id="all"
    dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.
    &"warning: ASSERT: "debugger->state() == QV4::Debugging::Debugger::Paused" in file debugger\qv4debugservice.cpp, line 1001\n"
    ASSERT: "debugger->state() == QV4::Debugging::Debugger::Paused" in file debugger\qv4debugservice.cpp, line 1001
    &"\n"
    &"warning: Invalid parameter passed to C runtime function.\n"
    Invalid parameter passed to C runtime function.
    &"\n"
    &"warning: Invalid parameter passed to C runtime function.\n"
    Invalid parameter passed to C runtime function.
    &"\n"
    =library-loaded,id="C:\\Qt\\5.4.0\\5.4\\mingw491_32\\plugins\\bearer\\qgenericbearerd.dll",target-name="C:\\Qt\\5.4.0\\5.4\\mingw491_32\\plugins\\bearer\\qgenericbearerd.dll",host-name="C:\\Qt\\5.4.0\\5.4\\mingw491_32\\plugins\\bearer\\qgenericbearerd.dll",symbols-loaded="0",thread-group="i1"
    sLibrary C:\Qt\5.4.0\5.4\mingw491_32\plugins\bearer\qgenericbearerd.dll loaded

    =library-loaded,id="C:\\Windows\\SysWOW64\\IPHLPAPI.DLL",target-name="C:\\Windows\\SysWOW64\\IPHLPAPI.DLL",host-name="C:\\Windows\\SysWOW64\\IPHLPAPI.DLL",symbols-loaded="0",thread-group="i1"
    sLibrary C:\Windows\SysWOW64\IPHLPAPI.DLL loaded

    =library-loaded,id="C:\\Windows\\SysWOW64\\winnsi.dll",target-name="C:\\Windows\\SysWOW64\\winnsi.dll",host-name="C:\\Windows\\SysWOW64\\winnsi.dll",symbols-loaded="0",thread-group="i1"
    sLibrary C:\Windows\SysWOW64\winnsi.dll loaded

    =library-loaded,id="C:\\Windows\\SysWOW64\\dhcpcsvc.dll",target-name="C:\\Windows\\SysWOW64\\dhcpcsvc.dll",host-name="C:\\Windows\\SysWOW64\\dhcpcsvc.dll",symbols-loaded="0",thread-group="i1"
    sLibrary C:\Windows\SysWOW64\dhcpcsvc.dll loaded

    =library-loaded,id="C:\\Windows\\SysWOW64\\dhcpcsvc6.dll",target-name="C:\\Windows\\SysWOW64\\dhcpcsvc6.dll",host-name="C:\\Windows\\SysWOW64\\dhcpcsvc6.dll",symbols-loaded="0",thread-group="i1"
    sLibrary C:\Windows\SysWOW64\dhcpcsvc6.dll loaded

    =library-loaded,id="C:\\Qt\\5.4.0\\5.4\\mingw491_32\\plugins\\bearer\\qnativewifibearerd.dll",target-name="C:\\Qt\\5.4.0\\5.4\\mingw491_32\\plugins\\bearer\\qnativewifibearerd.dll",host-name="C:\\Qt\\5.4.0\\5.4\\mingw491_32\\plugins\\bearer\\qnativewifibearerd.dll",symbols-loaded="0",thread-group="i1"
    sLibrary C:\Qt\5.4.0\5.4\mingw491_32\plugins\bearer\qnativewifibearerd.dll loaded

    =library-loaded,id="C:\\Windows\\SysWOW64\\wlanapi.dll",target-name="C:\\Windows\\SysWOW64\\wlanapi.dll",host-name="C:\\Windows\\SysWOW64\\wlanapi.dll",symbols-loaded="0",thread-group="i1"
    sLibrary C:\Windows\SysWOW64\wlanapi.dll loaded

    =library-loaded,id="C:\\Windows\\SysWOW64\\wlanutil.dll",target-name="C:\\Windows\\SysWOW64\\wlanutil.dll",host-name="C:\\Windows\\SysWOW64\\wlanutil.dll",symbols-loaded="0",thread-group="i1"
    sLibrary C:\Windows\SysWOW64\wlanutil.dll loaded

    =breakpoint-modified,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="0x0058219b",func="SmsGateWrapper::SmsGateWrapper(char*, char*, char*, char*)",file="..\\SmsGateWrapper\\SmsGateWrapper.cpp",fullname="C:\\Qt\\Projects\\SmsGateWrapper\\SmsGateWrapper.cpp",line="139",thread-groups=["i1"],times="1",original-location="\"SmsGateWrapper.cpp":139"}
    ~"\nBreakpoint "
    ~"5, SmsGateWrapper::SmsGateWrapper (this=0x27f92e78, EpochtaPublicKey=0x4050fc "<manually_deleted_public_key>", EpochtaPrivateKey=0x4050d8 "<manually_deleted_private_key>", EpochtaURL=0x4050ba "http://atompark.com/api/sms/", EpochtaApiVersion=0x4050b6 "3.0") at ..\SmsGateWrapper\SmsGateWrapper.cpp:139\n"
    ~"139\t networkAccessManager->setProxy(proxy);\n"



  • *stopped,reason="breakpoint-hit",disp="keep",bkptno="5",frame={addr="0x0058219b",func="SmsGateWrapper::SmsGateWrapper",args=[{name="this",value="0x27f92e78"},{name="EpochtaPublicKey",value="0x4050fc \"<manually_deleted_public_key>""},{name="EpochtaPrivateKey",value="0x4050d8 \"<manually_deleted_private_key>""},{name="EpochtaURL",value="0x4050ba \"http://atompark.com/api/sms/""},{name="EpochtaApiVersion",value="0x4050b6 \"3.0""}],file="..\\SmsGateWrapper\\SmsGateWrapper.cpp",fullname="C:\\Qt\\Projects\\SmsGateWrapper\\SmsGateWrapper.cpp",line="139"},thread-id="1",stopped-threads="all"
    dNOTE: INFERIOR SPONTANEOUS STOP
    sStopped.
    dState changed from InferiorRunOk(11) to InferiorStopOk(14)
    dNOTE: INFERIOR SPONTANEOUS STOP
    sStopped.
    dState changed from InferiorRunOk(11) to InferiorStopOk(14) [master]
    sStopped at breakpoint 21 (5) in thread 1.

    <204-thread-info

    204^done,threads=[{id="19",target-id="Thread 5724.0x930",frame={level="0",addr="0x77e5015d",func="ntdll!ZwWaitForMultipleObjects",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="18",target-id="Thread 5724.0xe94",frame={level="0",addr="0x77e51f46",func="ntdll!ZwWaitForWorkViaWorkerFactory",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="17",target-id="Thread 5724.0x1a40",frame={level="0",addr="0x77e51f46",func="ntdll!ZwWaitForWorkViaWorkerFactory",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="16",target-id="Thread 5724.0x1140",frame={level="0",addr="0x77e51f46",func="ntdll!ZwWaitForWorkViaWorkerFactory",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="15",target-id="Thread 5724.0x17d8",frame={level="0",addr="0x77e51f46",func="ntdll!ZwWaitForWorkViaWorkerFactory",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="14",target-id="Thread 5724.0x19bc",frame={level="0",addr="0x77e4fd91",func="ntdll!ZwDelayExecution",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="13",target-id="Thread 5724.0x18fc",frame={level="0",addr="0x77e51f46",func="ntdll!ZwWaitForWorkViaWorkerFactory",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="12",target-id="Thread 5724.0x12c8",frame={level="0",addr="0x77e51f46",func="ntdll!ZwWaitForWorkViaWorkerFactory",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="11",target-id="Thread 5724.0xcec",frame={level="0",addr="0x77e5015d",func="ntdll!ZwWaitForMultipleObjects",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="6",target-id="Thread 5724.0x780",frame={level="0",addr="0x77e51f46",func="ntdll!ZwWaitForWorkViaWorkerFactory",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="5",target-id="Thread 5724.0x19dc",frame={level="0",addr="0x77e51f46",func="ntdll!ZwWaitForWorkViaWorkerFactory",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="4",target-id="Thread 5724.0x18cc",frame={level="0",addr="0x77e4f959",func="ntdll!ZwRemoveIoCompletion",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="3",target-id="Thread 5724.0x5e0",frame={level="0",addr="0x75c4f5be",func="WaitMessage",args=[],from="C:\\Windows\\syswow64\\user32.dll"},state="stopped"},{id="2",target-id="Thread 5724.0xf64",frame={level="0",addr="0x77e5015d",func="ntdll!ZwWaitForMultipleObjects",args=[],from="C:\\Windows\\SysWOW64\\ntdll.dll"},state="stopped"},{id="1",target-id="Thread 5724.0x19b8",frame={level="0",addr="0x0058219b",func="SmsGateWrapper::SmsGateWrapper",args=[{name="this",value="0x27f92e78"},{name="EpochtaPublicKey",value="0x4050fc \"<manually_deleted_public_key>""},{name="EpochtaPrivateKey",value="0x4050d8 \"<manually_deleted_private_key>""},{name="EpochtaURL",value="0x4050ba \"http://atompark.com/api/sms/""},{name="EpochtaApiVersion",value="0x4050b6 \"3.0""}],file="..\\SmsGateWrapper\\SmsGateWrapper.cpp",fullname="C:\\Qt\\Projects\\SmsGateWrapper\\SmsGateWrapper.cpp",line="139"},state="stopped"}],current-thread-id="1"
    <205-stack-list-frames 0 20

    205^done,stack=[frame={level="0",addr="0x0058219b",func="SmsGateWrapper::SmsGateWrapper",file="..\\SmsGateWrapper\\SmsGateWrapper.cpp",fullname="C:\\Qt\\Projects\\SmsGateWrapper\\SmsGateWrapper.cpp",line="139"},frame={level="1",addr="0x0040170a",func="qMain",file="..\\SmsGateWrapperQtQuickTester\\main.cpp",fullname="C:\\Qt\\Projects\\SmsGateWrapperQtQuickTester\\main.cpp",line="20"},frame={level="2",addr="0x00402f48",func="WinMain@16",file="qtmain_win.cpp",fullname="C:/Qt/5.4.0/5.4/mingw491_32\\qtbase\\src\\winmain/qtmain_win.cpp",line="112"},frame={level="3",addr="0x004033cd",func="main"}]
    dV8DebuggerClient: sending V8DEBUG v8request {"seq":5,"type":"request","command":"evaluate","arguments":{"expression":"networkReply->readAll()","frame":0}}
    dV8DebuggerClient: sending V8DEBUG v8request {"seq":6,"type":"request","command":"evaluate","arguments":{"expression":"QString(smsGateWrapper->RequestResult)","frame":0}}
    <206-stack-select-frame 0
    <207bb options:fancy,autoderef,dyntype vars: expanded:return,local,inspect,watch typeformats: formats: watchers:6e6574776f726b5265706c792d3e72656164416c6c28292377617463682e30232351537472696e6728736d7347617465577261707065722d3e52657175657374526573756c74292377617463682e31 stringcutoff:10000 displaystringlimit:100

    206^done

    &"bb options:fancy,autoderef,dyntype vars: expanded:return,local,inspect,watch typeformats: formats: watchers:6e6574776f726b5265706c792d3e72656164416c6c28292377617463682e30232351537472696e6728736d7347617465577261707065722d3e52657175657374526573756c74292377617463682e31 stringcutoff:10000 displaystringlimit:100\n"

    ~"\nProgram received signal "
    ~"SIGSEGV, Segmentation fault.\n"
    ~"0x6ba52678 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::data (this=0xbaadf011) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:135\n"
    &"135\t../../include/QtCore/../../src/corelib/tools/qscopedpointer.h: No such file or directory.\n"



  • ~"data=[{iname="local.proxy",name="proxy",numchild="1",type="QNetworkProxy",value="",addr="0x28fd90",},{iname="local.this",name="this",numchild="10",origaddr="0x28fd8c",type="SmsGateWrapper",value="",addr="0x27f92e78",},{iname="local.EpochtaPublicKey",name="EpochtaPublicKey",numchild="0",type="char *",valueencoded="6",value="3139383963653831303165653634313031306235663762366430356636396337",addr="0x28fdb0",},{iname="local.EpochtaPrivateKey",name="EpochtaPrivateKey",numchild="0",type="char *",valueencoded="6",value="3235616363623466306465303261313462326238306239366264306133616561",addr="0x28fdb4",},{iname="local.EpochtaURL",name="EpochtaURL",numchild="0",type="char *",valueencoded="6",value="687474703a2f2f61746f6d7061726b2e636f6d2f6170692f736d732f",addr="0x28fdb8",},{iname="local.EpochtaApiVersion",name="EpochtaApiVersion",numchild="0",type="char *",valueencoded="6",value="332e30",addr="0x28fdbc",},{iname="watch.0",name="networkReply->readAll()",wname="6e6574776f726b5265706c792d3e72656164416c6c2829",numchild="0",type=" ",value="<no such value>",},{iname="watch.1",name="QString(smsGateWrapper->RequestResult)",wname="51537472696e6728736d7347617465577261707065722d3e52657175657374526573756c7429",numchild="0",type=" ",value="<no such value>",},],typeinfo=[]\n"
    ~"None\n"
    207^done,reason="signal-received",signal-name="SIGSEGV",signal-meaning="Segmentation fault"
    dDISCARDING JUNK AT BEGIN OF RESPONSE:
    dProgram received signal SIGSEGV, Segmentation fault.
    d0x6ba52678 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::data (this=0xbaadf011) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:135
    <Rebuild Watchmodel 20>
    sFinished retrieving data

    Sorry for long post. There is the debug log.



  • Is this the most significant part of it?

    • &“warning: ASSERT: \“debugger->state() QV4::Debugging::Debugger::Paused" in file debugger\qv4debugservice.cpp, line 1001\n" ASSERT: "debugger->state() QV4::Debugging::Debugger::Paused” in file debugger\qv4debugservice.cpp, line 1001

    &”\n”
    &“warning: Invalid parameter passed to C runtime function.\n” Invalid parameter passed to C runtime function.
    &”\n”
    &“warning: Invalid parameter passed to C runtime function.\n” Invalid parameter passed to C runtime function.
    &”\n”


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.