Results 1 to 5 of 5

Thread: Exceptions cannot be unmarshalled on client

  1. #1
    robert is offline Registered User
    Join Date
    Oct 2004
    Posts
    10

    Exceptions cannot be unmarshalled on client

    When implementing an ICE service I ran inon an odd bug. It seems that ICE is not able to transfer errors correctly over the boundary of a library, at least under certain circumstances.

    Appending you will find a ZIP file with a simple test scenario. It contains a precompiled server.exe which does nothing than throwing a bug. Furthermore there is a client_ok.exe which catches the bug correctly and a client_ko.exe which throws an Ice::UnmarshalOutOfBoundsException.

    The only difference between client_ok.exe and client_ko.exe is that for client_ok.exe I removed the line
    #define SHOW_ICE_EXCEPTION_BUG
    from exceptions.ice. This made the exception appear in test.ice instead of exceptions.ice e voila - it works! I.M.H.O. it shouldn't matter in which .ice file an exception is defined as long as the generated .h / .cpp files are included correctly.

    Another way to "solve" the problem was to compile all the objects directly into the executables rather than using an intermedate library (interface.lib, see the included Makefile).

    This is really a weird bug and I hope you won't have too many problems to finally track it down. Though I have a workaround now it would be really nice if the bug could be removed in the next ICE version, so that I can tidy up my .ice files and more important, to safe others from this confusing phenomenon.

    I used ICE 1.5.1 on Windows XP with Microsoft Visual Studio .NET 7.0. I verified the bug with ICE 1.3.0 as well. It occurred with standalone servers and IceBox servers, with or without debug libraries alike.
    Attached Files Attached Files
    Last edited by robert; 10-15-2004 at 08:05 AM.

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Robert,

    I don't see any Makefile or project file in the attached zip file.
    By library, I assume you mean DLL (a problem with static libraries would be really odd!). On Windows, it is critical to export symbols when using DLLs, with the slice2cpp --dll-export <SYMBOL> option; this could be the problem.

    Cheers,
    Bernard

  3. #3
    robert is offline Registered User
    Join Date
    Oct 2004
    Posts
    10

    Insert an ordered list into your message

    Hello Bernard,

    I'm really sorry, I appended the wrong test scenario. Hereby I send the correct one. I do indeed use static libraries and yes, it's very odd. Hope bug hunting means fun to you :-).

    Best Regards

    Robert.
    Attached Files Attached Files

  4. #4
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Robert

    I confirm this is a bug with Ice exception-factory registration. We'll try to fix it before the next release (1.6)! Thanks for the bug report and test case.

    Bernard

  5. #5
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    I've posted a patch at http://www.zeroc.com/vbulletin/showt...=&threadid=880. Thanks for reporting this bug!

    Cheers,

    Michi.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Icepatch exceptions
    By Skip in forum Bug Reports
    Replies: 2
    Last Post: 06-27-2007, 06:29 AM
  2. how to capture the "client droped" exceptions?
    By Pierre.Siron in forum Help Center
    Replies: 2
    Last Post: 04-10-2007, 11:15 PM
  3. IceGridAdmin exceptions
    By ctennis in forum Bug Reports
    Replies: 2
    Last Post: 04-09-2007, 11:37 AM
  4. C# exceptions
    By wrobbie in forum Help Center
    Replies: 7
    Last Post: 09-25-2005, 07:03 PM
  5. Classes vs. Exceptions
    By andreynech in forum Comments
    Replies: 7
    Last Post: 02-28-2003, 10:12 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
  •