Home All Groups Group Topic Archive Search About
Author
27 Aug 2010 11:57 PM
BeeJ
My app compiles with Ctrl-F5 then locks up.
My app compiles to an EXE.  When run it locks up and does not fully
start.  Ctrl-Break does nothing.  The Stop button is inactive.
I use Process Explorer to kill it.
References are all there.
In the IDE the first lockup occurs at the Set GetObject statement for
an late bound ActiveX EXE.  It just hangs there.
Process Explorer shows that it started the ActiveX EXE but there is no
CPU.  This is as expected.  This ActiveX EXE does little until it is
talked to later.
I get the Component Request Pending Switch To / Retry box that does
nothing to get unstuck since the action would have to be in the ActiveX
EXE that is compiled.  The code is off into the ActiveX EXE but does
not want to come back.  I use Process Explorer to kill the IDE.
So I commented out the Set for the ActiveX EXE.
Now it goes past this to the next lockup.
This is at the Set for another ActiveX EXE this time an early bound
one.
If I comment out all of the ActiveX EXE the app starts then the code
runs (without the ActiveX EXE features).
I have not changed the ActiveX EXEs or the areas where I start them.
I have rebooted the PC with no luck.
I double-clicked each ActiveX EXE and got my "no stand-alone" message
as expected.
I show 2G memory free.
I do not see anything unexpected running from Process Explorer.
Once or twice it came back from the first ActiveX EXE after many
minutes  with an error that it could not do the Set.  Then the code
proceeded to the second ActiveX EXE set where it hung until I killed
it.
All this code has been running.
What might be doing this?  Anything Windows XP related?
Is there something that will disable COM?

Author
28 Aug 2010 1:10 AM
ralph
On Fri, 27 Aug 2010 16:57:42 -0700, BeeJ <nospam@nowhere.com> wrote:

Show quoteHide quote
>My app compiles with Ctrl-F5 then locks up.
>My app compiles to an EXE.  When run it locks up and does not fully
>start.  Ctrl-Break does nothing.  The Stop button is inactive.
>I use Process Explorer to kill it.
>References are all there.
>In the IDE the first lockup occurs at the Set GetObject statement for
>an late bound ActiveX EXE.  It just hangs there.
>Process Explorer shows that it started the ActiveX EXE but there is no
>CPU.  This is as expected.  This ActiveX EXE does little until it is
>talked to later.
>I get the Component Request Pending Switch To / Retry box that does
>nothing to get unstuck since the action would have to be in the ActiveX
>EXE that is compiled.  The code is off into the ActiveX EXE but does
>not want to come back.  I use Process Explorer to kill the IDE.
>So I commented out the Set for the ActiveX EXE.
>Now it goes past this to the next lockup.
>This is at the Set for another ActiveX EXE this time an early bound
>one.
>If I comment out all of the ActiveX EXE the app starts then the code
>runs (without the ActiveX EXE features).
>I have not changed the ActiveX EXEs or the areas where I start them.
>I have rebooted the PC with no luck.
>I double-clicked each ActiveX EXE and got my "no stand-alone" message
>as expected.
>I show 2G memory free.
>I do not see anything unexpected running from Process Explorer.
>Once or twice it came back from the first ActiveX EXE after many
>minutes  with an error that it could not do the Set.  Then the code
>proceeded to the second ActiveX EXE set where it hung until I killed
>it.
>All this code has been running.
>What might be doing this?  Anything Windows XP related?
>Is there something that will disable COM?
>

What does the statement calling GetObject look like?
Try CreateObject().

You might want to debug both the client and the ActiveX component at
the same time.
[ Make sure you change the reference from the .exe to the .vbp in the
client project.]

Sounds like an endless loop somewhere.

-ralph
Author
29 Aug 2010 2:35 AM
BeeJ
Doubt anything related makes an difference.

Public Const csAxDeTrace    As String = "DebugTracePlus.EntryPoint"
    Set m_AXDeTrace = GetObject(cEmptyString, csAxDeTrace)

because, if I copy all the code to another PC, it all runs just fine.
I have been running this on my development PC for ages and then one day
this week, it stops running.  Unfortunately I cannot remember what it
anything changed related to VB6 on the PC.
It all compiles.  References look good.  The folder has no changes i.e.
the Ax has not been moved.
Author
29 Aug 2010 3:46 AM
ralph
On Sat, 28 Aug 2010 19:35:14 -0700, BeeJ <nospam@nowhere.com> wrote:

>Doubt anything related makes an difference.
>
>Public Const csAxDeTrace    As String = "DebugTracePlus.EntryPoint"
>    Set m_AXDeTrace = GetObject(cEmptyString, csAxDeTrace)
>

