[omniORB] omniORB 4.0.3 exception handling problems on Win2k
Andrew Novikov
anovikov at artezio.ru
Wed Feb 25 20:08:12 GMT 2004
We are using omniORB 4.0.3 on Linux (SuSE 9.0 Pro and FC 1) and Windows
2000. Strange things happen when throwing and catching exceptions that
contain wide-character strings on Windows. When a server throws such an
exception it sometimes turns into unknown exception. To be more
specific, when trying to execute the attached example (it is a modified
version of the 'echo' example) the client in the example catches only
first 7 out of 10 exceptions. The rest turn into "unknown user
exception".
The example always works fine on Linux and it works on Windows when it
utilizes narrow strings.
--
Andrew Novikov <anovikov at artezio.ru>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: achar.h
Type: text/x-c-header
Size: 360 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040225/77032667/achar.bin
-------------- next part --------------
#
# Usage:
# nmake /f dir.mak [<build option>]
#
# <build option>:
# all - build all executables
# clean - delete all executables and obj files
# veryclean - clean plus delete all stub files generated by omniidl
#
#
# Pre-requisite:
#
# Make sure that you have environment variable LIB and INCLUDE setup for
# using Developer studio from the command line. Usually, this is accomplished
# by source the vcvars32.bat file.
#
# Where is the top of this distribution. All executable, library and include
# directories are relative to this variable.
#
TOP = C:\omniORB4
##########################################################################
# Essential flags to use omniORB.
#
DIR_CPPFLAGS = -I. -I$(TOP)\include
#
# omniDynamic403_rt.lib is the runtime DLL to support the CORBA dynamic
# interfaces, such as Anys, typecodes, DSI and DII. In these examples, the
# runtime library is not required as none of these features are used.
# However, a bug in MSVC++ causes it to generate a bunch of references
# to functions in omniDynamic403_rt.lib when compiling the stubs.
# So now we link the dynamic library as well.
# An alternative is to replace the dynamic library with the much smaller
# library msvcstub.lib. The smaller library contains nothing but stubs
# for the required functions. This is enough when non of the dynamic
# interfaces are used. We use the small library here. If you prefer
# to link with the dynamic library, swap the comment on the next 2
# lines.
#OMNI_DYNAMIC_LIB = omniDynamic403_rt.lib
OMNI_DYNAMIC_LIB = msvcstub.lib -NODEFAULTLIB:libcmt.lib -NODEFAULTLIB:libcmtd.lib
CORBA_CPPFLAGS = -DACHARWIDE -D__WIN32__ -D_WIN32_WINNT=0x0400 -D__x86__ -D__NT__ \
-D__OSVERSION__=4
CORBA_LIB = omniORB403_rt.lib omnithread30_rt.lib \
$(OMNI_DYNAMIC_LIB) \
ws2_32.lib mswsock.lib advapi32.lib \
-libpath:$(TOP)\lib\x86_win32
CXXFLAGS = -O2 -MD -GX $(CORBA_CPPFLAGS) $(DIR_CPPFLAGS)
CXXLINKOPTIONS =
.SUFFIXES: .cc
.cc.obj:
cl /nologo /c $(CXXFLAGS) /Tp$<
########################################################################
# To build debug executables
# Replace the above with the following:
#
#OMNI_DYNAMIC_LIB = omniDynamic403_rtd.lib
#OMNI_DYNAMIC_LIB = msvcstubd.lib -NODEFAULTLIB:libcmt.lib -NODEFAULTLIB:libcmtd.lib
#CORBA_CPPFLAGS = -D__WIN32__ -D_WIN32_WINNT=0x0400 -D__x86__ -D__NT__ -D__OSVERSION__=4
#CORBA_LIB = omniORB403_rtd.lib omnithread30_rtd.lib \
# $(OMNI_DYNAMIC_LIB) \
# ws2_32.lib mswsock.lib advapi32.lib -libpath:$(TOP)\lib\x86_win32
#CXXFLAGS = -MDd -GX -Z7 -Od $(CORBA_CPPFLAGS) $(DIR_CPPFLAGS)
#CXXLINKOPTIONS = -debug -PDB:NONE
all:: eg2_clt.exe eg2_impl.exe
eg2_clt.exe: echoSK.obj eg2_clt.obj
link -nologo $(CXXLINKOPTIONS) -out:$@ $** $(CORBA_LIB)
eg2_impl.exe: echoSK.obj eg2_impl.obj
link -nologo $(CXXLINKOPTIONS) -out:$@ $** $(CORBA_LIB)
clean::
-del *.obj
-del *.exe
veryclean::
-del *.obj
-del echoSK.* echo.hh
-del *.exe
echo.hh echoSK.cc: echo.idl
$(TOP)\bin\x86_win32\omniidl -T -bcxx -Wbh=.hh -Wbs=SK.cc -Wbtp echo.idl
echo.idl: $(TOP)\idl\echo.idl
copy $(TOP)\idl\echo.idl .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: echo.idl
Type: text/x-idl
Size: 184 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040225/77032667/echo.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eg2_clt.cc
Type: text/x-c++
Size: 2199 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040225/77032667/eg2_clt.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eg2_impl.cc
Type: text/x-c++
Size: 2070 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040225/77032667/eg2_impl.bin
More information about the omniORB-list
mailing list