Home All Groups Group Topic Archive Search About
Author
4 Mar 2009 9:35 AM
Lorin
VB6SP6
I have only seen this in the compiled app.
Does not happen regularly.
I do the same commands repeatedly and this only happens once in maybe 50
times.
Any clues to what it is and what is causing it?
It can happen in one of two different and unrelated subs.
Has anyone seen this before?
First time for me in ten years.

Error Number -2147417848 Automation error
The object invoked has disconnected from its clients.

Author
4 Mar 2009 12:35 PM
Jan Hyde
Lorin <Lo***@discussions.microsoft.com>'s wild thoughts were
released on Wed, 4 Mar 2009 01:35:01 -0800 bearing the
following fruit:

>VB6SP6
>I have only seen this in the compiled app.
>Does not happen regularly.
>I do the same commands repeatedly and this only happens once in maybe 50
>times.
>Any clues to what it is and what is causing it?
>It can happen in one of two different and unrelated subs.
>Has anyone seen this before?
>First time for me in ten years.
>
>Error Number -2147417848 Automation error
>The object invoked has disconnected from its clients.

Well the question is, what object are you invoking. Are you
for example automating outlook? Are you dealing with
recordsets?

The first step is identify exactly which line of code the
error is occuring on.
--
Jan Hyde

https://mvp.support.microsoft.com/profile/Jan.Hyde
Author
4 Mar 2009 4:50 PM
Lorin
I know, but I can never get the failure in the IDE and it occurs seldom in
the compiled so it is difficult to trap.
The two subs are not dealing with anything like Outlook, only my own classes
etc.
I run this on an XP PC and never see it.
It always happens on a Vista PC.
Maybe this is just the luck of the draw, but ... ???
Unfortunately, I have never been educated in running a debugger like WinDBG
so what else can I try?

Show quoteHide quote
"Jan Hyde" <StellaDrin***@REMOVE.ME.uboot.com> wrote in message
news:ubtsq45ot4ibrh56buvmf4rojk2efk6q19@4ax.com...
> Lorin <Lo***@discussions.microsoft.com>'s wild thoughts were
> released on Wed, 4 Mar 2009 01:35:01 -0800 bearing the
> following fruit:
>
>>VB6SP6
>>I have only seen this in the compiled app.
>>Does not happen regularly.
>>I do the same commands repeatedly and this only happens once in maybe 50
>>times.
>>Any clues to what it is and what is causing it?
>>It can happen in one of two different and unrelated subs.
>>Has anyone seen this before?
>>First time for me in ten years.
>>
>>Error Number -2147417848 Automation error
>>The object invoked has disconnected from its clients.
>
> Well the question is, what object are you invoking. Are you
> for example automating outlook? Are you dealing with
> recordsets?
>
> The first step is identify exactly which line of code the
> error is occuring on.
> --
> Jan Hyde
>
> https://mvp.support.microsoft.com/profile/Jan.Hyde
Author
4 Mar 2009 7:04 PM
mayayana
Would this be an ActiveX EXE? I've seen that
message when I've used an ActiveX EXE or an
automation object like IE, with events, in scripting.
I don't remember now exactly what caused it,
but I think it had to do with referring to the object
somehow after the event trap had been released.
Author
4 Mar 2009 8:02 PM
C Kevin Provance
"mayayana" <mayayaX***@rcXXn.com> wrote in message
news:%236YEGxPnJHA.4912@TK2MSFTNGP04.phx.gbl...
|  Would this be an ActiveX EXE? I've seen that
| message when I've used an ActiveX EXE or an
| automation object like IE, with events, in scripting.
| I don't remember now exactly what caused it,
| but I think it had to do with referring to the object
| somehow after the event trap had been released.

It could even be an ActiveX control.  I've had end users claim to get this
error when the program attempted to reference some property or method of the
already loaded control.  It's rare and I haven't seen it in a while.  For
lack of a bette solution I would just toss off a "reinstall" answer and that
seemed to make it go away.  It wasn't a VB authored AX control, but rather a
C++ authored control.

- Kev
Author
4 Mar 2009 9:14 PM
Ralph
"Lorin" <lor***@hotmail.com> wrote in message
news:118EC105-C3D8-4CB2-B23A-220531B5998B@microsoft.com...
>
> Maybe this is just the luck of the draw, but ... ???
> Unfortunately, I have never been educated in running a debugger like
WinDBG
> so what else can I try?
>

