[omniORB] Problems with OmniOrb 4.12 and Visual Studio 2005
Martin Trappel
0xCDCDCDCD at gmx.at
Mon Mar 10 07:56:44 GMT 2008
jochen.heintz at t-online.de wrote:
> Hi,
>
> i have downloaded the OmniOrb Package
"omniORB-4.1.2-x86_win32-vs8.zip" from Sourceforge.
>
> I'm new to CORBA so i've made a new Project in my Visual studio to
test it.
>
> (snipped)
>
> using namespace std;
>
> char* HelloServer::getWorkflow ()
> {
> String_var hallo = (const char*) "Hallo";
> return string_dup(hallo);
> }
>
This code is unnecessarily complicated.
Simply use:
return string_dup("Hallo");
or, if you want to make use of a _var type:
hallo._retn();
There is also no need to cast string constants to (const char*) with
recent C++ compilers.
>
> (snipped)
>
>
> The Client calls the Server-Method getWorkflow() and then the Server
crashes and gives the Message "Windows breakpoint..." as described above.
>
> This happends only in debug. If i run the exe in DOS-Box all works well.
>
"all works well" means the _same_ server.exe will work if not run under
the debugger?
The debug-msg you get tells you that a heap corruption occurred and VS
was able to detect this with the additional code it adds for the debug
version of the executable. I would have assumed you app should crash if
not run under the debugger, if you get a assert/breakpoint in the debugger.
br,
Martin
More information about the omniORB-list
mailing list