[omniORB] OmniORB304 and Visual Studio .Net Beta 2

Thierry Froux thierry.froux@voxco.com
Thu, 8 Nov 2001 10:45:50 -0500


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1686C.70DCF4D0
Content-Type: text/plain;
	charset="iso-8859-1"

> Hi,
> I was experimenting with OmniOrb304 and Visual Studio .Net beta 2 and I
> came across a small problem.
> For my test I used your Echo sample IDL.
> 
> My project is a c++ console application without mfc or atl or managed c++
> support.
> 
> The code generated by omniidl works fine with Visual Studio 6 but .Net
> throws an Unhandled exception 
> exiting the _dispatch method. If I investigate the call stack I can see
> that the exception occured in 
> 	msvcr70d.dll -> _CrtIsValidHeapPointer. (Debug Mode)
> 	msvcr70.dll -> _CrtIsValidHeapPointer. (Release Mode)
> 
> What I did to correct the problem is change the following in the generated
> .cc file : 
> 
>  	original code 
> 	{
>       CORBA::String_member _0RL_str_tmp;
>       _0RL_str_tmp <<=  giop_s;
>       arg_Name = _0RL_str_tmp._ptr;
>       _0RL_str_tmp._ptr = 0;	  
> 	}
> 
> 	modified code
> 	{
>       CORBA::String_member _0RL_str_tmp;
>       _0RL_str_tmp <<=  giop_s;
>       arg_Name = (const char *)_0RL_str_tmp._ptr;
>       _0RL_str_tmp._ptr = 0;	  
> 	}
> 
> It seems that the operator <<= is not doing what it should do ( a copy of
> giop_s).
> Its when the stack's trying to get rid of arg_Name that the unhandled
> exception occured.
> 
> I know that .Net is a beta product... I dont know if this problem is
> related to a bug in microsoft's code or if
> it is related to a modification in microsoft's code. Or maybe it can be
> related to a modification in 
> microsoft's vc++ project settings.
> 
> Somebody else in my developpement team came across the same problem.
> 
> Anyway... I just tought I'll let you know )
> 
> Thank you 
> 
> 
> Thierry Froux
> Senior Developper
> VOXCO inc.
> Montreal, Canada

------_=_NextPart_001_01C1686C.70DCF4D0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>OmniORB304 and Visual Studio .Net Beta 2</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi,</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I was experimenting with OmniOrb304 =
and Visual Studio .Net beta 2 and I came across a small problem.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">For my test I used your Echo sample =
IDL.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">My project is a c++ console =
application without mfc or atl or managed c++ support.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The code generated by omniidl works =
fine with Visual Studio 6 but .Net throws an Unhandled exception =
</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">exiting the _dispatch method. If I =
investigate the call stack I can see that the exception occured in =
</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">msvcr70d.dll -&gt; _CrtIsValidHeapPointer. (Debug =
Mode)</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">msvcr70.dll -&gt; _CrtIsValidHeapPointer. (Release =
Mode)</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">What I did to correct the problem is =
change the following in the generated .cc file : </FONT>
</P>

<P><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; original code =
</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">{</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
CORBA::String_member _0RL_str_tmp;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
_0RL_str_tmp &lt;&lt;=3D&nbsp; giop_s;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
arg_Name =3D _0RL_str_tmp._ptr;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
_0RL_str_tmp._ptr =3D 0;&nbsp;&nbsp;&nbsp; &nbsp; </FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">}</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">modified code</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">{</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
CORBA::String_member _0RL_str_tmp;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
_0RL_str_tmp &lt;&lt;=3D&nbsp; giop_s;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
arg_Name =3D (const char *)_0RL_str_tmp._ptr;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
_0RL_str_tmp._ptr =3D 0;&nbsp;&nbsp;&nbsp; &nbsp; </FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Courier New">}</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">It seems that the operator =
&lt;&lt;=3D is not doing what it should do ( a copy of giop_s).</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">Its when the stack's trying to =
get rid of arg_Name that the unhandled exception occured.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">I know that .Net is a beta =
product... I dont know if this problem is related to a bug in =
microsoft's code or if</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">it is related to a modification =
in microsoft's code. Or maybe it can be related to a modification in =
</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">microsoft's vc++ project =
settings.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Somebody else in my =
developpement team came across the same problem.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Anyway... I just tought I'll let =
you know )</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Thank you </FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Thierry Froux</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">Senior Developper</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">VOXCO inc.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">Montreal, Canada</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C1686C.70DCF4D0--