Problem loading deployed in-process app

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

Problem loading deployed in-process app

Don Rylander-3
I have an app that hooks into Outlook that works fine either as an exe file,
or as an in-process server in the development environment (very cool and
very easy!), but it doesn't do so well as a DLL.  When Outlook tries to load
it, it always dies.  I've included the first error below (there are also
some follow-on DNU errors that appear to result from the first).  This is my
first stab at creating any sort of in-process app, so I could have
overlooked just about anything.  Any ideas on how to resolve it would be
appreciated greatly!

Thanks,

Don


************************** Dolphin Virtual Machine Dump Report
***************************

15:53:31 PM, 8/7/2002: failed to create window (16r2: The system cannot find
the file specified.)

*----> VM Context <----*
Process: {02AC0004:suspended frame 02AC0559, priority 5, callbacks 1
last failure 2:nil, FPE mask 3, thread nil}
Active Method: AXDllSessionManager>>logError:
IP: 0287501F (15)
SP: 02AC05CC
BP: 02AC05A4 (344)
ActiveFrame: {02AC05A8: cf 02AC058D, sp 02AC05BC, bp 02AC05A4, ip 5,
AXDllSessionManager>>logError:}

New Method: VMLibrary>>dump:path:stackDepth:walkbackDepth:
Message Selector: #dump:path:stackDepth:walkbackDepth:

*----> Stack <----*
[02AC05CC: 354]-->50
[02AC05C8: 353]-->60
[02AC05C4: 352]-->nil
[02AC05C0: 351]-->'failed to create window (16r2: The system cannot find the
file specified.)'
[02AC05BC: 350]-->a VMLibrary
[02AC05B8: 349]-->22414034
[02AC05B4: 348]-->AXDllSessionManager>>logError:
[02AC05B0: 347]-->22414046
[02AC05AC: 346]-->8
[02AC05A8: 345]-->22414022
[02AC05A4: 344]-->a Win32Error
[02AC05A0: 343]-->a AXDllSessionManager
[02AC059C: 342]-->22414020
[02AC0598: 341]-->AXDllSessionManager>>unhandledException:
[02AC0594: 340]-->22414030
[02AC0590: 339]-->7
[02AC058C: 338]-->22414008
[02AC0588: 337]-->a Win32Error
[02AC0584: 336]-->a AXDllSessionManager
[02AC0580: 335]-->22414006
[02AC057C: 334]-->SessionManager>>onUnhandledError:
[02AC0578: 333]-->22414016
[02AC0574: 332]-->3
[02AC0570: 331]-->22413994
[02AC056C: 330]-->a Win32Error
[02AC0568: 329]-->a AXDllSessionManager
[02AC0564: 328]-->22413994
[02AC0560: 327]-->Error>>defaultAction
[02AC055C: 326]-->22414002
[02AC0558: 325]-->8
...
<293 slots omitted>
...
[02AC00C0: 31]-->a MethodContext
[02AC00BC: 30]-->BlockClosure>>ifCurtailed:
[02AC00B8: 29]-->22413412
[02AC00B4: 28]-->20
[02AC00B0: 27]-->22413390
[02AC00AC: 26]-->22413386
[02AC00A8: 25]-->BlockClosure>>ensure:
[02AC00A4: 24]-->22413398
[02AC00A0: 23]-->7
[02AC009C: 22]-->22413374
[02AC0098: 21]-->nil
[02AC0094: 20]-->[] @ 34 in ExceptionHandlerAbstract>>try:
[02AC0090: 19]-->[] @ 15 in ExceptionHandlerAbstract>>try:
[02AC008C: 18]-->a MethodContext
[02AC0088: 17]-->ExceptionHandlerAbstract>>try:
[02AC0084: 16]-->22413382
[02AC0080: 15]-->42
[02AC007C: 14]-->22413364
[02AC0078: 13]-->22413360
[02AC0074: 12]-->BlockClosure>>on:do:
[02AC0070: 11]-->22413372
[02AC006C: 10]-->10
[02AC0068: 9]-->22413348
[02AC0064: 8]-->[] @ 12 in BlockClosure>>newProcess
[02AC0060: 7]-->ProcessTermination
[02AC005C: 6]-->[] @ 8 in InputState>>forkMain
[02AC0058: 5]-->[] @ 6 in BlockClosure>>newProcess
[02AC0054: 4]-->BlockClosure>>newProcess
[02AC0050: 3]-->22413356
[02AC004C: 2]-->20
[02AC0048: 1]-->0
<Bottom of stack>