Then it is time you learned.

As everyone pointed out - this error can come from a number of sources -
anything that is using COM protocols - in this the case the objects created
by your classes. You haven't a prayer to find the problem, unless you ARE
incredibly lucky, unless you know at least where and who is causing the
problem.

"Debugging Tools for Windows - Overview"
http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx
(You can also use the VC++ debugger, if interested, post again for links on
how.)

You might also be interested in collecting the tools from SysInternals
http://technet.microsoft.com/en-us/sysinternals/default.aspx

Debugging at 'runtime' comes in two main versions.
1) Re-compile the program with debug-symbols, then view or query the program
instance on error.
This has the unfortunate problem that compiling a debug version removes any
optimization and replaces the runtime memory allocation library with a debug
version - both common sources for runtime-only errors.
2) Instrument your executable with logging (either to file or external
viewer). Perhaps even including line numbering.

[
If you haven't already download Mz-Tools which can help with the coding.
http://www.mztools.com/v3/download.aspx
]

It is not as difficult as it appears at first glance. Like most tools - you
don't have to use (or even understand) every feature to gain the benefit.

-ralph
Author
4 Mar 2009 10:30 PM
Lorin
Thanks for the reminder on line numbering.
I do have MZ installed so it should be easy to do this.
I have error handling in both subs and I know exactly which subs to number.

I am getting old and slow so I am not sure if this old dog can learn new
tricks without someone sitting beside me and showing me how.
So although a debugger wold be great fun, I am not sure if I can handle it
now.

I did download the WinDbg and installed it, but other than knowing how to
cause symbols to be generated, I am at a loss even how to get started.  Is
the a debugger for dummies?


Show quoteHide quote
"Ralph" wrote:

>
> "Lorin" <lor***@hotmail.com> wrote in message
> news:118EC105-C3D8-4CB2-B23A-220531B5998B@microsoft.com...
> >
> > Maybe this is just the luck of the draw, but ... ???
> > Unfortunately, I have never been educated in running a debugger like
> WinDBG
> > so what else can I try?
> >
>
> Then it is time you learned.
>
> As everyone pointed out - this error can come from a number of sources -
> anything that is using COM protocols - in this the case the objects created
> by your classes. You haven't a prayer to find the problem, unless you ARE
> incredibly lucky, unless you know at least where and who is causing the
> problem.
>
> "Debugging Tools for Windows - Overview"
> http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx
> (You can also use the VC++ debugger, if interested, post again for links on
> how.)
>
> You might also be interested in collecting the tools from SysInternals
> http://technet.microsoft.com/en-us/sysinternals/default.aspx
>
> Debugging at 'runtime' comes in two main versions.
> 1) Re-compile the program with debug-symbols, then view or query the program
> instance on error.
> This has the unfortunate problem that compiling a debug version removes any
> optimization and replaces the runtime memory allocation library with a debug
> version - both common sources for runtime-only errors.
> 2) Instrument your executable with logging (either to file or external
> viewer). Perhaps even including line numbering.
>
> [
> If you haven't already download Mz-Tools which can help with the coding.
> http://www.mztools.com/v3/download.aspx
> ]
>
> It is not as difficult as it appears at first glance. Like most tools - you
> don't have to use (or even understand) every feature to gain the benefit.
>
> -ralph
>
>
>
Author
5 Mar 2009 1:16 AM
Ralph
Show quote Hide quote
"Lorin" <Lo***@discussions.microsoft.com> wrote in message
news:4C5975A6-D1A5-42C4-AD55-997DFC27F17A@microsoft.com...
> Thanks for the reminder on line numbering.
> I do have MZ installed so it should be easy to do this.
> I have error handling in both subs and I know exactly which subs to
number.
>
> I am getting old and slow so I am not sure if this old dog can learn new
> tricks without someone sitting beside me and showing me how.
> So although a debugger wold be great fun, I am not sure if I can handle it
> now.
>
> I did download the WinDbg and installed it, but other than knowing how to
> cause symbols to be generated, I am at a loss even how to get started.  Is
> the a debugger for dummies?
>
>

Tutorial:
http://www.codeproject.com/KB/debug/windbg_part1.aspx
There are additional "parts" to this series.

