function stringToIdentity() occurs an unhandled exception

haibyehaibye Junjie HeOrganization: China, JSIT companyProject: File Transfer SystemMember

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:)

Tagged:

Best Answers

  • xdmxdm La Coruña, SpainJose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Accepted Answer

    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

  • xdmxdm La Coruña, SpainJose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    edited May 2016 Accepted Answer

    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?

Answers

  • xdmxdm La Coruña, SpainJose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice DeveloperAdministrators, ZeroC Staff ZeroC Staff
    Accepted Answer

    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

  • haibyehaibye Junjie HeOrganization: China, JSIT companyProject: File Transfer SystemMember

    Hi, Jose,

    thanks so much. I will download visual studio 2015 and have a try.

  • haibyehaibye Junjie HeOrganization: China, JSIT companyProject: File Transfer SystemMember

    Hi, Jose,
    I've use visual studio 2015, and exception occurs when executing the "stringToIdentity()" function.

  • xdmxdm La Coruña, SpainJose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice DeveloperAdministrators, ZeroC Staff ZeroC Staff
    edited May 2016 Accepted Answer

    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?

  • haibyehaibye Junjie HeOrganization: China, JSIT companyProject: File Transfer SystemMember

    exited! problem solved, thanks again~

Sign In or Register to comment.