*----> Stack Back Trace <----*
{02AC05A8: cf 02AC058D, sp 02AC05BC, bp 02AC05A4, ip 5,
AXDllSessionManager>>logError:}
{02AC058C: cf 02AC0571, sp 02AC059C, bp 02AC0588, ip 4,
AXDllSessionManager>>unhandledException:}
{02AC0570: cf 02AC0555, sp 02AC0580, bp 02AC056C, ip 4,
AXDllSessionManager(SessionManager)>>onUnhandledError:}
{02AC0554: cf 02AC053D, sp 02AC0564, bp 02AC0554, ip 5,
Win32Error(Error)>>defaultAction}
{02AC053C: cf 02AC0529, sp 02AC054C, bp 029D57B8, ip 57,
Win32Error(Exception)>>_propagateFrom:}
{02AC0528: cf 02AC050D, sp 02AC0538, bp 02AC0524, ip 6,
Win32Error(Exception)>>_propagate}
{02AC050C: cf 02AC04F5, sp 02AC051C, bp 02AC050C, ip 12,
Win32Error(Exception)>>signal}
{02AC04F4: cf 02AC04D9, sp 02AC0504, bp 02AC04F0, ip 7,
Win32Error(Exception)>>signal:}
{02AC04D8: cf 02AC04BD, sp 02AC04E8, bp 02AC04D4, ip 5, Win32Error
class(Exception class)>>signal:}
{02AC04BC: cf 02AC04A1, sp 02AC04CC, bp 02AC04B8, ip 11,
ShellNotifyView(View)>>unhookWindowCreate:}
{02AC04A0: cf 02AC0481, sp 02AC04B0, bp 02AC0498, ip 10,
ShellNotifyView(View)>>createAt:extent:}
{02AC0480: cf 02AC0469, sp 02AC0490, bp 02AC0480, ip 6,
MessageSend(MessageSendAbstract)>>value}
{02AC0468: cf 02AC044D, sp 02AC0478, bp 029D5780, ip 9, [] in
MessageSequence(MessageSequenceAbstract)>>value}
{02AC044C: cf 02AC042D, sp 02AC0464, bp 02AC0444, ip 15,
OrderedCollection>>do:}
{02AC042C: cf 02AC0411, sp 02AC043C, bp 02AC0428, ip 4,
MessageSequence>>messagesDo:}
{02AC0410: cf 02AC03FD, sp 02AC0420, bp 029D5780, ip 13,
MessageSequence(MessageSequenceAbstract)>>value}
{02AC03FC: cf 02AC03E1, sp 02AC040C, bp 02AC03F8, ip 3,
ShellNotifyView(View)>>state:}
{02AC03E0: cf 02AC03CD, sp 02AC03F0, bp 029D5748, ip 61,
ShellNotifyView(STBViewProxy)>>restoreView}
{02AC03CC: cf 02AC03B1, sp 02AC03DC, bp 02AC03C8, ip 3,
ShellNotifyView(STBViewProxy)>>restoreTopView}
{02AC03B0: cf 02AC0399, sp 02AC03C0, bp 02AC03B0, ip 6,
MessageSend(MessageSendAbstract)>>value}
{02AC0398: cf 02AC037D, sp 02AC03A8, bp 029D52E8, ip 12, [] in
STBInFiler>>evaluateDeferredActions}
{02AC037C: cf 02AC035D, sp 02AC0394, bp 02AC0374, ip 15,
OrderedCollection>>do:}
{02AC035C: cf 02AC0349, sp 02AC036C, bp 029D52E8, ip 14,
STBInFiler>>evaluateDeferredActions}
{02AC0348: cf 02AC032D, sp 02AC0358, bp 02AC0344, ip 6, STBInFiler>>next}
{02AC032C: cf 02AC030D, sp 02AC033C, bp 02AC0324, ip 18,
ResourceSTBByteArrayAccessor>>loadWithContext:}
{02AC030C: cf 02AC02F1, sp 02AC031C, bp 02AC0308, ip 4,
ViewResource(Resource)>>loadWithContext:}
{02AC02F0: cf 02AC02D5, sp 02AC0300, bp 02AC02EC, ip 5,
ResourceIdentifier>>loadWithContext:}
{02AC02D4: cf 02AC02AD, sp 02AC02E4, bp 02AC02C8, ip 9,
TimeEntryAppPresenter class(Presenter class)>>loadViewResource:inContext:}
{02AC02AC: cf 02AC028D, sp 02AC02C0, bp 02AC02A8, ip 8,
TimeEntryAppPresenter(Shell)>>createView:}
{02AC028C: cf 02AC026D, sp 02AC02A0, bp 02AC0284, ip 7,
TimeEntryAppPresenter class(Presenter class)>>create:on:}
{02AC026C: cf 02AC0251, sp 02AC027C, bp 02AC0268, ip 6,
TimeEntryAppPresenter class(Presenter class)>>createOn:}
{02AC0250: cf 02AC0235, sp 02AC0260, bp 02AC024C, ip 4,
TimeEntryAppPresenter class(Presenter class)>>showOn:}
{02AC0234: cf 02AC0209, sp 02AC0244, bp 02AC0220, ip 9,
TimeEntryAddin>>OnConnection:ConnectMode:AddInInst:custom:}
{02AC0208: cf 02AC01E5, sp 02AC0218, bp 02AC01FC, ip 8,
COMFunction>>callback:interface:withArgumentsAt:}
{02AC01E4: cf 02AC01C1, sp 02AC01F4, bp 02AC01D8, ip 11,
AddInDesignerObjects_IDTExtensibility2(COMInterface)>>callback:vfn:withArgum
entsAt:}
{02AC01C0: cf 02AC019D, sp 02AC01D0, bp 02AC01B4, ip 9,
COMObjectStub>>callback:vfn:withArgumentsAt:}
{02AC019C: cf 02AC0181, sp 02AC01AC, bp 029D52B0, ip 15, [] in
ProcessorScheduler>>comCallback:id:subId:withArgumentsAt:cookie:}
{02AC0180: cf 02AC0165, sp 02AC0198, bp 029D5198, ip 17,
BlockClosure>>ifCurtailed:}
{02AC0164: cf 02AC0149, sp 02AC017C, bp 029D52B0, ip 25,
ProcessorScheduler>>comCallback:id:subId:withArgumentsAt:cookie:}
{02AC0148: cf 02AC012D, sp 02AC0160, bp 02AC0144, ip 30,
InputState>>pumpMessage:}
{02AC012C: cf 02AC0109, sp 02AC013C, bp 02AC0120, ip 18,
InputState>>loopWhile:}
{02AC0108: cf 02AC00F5, sp 02AC0118, bp 029D54A8, ip 12,
InputState>>mainLoop}
{02AC00F4: cf 02AC00E1, sp 02AC0104, bp 029D5390, ip 13, [] in
InputState>>forkMain}
{02AC00E0: cf 02AC00CD, sp 02AC00F0, bp 029D5470, ip 11,
ExceptionHandler(ExceptionHandlerAbstract)>>markAndTry}
{02AC00CC: cf 02AC00B1, sp 02AC00DC, bp 029D5400, ip 21, [] in
ExceptionHandler(ExceptionHandlerAbstract)>>try:}
{02AC00B0: cf 02AC009D, sp 02AC00C8, bp 029D5438, ip 17,
BlockClosure>>ifCurtailed:}
{02AC009C: cf 02AC007D, sp 02AC00AC, bp 02AC0094, ip 4,
BlockClosure>>ensure:}
{02AC007C: cf 02AC0069, sp 02AC008C, bp 029D5400, ip 39,
ExceptionHandler(ExceptionHandlerAbstract)>>try:}
{02AC0068: cf 02AC0049, sp 02AC0078, bp 02AC0060, ip 7,
BlockClosure>>on:do:}
{02AC0048: cf 00000001, sp 02AC0058, bp 029D53C8, ip 17, [] in
BlockClosure>>newProcess}
<...more...>

