Results 1 to 5 of 5

Thread: Problems after upgrading Ice

  1. #1
    nlhaines is offline Registered User
    Name: Noah Libby Haines
    Organization: University of California-Berkeley
    Project: Implementing a Realtime Data Server
    Join Date
    Feb 2011
    Posts
    7

    Problems after upgrading Ice

    I recently upgraded to 3.4.2 and I started having some problems. A client program makes a call to a server, passing a struct argument. The server receives the call and runs the appropriate function, but all of the fields of the struct are filled with junk and don't match any of the values on the client side.

    The only thing I think could be causing this would be the two programs being compiled with different versions of Ice. I have made sure all occurences of 3.4.1 have been changed to 3.4.2 in the .vcxproj files for the visual studio projects. I have also deleted version 3.4.1 from my computer. Is there anything else I should be looking to change?

    Thanks for any help!

  2. #2
    mes's Avatar
    mes
    mes is online now ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Hi Noah,

    We perform binary backward-compatibility tests prior to new patch releases to verify that we haven't broken anything, so it should be possible to simply replace the 3.4.1 DLLs with the 3.4.2 DLLs without recompiling your Slice files or your application.

    It definitely sounds like something is wrong in your situation. Have you tried completely rebuilding the application?

    Regards,
    Mark

  3. #3
    nlhaines is offline Registered User
    Name: Noah Libby Haines
    Organization: University of California-Berkeley
    Project: Implementing a Realtime Data Server
    Join Date
    Feb 2011
    Posts
    7
    I cleaned the solutions and rebuilt from scratch and I still have the same problem.

    I also added a struct to the .ice file

    struct TestStruct{
    int test;
    string testString;
    };

    Along with a function on the server to print out the values on the server:

    void testFunc(out TestStruct ts);

    I still get the same problem with this function. Here is the function definition:

    void DataServer::ServerI::testFunc(DataServer::TestStru ct& ts, const Ice::Current& current){
    std::cout << ts.test << ":" << ts.testString << std::endl;
    }

    Which is called with "server->testFunc(ts);"

    I assume the code is fine, as its consistent with the code I have written that has worked fine up until this point.

    Any other ideas about what else could be causing this?

    Thanks!

  4. #4
    xdm's Avatar
    xdm
    xdm is offline ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruņa, Spain
    Posts
    588
    void testFunc(out TestStruct ts);
    You define an output parameter , that is initialized by the server and send to the client. If you want to send a parameter from client to server, use a normal parameter:

    void testFunc(TestStruct ts);
    If you want both use a second out parameter, or the return value

    TestStruct testFunc(TestStruct ts);
    void testFunc(TestStruct ts, out TestStruct result);
    See:

  5. #5
    nlhaines is offline Registered User
    Name: Noah Libby Haines
    Organization: University of California-Berkeley
    Project: Implementing a Realtime Data Server
    Join Date
    Feb 2011
    Posts
    7
    Changing from an out parameter to a regular parameter seems to have fixed the problem. Previously I could initialize an out parameter on the client side and everything worked fine. I imagine I was just "lucky".

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems using ICE
    By Azerus in forum Help Center
    Replies: 1
    Last Post: 03-31-2009, 08:46 PM
  2. Problems to compile Ice-3.3.0
    By peter in forum Help Center
    Replies: 3
    Last Post: 01-21-2009, 10:51 AM
  3. Upgrading both IceGrid and IceStorm
    By mefoster in forum Help Center
    Replies: 1
    Last Post: 04-28-2008, 07:28 PM
  4. Replies: 7
    Last Post: 02-17-2006, 11:30 PM
  5. Problems building Ice-1.1.1
    By kutsuya in forum Help Center
    Replies: 2
    Last Post: 10-28-2003, 12:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •