Board index » cppbuilder » Program crashes with release build but not debug build

Program crashes with release build but not debug build

Hi there

I have a program that uses an OCX from ESRI's MapObjects2.

The program works fine with the debug build but gives the following error
when trying to run a release build:

IsBound() @ D:\PROGRA~1\BORLAND\CBUILD~2\INCLUDE\vcl/utilcls.h/2994
Press (Y)es to terminate, (N)o to continue and (C)ancel to Debug.

Is this something obvious or do you need more information?  I have seen
something on a different utilcls.h file but can't find the post from the
person who made the different file available.

Any help would be appreciated.

Regards
Etienne

 

Re:Program crashes with release build but not debug build


Well, this is not a crash. The diagnostics comes when trying to invoke a
method on a server, but the server is not connected to. I'm not sure
this is a bug in the BCB.

.a

Quote
Etienne Labuschagne wrote:

[snip]

Re:Program crashes with release build but not debug build


Just to give more information:

The com server is on my local machine (I'm not using DCOM).

What can be the reason that the release compiled executable cannot connect
to the server, but the debug compiled executable can?  I'm using the buttons
to set Debug/Release build and do not set other settings manually.  Before I
recompile from debug to release or the other way around, I clean the project
(delete all intermediate files etc.)

Regards
Etienne

Alex Bakaev wrote :
[snip]

Re:Program crashes with release build but not debug build


sounds like a Liense problem.
Quote
Etienne Labuschagne wrote:
> Just to give more information:

> The com server is on my local machine (I'm not using DCOM).

> What can be the reason that the release compiled executable cannot connect
> to the server, but the debug compiled executable can?  I'm using the buttons
> to set Debug/Release build and do not set other settings manually.  Before I
> recompile from debug to release or the other way around, I clean the project
> (delete all intermediate files etc.)

> Regards
> Etienne

> Alex Bakaev wrote :
> [snip]

Re:Program crashes with release build but not debug build


Quote
Etienne Labuschagne <etien...@megasub.co.za> wrote:
> What can be the reason that the release compiled executable cannot
> connect to the server, but the debug compiled executable can?

One idea: check for inappropriate use of assert.
On several occasions I've seen assert statements being incorrectly
used as a mechanism for raising exceptions when the HRESULT
of a COM method invocation indicates failure.  The problem of
course is that code for the error test (if not the invocation itself)
disappears in release builds.

-gw

Other Threads