Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-14-2004
robert 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
File Type: zip ice_exception_test.zip (48.5 KB, 99 views)

Last edited by robert : 10-15-2004 at 08:05 AM.
Reply With Quote
  #2 (permalink)  
Old 10-14-2004
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 761
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
Reply With Quote
  #3 (permalink)  
Old 10-15-2004
robert 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
File Type: zip ice_exception_test.zip (48.5 KB, 97 views)
Reply With Quote
  #4 (permalink)  
Old 10-17-2004
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 761
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
Reply With Quote
  #5 (permalink)  
Old 10-17-2004
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 889
I've posted a patch at Patch for slice2cpp, release 1.5.1. Thanks for reporting this bug!

Cheers,

Michi.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
C# exceptions wrobbie Help Center 7 09-25-2005 07:03 PM
Catching Exceptions chuatecksiong Help Center 3 04-06-2005 01:02 PM
Classes vs. Exceptions andreynech Comments 7 02-28-2003 10:12 AM
Exceptions and the ice_throw function marlowa Help Center 2 02-28-2003 07:37 AM


All times are GMT -4. The time now is 07:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.