***** End of dump *****


Reply | Threaded
Open this post in threaded view
|

Re: Problem loading deployed in-process app

Blair McGlashan
"Don Rylander" <[hidden email]> wrote in
message news:ais1ua$16e0su$[hidden email]...
> I have an app that hooks into Outlook that works fine either as an exe
file,
> or as an in-process server in the development environment (very cool and
> very easy!), but it doesn't do so well as a DLL.  When Outlook tries to
load
> it, it always dies.  I've included the first error below (there are also
> some follow-on DNU errors that appear to result from the first).  This is
my
> first stab at creating any sort of in-process app, so I could have
> overlooked just about anything.  Any ideas on how to resolve it would be
> appreciated greatly!

When deploying as a DLL the default SessionManager is AXDllSessionManager,
which is not a subclass of GUISessionManager, and does not contain the
necessary glue to initialize the windowing system. Hence when you try to
open a window in your DLL it fails. The easiest way to achieve what you are
trying to do is probably to add a custom subclass of GUISessionManager which
selectively overrides SessionManager messages in the same way that
AXDllSessionManager does, with the obvious exception of #startUI which
should use the GUISessionManager implementation.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Problem loading deployed in-process app

Don Rylander-3
"Blair McGlashan" <[hidden email]> wrote in message
news:aitgf5$16c39c$[hidden email]...
> "Don Rylander" <[hidden email]> wrote in
> message news:ais1ua$16e0su$[hidden email]...
[...]
> When deploying as a DLL the default SessionManager is AXDllSessionManager,
> which is not a subclass of GUISessionManager, and does not contain the
> necessary glue to initialize the windowing system. Hence when you try to
> open a window in your DLL it fails. The easiest way to achieve what you
are
> trying to do is probably to add a custom subclass of GUISessionManager
which
> selectively overrides SessionManager messages in the same way that
> AXDllSessionManager does, with the obvious exception of #startUI which
> should use the GUISessionManager implementation.
Aha!  I suppose a modicum of thought about what was staring me in the face
in the class hierarchy might have clued me in sooner.  If it's just a matter
of creating a new subclass of GUISessionManager that implements the eight
instance-side and three class-side methods of AXDllSessionManager, that
should be short work.