A couple of useful WinAPI functions:

Private Declare Sub DebugBreak Lib "kernel32" Alias "DebugBreak" ()
Insert this in your program (in a conditional statement, condtional compile,
or just as a "breakpoint", and it will automatically launch the external
debugger.

For simple quick logging use the following declare:
Private Declare Sub OutputDebugString Lib "kernel32"
    Alias "OutputDebugStringA" (ByVal lpOutputString As String)
Download a DebugViewer here:
    http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
You can use the OutputDebugString call as often as you want in your program
and the string will appear in the Viewer. Combine this with line numbers and
ERL for additional location information.

Like I said, it may appear over-whelming at first, but you can start simple
and use other features as you come across a need.
The first thing to do is to install it as your Just-In-Time Debugger, a
replacement for Dr. Watson. From now on whenever you get an
unhandled-exception WinDbg will be launched. From there you can check the
call that failed, examine the call stack, find values for variables, examine
memory, etc.. For your situation - that may be all you need. In fact just
knowing who, where, and what is all you need to solve 90% of your problems.

Playing with it a few times is worth more than a ton of reading. Just create
a couple of simple programs, insert a few DebugBreak()s here and there - run
them and then play around with the results.

-ralph
Author
5 Mar 2009 2:52 AM
Lorin
Thanks.  I will give it a try.

Show quoteHide quote
"Ralph" <nt_consultin***@yahoo.com> wrote in message
news:ur$mJFTnJHA.3944@TK2MSFTNGP06.phx.gbl...
>
> "Lorin" <Lo***@discussions.microsoft.com> wrote in message
> news:4C5975A6-D1A5-42C4-AD55-997DFC27F17A@microsoft.com...
>> Thanks for the reminder on line numbering.
>> I do have MZ installed so it should be easy to do this.
>> I have error handling in both subs and I know exactly which subs to
> number.
>>
>> I am getting old and slow so I am not sure if this old dog can learn new
>> tricks without someone sitting beside me and showing me how.
>> So although a debugger wold be great fun, I am not sure if I can handle
>> it
>> now.
>>
>> I did download the WinDbg and installed it, but other than knowing how to
>> cause symbols to be generated, I am at a loss even how to get started.
>> Is
>> the a debugger for dummies?
>>
>>
>
> Tutorial:
> http://www.codeproject.com/KB/debug/windbg_part1.aspx
> There are additional "parts" to this series.
>
> A couple of useful WinAPI functions:
>
> Private Declare Sub DebugBreak Lib "kernel32" Alias "DebugBreak" ()
> Insert this in your program (in a conditional statement, condtional
> compile,
> or just as a "breakpoint", and it will automatically launch the external
> debugger.
>
> For simple quick logging use the following declare:
> Private Declare Sub OutputDebugString Lib "kernel32"
>    Alias "OutputDebugStringA" (ByVal lpOutputString As String)
> Download a DebugViewer here:
>    http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
> You can use the OutputDebugString call as often as you want in your
> program
> and the string will appear in the Viewer. Combine this with line numbers
> and
> ERL for additional location information.
>
> Like I said, it may appear over-whelming at first, but you can start
> simple
> and use other features as you come across a need.
> The first thing to do is to install it as your Just-In-Time Debugger, a
> replacement for Dr. Watson. From now on whenever you get an
> unhandled-exception WinDbg will be launched. From there you can check the
> call that failed, examine the call stack, find values for variables,
> examine
> memory, etc.. For your situation - that may be all you need. In fact just
> knowing who, where, and what is all you need to solve 90% of your
> problems.
>
> Playing with it a few times is worth more than a ton of reading. Just
> create
> a couple of simple programs, insert a few DebugBreak()s here and there -
> run
> them and then play around with the results.
>
> -ralph
>
>
>
Author
5 Mar 2009 2:21 AM
Phil H
When you run in IDE, disable the Error handling by right clik on any code
and choose Toggle/Stop on All Error. Now run thru the program as well as you
can, it will stop on any error. Maybe you get lucky and fix it good.


Show quoteHide quote
"Lorin" <Lo***@discussions.microsoft.com> wrote in message
news:4C5975A6-D1A5-42C4-AD55-997DFC27F17A@microsoft.com...
> Thanks for the reminder on line numbering.
> I do have MZ installed so it should be easy to do this.
> I have error handling in both subs and I know exactly which subs to
> number.
>
> I am getting old and slow so I am not sure if this old dog can learn new
> tricks without someone sitting beside me and showing me how.
> So although a debugger wold be great fun, I am not sure if I can handle it
> now.
>
> I did download the WinDbg and installed it, but other than knowing how to
> cause symbols to be generated, I am at a loss even how to get started.  Is
> the a debugger for dummies?
>
>
> "Ralph" wrote:
>
>>
>> "Lorin" <lor***@hotmail.com> wrote in message
>> news:118EC105-C3D8-4CB2-B23A-220531B5998B@microsoft.com...
>> >
>> > Maybe this is just the luck of the draw, but ... ???
>> > Unfortunately, I have never been educated in running a debugger like
>> WinDBG
>> > so what else can I try?
>> >
>>
>> Then it is time you learned.
>>
>> As everyone pointed out - this error can come from a number of sources -
>> anything that is using COM protocols - in this the case the objects
>> created
>> by your classes. You haven't a prayer to find the problem, unless you ARE
>> incredibly lucky, unless you know at least where and who is causing the
>> problem.
>>
>> "Debugging Tools for Windows - Overview"
>> http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx
>> (You can also use the VC++ debugger, if interested, post again for links
>> on
>> how.)
>>
>> You might also be interested in collecting the tools from SysInternals
>> http://technet.microsoft.com/en-us/sysinternals/default.aspx
>>
>> Debugging at 'runtime' comes in two main versions.
>> 1) Re-compile the program with debug-symbols, then view or query the
>> program
>> instance on error.
>> This has the unfortunate problem that compiling a debug version removes
>> any
>> optimization and replaces the runtime memory allocation library with a
>> debug
>> version - both common sources for runtime-only errors.
>> 2) Instrument your executable with logging (either to file or external
>> viewer). Perhaps even including line numbering.
>>
>> [
>> If you haven't already download Mz-Tools which can help with the coding.
>> http://www.mztools.com/v3/download.aspx
>> ]
>>
>> It is not as difficult as it appears at first glance. Like most tools -
>> you
>> don't have to use (or even understand) every feature to gain the benefit.
>>
>> -ralph
>>
>>
>>
Author
5 Mar 2009 5:20 PM
Jan Hyde
"Lorin" <lor***@hotmail.com>'s wild thoughts were released
on Wed, 4 Mar 2009 08:50:09 -0800 bearing the following
fruit:

