void QuinielaApuesta::funcion(QString & str)
{
std::string cadenita = str.toStdString();
std::cout << cadenita << std::endl;
}
I am on Qt 4.8.2 for VS2010, Windows 7 N 64-bit, Visual Studio 2010 and using the QString method "toStdString()" (or something somewhat related) causes an Unhandled exception.
it doesn't matter where I use the line
std::string cadenita = str.toStdString();
It will cause an unhandled exception. In this particular case, it happens right after I get out of the method "funcion"s scope. But it happens in the current context of the scope escape (That is, if you put this line in an object's constructor, it will proceed as expected until the end of the constructor, and then when it should proceed to a higher scope level, it will send an Unhandled Exception error).
I have isolated the issue to .toStdString by trial and error, and I cannot say if other methods might (or might) have this same issue. I can say, however, that as soon as the line is commented, it all works ok. In fact, if I replace said line with a simple
std::cout << "Some Funny Test Text" std::endl;
It all works fine and dandy.
The error is
Unhandled exception at 0x53b8ad7a (msvcp100d.dll) in C_plus_plus_QT_project.exe: 0xC0000005: Access violation reading location 0xccccccd0.
And then in file xutility, line 201
#if _ITERATOR_DEBUG_LEVEL == 2
if (_Myproxy != 0)
{ // proxy allocated, drain it
_Lockit _Lock(_LOCK_DEBUG);
for (_Iterator_base12 **_Pnext = &_Myproxy->_Myfirstiter;
*_Pnext != 0; *_Pnext = (*_Pnext)->_Mynextiter) // HERE IS THE LINE WHERE THE BREAK KICKS IN
(*_Pnext)->_Myproxy = 0;
_Myproxy->_Myfirstiter = 0;
}
Visual Studio's output is:
'C_plus_plus_QT_project.exe': Loaded 'C:\Users\aravasio\Desktop\C_plus_plus_QT_project\Debug\C_plus_plus_QT_project.exe', Symbols loaded. 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Users\aravasio\Desktop\C_plus_plus_QT_project\Debug\QtGui4.dll', Binary was not built with debug information. 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Users\aravasio\Desktop\C_plus_plus_QT_project\Debug\QtCore4.dll', Binary was not built with debug information. 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded. 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded. 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file 'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file First-chance exception at 0x53b8ad7a (msvcp100d.dll) in C_plus_plus_QT_project.exe: 0xC0000005: Access violation reading location 0xccccccd0. Unhandled exception at 0x53b8ad7a (msvcp100d.dll) in C_plus_plus_QT_project.exe: 0xC0000005: Access violation reading location 0xccccccd0.
If I can provide any other information about my system, I will be glad to.
I can only make some sort of educated guess that this is not a Qt bug, because at home I am having no problem at all (but at home I am using an x86 W7, so it might not be a good example).
Does anybody know about this? I've googled quite a bit, but every error seems to have been addressed in an old hotfix.
Should I just abandon ship and try VS2008? Does it work with x64 environments? (Release is going to be for x86, btw, not x64)