Archived
function stringToIdentity() occurs an unhandled exception
Recently I'm trying to upgrade my application from ice 3.4 to ice 3.6.
When the program runs the following code, the visual studio 2010 throws an unhandled exception.
this code is OK in ice 3.4.
code:
Ice::CommunicatorPtr ic = Ice::initialize(id);
Ice::ObjectAdapterPtr adapter= ic->createObjectAdapterWithEndpoints("test", "default -p 10000");
ic->stringToIdentity("test");//throws an exception
exception:
TransferClientServer.exe in 0x0f7359da (msvcr100d.dll) has an unhandled exception: 0xC0000005: reading position 0xccccccc0 access violation occurs.
(I just translate from chinese"TransferClientServer.exe 中的 0x0f7359da (msvcr100d.dll) 处有未经处理的异常: 0xC0000005: 读取位置 0xccccccc0 时发生访问冲突" with google translation.)
thanks:)
Comments
-
Hi,
Visual Studio 2010 is not supported with 3.6, you need to use one of the supported C++ compilers, for Windows with Ice 3.6 you can use Visual Studio 2012, Visual Studio 2013 and Visual Studio 2015 see
You should also review the using the windows binary distribution section on the release notes
0 -
Hi, Jose,
thanks so much. I will download visual studio 2015 and have a try.
0 -
Hi, Jose,
I've use visual studio 2015, and exception occurs when executing the "stringToIdentity()" function.0 -
Hi,
This seems like you are using the wrong libraries, in Windows you cannot mix debug/release builds.
For Debug builds you must define _DEBUG and use MDd run-time, for release build you must use MD run-time.
For vs2015 with 3.6 binary distribution you should use the binaries from \bin\vc140 for 32-bit builds and \bin\vc140\x64 for 64-bit builds
Are you using the Ice Builder extension for Visual Studio?
0 -
exited! problem solved, thanks again~
0