Bugs in code using COM objects corrupts the image?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bugs in code using COM objects corrupts the image?

Jeff M.
I'm getting some very frustrating bug that I don't know if it's a
problem with Dolphin or not. Perhaps others with more experience can
comment/guide me a little.

I have some COM objects that I'm linking to (these are homebrew COM
objects, but I've been using them for years in C++, so they are pretty
battle tested). I include them in Dolphin with the ActiveX Component
Wizard, which works great, save them in a new package, and the world is
good.

Once this is done, I can open a Workspace and begin typing out some
code to try it out. The basics to test it (~4 lines of code) works
perfect every time. Flawless. Then I begin to create a new object which
will run additional code, etc.

As long as my code is bug-free, or at least as long as all my bugs are
contained before the COM object code is hit, everything is fine. I can
debug, close, run, restart, etc. However, if I have a snippet of code
that touches the COM object, and is incorrect (for example, calling a
method in the COM object that it doesn't udnerstand...
#doesNotUnderstand) then I can debug, but immediately after, the image
becomes unstable.

By "unstable", I mean that I can still use Dolphin, and all the basics
of Smalltalk, but I can't fix my code and try *it* again. Usually the
COM code will crash randomly inside somewhere with a gpFault. Even if I
just go back to the very basic 4 lines of original testing code it will
*sometimes* crash - not always. If I save the package, quit, restart,
and open the package (with any bug fixes), then everything is perfect
once again.

This has been driving me nuts and is a terrible way to work - I feel
like I'm using C++ again. :P Any help would be appreciated. Thanks!

Jeff M.


Reply | Threaded
Open this post in threaded view
|

Re: Bugs in code using COM objects corrupts the image?

Chris Uppal-3
Jeff,

> As long as my code is bug-free, or at least as long as all my bugs are
> contained before the COM object code is hit, everything is fine. I can
> debug, close, run, restart, etc. However, if I have a snippet of code
> that touches the COM object, and is incorrect (for example, calling a
> method in the COM object that it doesn't udnerstand...
> #doesNotUnderstand) then I can debug, but immediately after, the image
> becomes unstable.

Maybe you could use "DLL Surrogates" to provide some development-time
insulation between Dolphin and the [what sound to me like rather dodgy] COM
components.  Be warned: I know very little of COM, and nothing whatever about
"DLL Surrogates" except what I read in this page:

    http://windowssdk.msdn.microsoft.com/en-us/library/ms695225.aspx

which I happened across while looking for something else.

    -- chris