Archived

This forum has been archived. Please start a new discussion on GitHub.

Debug runtime errors

Hi,

I added two lines of code to HelloServiceI::start method in HelloiceboxS demo code:

// two lines of code I added
Ice::PropertiesPtr properties = communicator->getProperties();
string helloProxy = properties->getProperty("Hello.Proxy");

// original demo code
_adapter = communicator->createObjectAdapter(name);
_adapter->add(new HelloI(), Ice::stringToIdentity("hello"));
_adapter->activate();

I got debug assertion error from Ice.exe in dbgheap.c (line 1132). If I move the two lines of code to the bottom, I got C runtime error. It seems to have something to do with the length of property value string (max 15 characters) which does not make a lot of sense.

Thank you in advance.
Deqing

Comments

  • mes
    mes California
    Welcome to the forum.

    Please update your signature as described in this post regarding our support policy on the forum.

    The debug assertion usually occurs when the executable contains a mix of Release and Debug objects. You need to rebuild the executable and ensure that you are linking against the appropriate Ice libraries. Have a look at the sample project files included in the Ice distribution for an example.

    Take care,
    - Mark
  • Mark,

    I've checked relevant posts and I do not think this error is caused by IDE settings. What I did was to take the original IceBox demo appl and added two lines of code as in my original message.

    I think it will be helpful if you can repeat what I did.

    Thanks,
    Deqing
  • mes
    mes California
    Did you compile the HelloService in Release or Debug mode? If you used Debug mode, you should use iceboxd.exe as the IceBox server executable.

    Take care,
    - Mark
  • Hi, Mark,

    No, I used icebox.exe instead of iceboxd.exe. This should fix my problem.

    Thanks,
    Deqing