By the way, this is the first time I've tried a COM implementation, and even
with a near complete ignorance of the subject, it was amazingly easy--even
straightforward.  DST is just so much nicer than anything Microsoft has to
offer.  Very nice work OA!

Thanks for the help,

Don

>
> Regards
>
> Blair
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Problem loading deployed in-process app

Don Rylander-3
HA!  That was pathetically easy.  Thanks to the miracle of drag-and-drop,
the extremely useful Inheritance Chain feature, and Smalltalk's inherent
superiority to all other environments (IMHO ;-), it took about 10 minutes to
register a resounding success.

Thanks again, Blair!

Don


Reply | Threaded
Open this post in threaded view
|

Re: Problem loading deployed in-process app

Don Rylander-3
In reply to this post by Blair McGlashan
In case anyone is curious (or silly) enough to try this, I've included the
contents of a .CLS file for GUIAXDllSessionManager, a subclass of
RuntimeSessionManager that you can use for DLL's that use the windowing
system.

Have fun,

Don

"********* Everything below this line belongs in the CLS file *****"
"Filed out from Dolphin Smalltalk 2002 release 5.00"!

RuntimeSessionManager subclass: #GUIAXDllSessionManager
 instanceVariableNames: ''
 classVariableNames: ''
 poolDictionaries: ''
 classInstanceVariableNames: ''!
GUIAXDllSessionManager guid: (GUID fromString:
'{A446C2BA-264F-4A93-BAA4-91210009A057}')!
GUIAXDllSessionManager comment: ''!
!GUIAXDllSessionManager categoriesForClass!System-Support! !
!GUIAXDllSessionManager methodsFor!

isDLL
 "Private - Answer whether the receiver is a shared library, as opposed to
an application."

 ^true!

keepAlive
 "We stay alive until the host process unloads us."

 ^self!

openConsoleStreams
 "Private - Open the standard console I/O streams."

 "Do nothing - when running as a DLL we cannot assume we have access to the
console"

 ! !
!GUIAXDllSessionManager categoriesFor: #isDLL!private!testing! !
!GUIAXDllSessionManager categoriesFor: #keepAlive!idling!public! !
!GUIAXDllSessionManager categoriesFor:
#openConsoleStreams!operations!private! !

!GUIAXDllSessionManager class methodsFor!

icon
 "Answers an Icon that can be used to represent this class"

 ^Icon fromId: 154 in: ShellLibrary default!

imageExtension
 "Answer the suffix for an executable image file"

 ^'dll'! !
!GUIAXDllSessionManager class categoriesFor:
#icon!constants!development!must strip!public! !
!GUIAXDllSessionManager class categoriesFor:
#imageExtension!constants!public! !


Reply | Threaded
Open this post in threaded view
|

Re: Problem loading deployed in-process app

Bill Schwab-2
Don, Blair,

> In case anyone is curious (or silly) enough to try this, I've included the
> contents of a .CLS file for GUIAXDllSessionManager, a subclass of
> RuntimeSessionManager that you can use for DLL's that use the windowing
> system.

I ran into this one early on too.  The project seems to have gone away (it
did so even before we figured out what was wrong), but the same thing will
no doubt arise again.  My vote would be to include something like this in
the DLL deployment kit.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Problem loading deployed in-process app

Blair McGlashan
"Bill Schwab" <[hidden email]> wrote in message
news:aj0k30$17nhpl$[hidden email]...
> Don, Blair,
>
> > In case anyone is curious (or silly) enough to try this, I've included
the
> > contents of a .CLS file for GUIAXDllSessionManager, a subclass of
> > RuntimeSessionManager that you can use for DLL's that use the windowing
> > system.
>
> I ran into this one early on too.  The project seems to have gone away (it
> did so even before we figured out what was wrong), but the same thing will
> no doubt arise again.  My vote would be to include something like this in
> the DLL deployment kit.

I think that is a reasonable suggestion. When DLL deployment was designed we
didn't think it likely (given that Dolphin Active-X DLLs are non-visual in
the Active-X control sense) that GUI support would be needed. Of course this
just goes to show that library designers can never predict how a library
will actually be used!

Regards

Blair