>I know, but I can never get the failure in the IDE and it occurs seldom in
>the compiled so it is difficult to trap.
>The two subs are not dealing with anything like Outlook, only my own classes
>etc.
>I run this on an XP PC and never see it.
>It always happens on a Vista PC.
>Maybe this is just the luck of the draw, but ... ???
>Unfortunately, I have never been educated in running a debugger like WinDBG
>so what else can I try?

You don't need anything fancy.

Add line numbers, log the information to a file when an
error occurs (MZtools will even add the error handlers)

When the error occurs check the log.

Bingo.

J

Show quoteHide quote
>"Jan Hyde" <StellaDrin***@REMOVE.ME.uboot.com> wrote in message
>news:ubtsq45ot4ibrh56buvmf4rojk2efk6q19@4ax.com...
>> Lorin <Lo***@discussions.microsoft.com>'s wild thoughts were
>> released on Wed, 4 Mar 2009 01:35:01 -0800 bearing the
>> following fruit:
>>
>>>VB6SP6
>>>I have only seen this in the compiled app.
>>>Does not happen regularly.
>>>I do the same commands repeatedly and this only happens once in maybe 50
>>>times.
>>>Any clues to what it is and what is causing it?
>>>It can happen in one of two different and unrelated subs.
>>>Has anyone seen this before?
>>>First time for me in ten years.
>>>
>>>Error Number -2147417848 Automation error
>>>The object invoked has disconnected from its clients.
>>
>> Well the question is, what object are you invoking. Are you
>> for example automating outlook? Are you dealing with
>> recordsets?
>>
>> The first step is identify exactly which line of code the
>> error is occuring on.
>> --
>> Jan Hyde
>>
>> https://mvp.support.microsoft.com/profile/Jan.Hyde

--
Jan Hyde

https://mvp.support.microsoft.com/profile/Jan.Hyde