Sidenote:
If you intention is to always open a new instance, (which is what an
empty string for a first parameter does), then just use CreateObject()
and remove any opportunity for things to go wrong.
But doubt this is having any effect.

>because, if I copy all the code to another PC, it all runs just fine.
>I have been running this on my development PC for ages and then one day
>this week, it stops running.  Unfortunately I cannot remember what it
>anything changed related to VB6 on the PC.
>It all compiles.  References look good.  The folder has no changes i.e.
>the Ax has not been moved.
>

This is useful information.
Author
29 Aug 2010 3:00 AM
BeeJ
more data points.

I dereferenced the AxEXe and referenced the Ax .VBP.
I stepped through into the Ax in the other IDE and back out with NO
errors.  Not much happening there at startup anyway.
I compiled the Ax and dereferenced the .VBP and referenced the AxEXE.
And it hung a the set.
This one is early.
    Set g_AxX10 = New AxX10.Entry       ' early binding

The error message is
    ActiveX component can't create object
The ActiveX is not trying to create anything.  It is just setting a few
strings.  The only Set is a follows, then exits the Ax back to the main
app.
    Set colMessaging = New Collection

    Set colDevCmd = New Collection
    Set fCommHolder = New frmDevCommTimer
    fCommHolder.tmrDevTimer.Enabled = False

But as a .VBP it steps through all of this just fine.
Author
29 Aug 2010 3:57 AM
ralph
On Sat, 28 Aug 2010 20:00:25 -0700, BeeJ <nospam@nowhere.com> wrote:

>more data points.
>
>I dereferenced the AxEXe and referenced the Ax .VBP.
>I stepped through into the Ax in the other IDE and back out with NO
>errors.  Not much happening there at startup anyway.
>I compiled the Ax and dereferenced the .VBP and referenced the AxEXE.
>And it hung a the set.
>This one is early.
>    Set g_AxX10 = New AxX10.Entry       ' early binding
>
>The error message is
>    ActiveX component can't create object
>The ActiveX is not trying to create anything. 

Actually it is.

It is trying to deliver an instance of the object your client
requested. This object exists in the Server's program space.

Show quoteHide quote
>It is just setting a few
>strings.  The only Set is a follows, then exits the Ax back to the main
>app.
>    Set colMessaging = New Collection
>
>    Set colDevCmd = New Collection
>    Set fCommHolder = New frmDevCommTimer
>    fCommHolder.tmrDevTimer.Enabled = False
>
>But as a .VBP it steps through all of this just fine.
>
Author
29 Aug 2010 3:29 AM
BeeJ
more data points.

I put a MsgBox in the Ax EXE compiled class_initialize and the Sub
Main.
Neither one of them executed.
The Set is just not connecting to the Ax it seems.
Author
29 Aug 2010 4:08 AM
ralph
On Sat, 28 Aug 2010 20:29:02 -0700, BeeJ <nospam@nowhere.com> wrote:

>more data points.
>
>I put a MsgBox in the Ax EXE compiled class_initialize and the Sub
>Main.
>Neither one of them executed.
>The Set is just not connecting to the Ax it seems.
>

Has to be the registery.

Go peak and trace the "DebugTracePlus.EntryPoint" CLSID.
(You might save a little time by simply copying the entries on the PC
that works and compare to what you have on the development box.

I highly advise when developing ActiveX components to do a frequent
Registry and Project/s cleanup. Burn it down to the water line, then
re-reference, re-register as necessary.

[Note: The VBIDE does a bit of various magic as far a COM is concerned
when using ActiveX components. This magic comes under the heading of
"VB Hijacks the Registry". In other words, it often doesn't use the
"PC's copy" but makes some assumptions.]

-ralph
Author
29 Aug 2010 9:20 AM
Nobody
Unregister everything, then recompile the Ax EXE first?
Author
29 Aug 2010 9:58 PM
BeeJ
After serious thinking Nobody wrote :
> Unregister everything, then recompile the Ax EXE first?

I unregistered all Ax EXEs with
path\ActivexFile.exe /unregserver
no complaints.

I then recompiled all Ax EXEs.  No problems.
I then loaded the main app that requested to reference them.
I referenced them all.
I ran and still have the same problem.
Not able to create.

Yikes!  What now?
Author
29 Aug 2010 10:39 PM
BeeJ
I deleted all entries in the Registry related to the first AxEXE.
I then recompiled the AxEXE.
Loaded the main app and set the reference.
NO GO!
Same error.
I do not think it is related directly to an individual ActiveX EXE
since I have four in the app and all of them have the same problem.
All were working up until a few days ago.
So something else is getting in the way of the Set operation.
I cannot remember doing anything unusual in Windows.