Archived

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

[C++ Ice] Icebox won't start (timeout) after upgrading a third party library

Good morning,

I've been using Ice Grid with Ice C++ for more than one year and a half without problem, until now.

I develop a library which I would call A (C++ Visual Studio) which uses another library B (C++ Visual Studio), provided by another team.

I build the library A in release mode and the library Ad in debug mode, using icebox.exe or iceboxd.exe accordingly at runtime. I use one library B (release library I suppose) in both cases, which I upgrade every month or so.

Since a recent upgrade of library B, my service doesn't start anymore (library A started with icebox.exe). When starting the server through the Ice Grid GUI, the green + appears, but nothing happens, until the timeout is reached, with no error. I’ve put some std::Out at the very beginning of the implementation of the start(…) function (implementation of IceBox::Service), but nothing is written. It looks like if the dlls couldn’t be loaded, but without any error.

In debug mode, it still works fine.

So, I tried compiling library A with the same parameters as for Ad (removed all optimizations), but it didn’t change anything.

Apparently I’m the only one having some problems with library B, as no other team complained. So it looks like something very specific between icebox.exe and that library (we are the only ones using Ice).

Would you know what changes in library B could impact the runtime of icebox.exe (and not iceboxd.exe)? Would you have any idea how I could do additional tests to understand what’s happening?

I would be very grateful for any help. I’ve been working on this problem for 2 days without a solution.

Many many thanks.

Regards,
Gregoire

Comments

  • xdm
    xdm La Coruña, Spain
    Hi,

    It seems quite odd that IceBox doesn't report any errors, are you looking in the icegridnode logs?

    You can set IceGrid.Node.Trace.Activator=3 in your icegridnode configuration to get more detailed info about service activation.

    Not sure how this has worked before for you but you cannot mix debug and release dynamic libraries. They use different C/C++ run-times and this will not work.

    The fact that it works for debug builds makes me thing that your library B is a debug library.
  • bernard
    bernard Jupiter, FL
    Hi Gregoire,

    Keep in mind that "debug" (d.dll) vs "release" library is not really related to whether there is debug information in the library or not, but the type of C++ runtime you use:

    /MD: release runtime
    /MDd: debug runtime

    See also Why does my application work fine in release mode but crash in debug mode? - ZeroC Documentation - ZeroC

    Best regards,
    Bernard
  • Hi Jose and Bernard,

    Thanks a lot for your answers.

    I have set those in my icegridnode configuration:
    IceGrid.Node.Trace.Activator=3
    IceGrid.Node.Trace.Adapter=3
    IceGrid.Node.Trace.Server=3

    In the logs I get:
    Activator: activating server `FactoryIceBox-2-01'

    Server: changed server `FactoryIceBox-2-01' state to `WaitForActivation'
    Server: changed server `FactoryIceBox-2-01' state to `ActivationTimeout'
    Server: server `FactoryIceBox-2-01' activation timed out
    Adapter: server `FactoryIceBox-2-01' adapter `FactoryAdapter-2-01' activation failed: server activation timed out

    To build my library A I followed the Ice documentation, and I’ve been building A with the /MD additional option and Ad with the /MDd additional option.

    Concerning the library B, I was wrong, they do provide the release binaries and the debug binaries, but I hadn’t any problem switching from one to another with library A or Ad being used.

    Library B is built with the additional option /Wp64 only. Should they build using /MD also ?

    I’ve read the following on page /MD, /MT, /LD (Use Run-Time Library) : “All modules passed to a given invocation of the linker must have been compiled with the same run-time library compiler option (/MD, /MT, /LD)”. So it seems library B should be built with /MD to be consistent. But I didn’t find out what is the default parameter, so I don’t know which parameter library B is using as it’s not explicitly defined : is it /MT ?

    Many thanks.

    Regards,
    Gregoire
  • xdm
    xdm La Coruña, Spain
    Hi Gregoire,

    It is yet unclear what is causing the timeout activation. You can try to start icebox from command line to see if this give us a bit more info.

    What compiler and architecture are you using? You must ensure you using the corresponding icebox executable.

    Can you also paste the complete log, it will be interesting to see the time stamps, and the icebox command being used.