Deployment problem

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

Deployment problem

Ian Bartholomew-3
I wanted to make some changes to the way  my packages update the menus of
existing tools, but the changes have started causing some problems. I
migrated the same technique back to D4 and it works correctly. I am not sure
what I am doing is 100% legal but I've reduced it to the following example
for comments...

PackageA -
    Contains 2 classes. A Shell subclass that has no code, just a view with
an embedded static text and a SessionManager subclass to start it up

PackageB -
    Contains 1 class with one class side #initialize method that is
evaluated when the package is loaded.

initialize
    | ri view |
    super initialize.
    ri := ResourceIdentifier class: ClassBrowserShell name: 'Default view'.
    view := ri load.
    ri save: view

If I install PackageA and then deploy it then all works as expected.

If I install PackageB followed by PackageA and deploy PackageA then the
executable  fails when run. I get an runtime error dialog about failing to
create a window, then my shell opens correctly. When I close the shell I get
a series of errors about ReferenceViews being unable to load toolbars.

I'm a bit lost now. It looks like there is a ClassBrowserShell view resource
reference retained somewhere and the deployed app is trying to open it but I
can't see where.  Should the above work in D5?

BTW. If you do try to run the executable then answer OK to the error prompts
rather than Cancel. Pressing Cancel results in a visit to the TaskManager to
get rid of the running application.

Regards
    Ian













begin 666 TestB.pac
M(D5V86QU871E(@T*?"!P86-K86=E('P-"G!A8VMA9V4@.CT@4&%C:V%G92!N
M86UE.B G5&5S=$(G+@T*<&%C:V%G92!P87A697)S:6]N.B P.PT*"6)A<VEC
M0V]M;65N=#H@)R<N#0H-"G!A8VMA9V4@8F%S:6-086-K86=E5F5R<VEO;CH@
M)R<N#0H-"B)!9&0@=&AE('!A8VMA9V4@<V-R:7!T<R(-"@T*(D%D9"!T:&4@
M8VQA<W,@;F%M97,L(&QO;W-E(&UE=&AO9"!N86UE<RP@9VQO8F%L(&YA;65S
M+"!R97-O=7)C92!N86UE<R(-"G!A8VMA9V4@8VQA<W-.86UE<PT*"6%D9#H@
M(U1E<W1".PT*"7EO=7)S96QF+@T*#0HB3F]N+7-O=7)C92!';&]B86P@3F%M
M97,B#0IP86-K86=E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P,# U-#8U-S,W-#0Q,D4V
M-3<X-C4T13 R,$0P,# Q,# P,# P-3,U-#0R-#,V0S8Q-S,W,S4P-S(V1C<X
M-SDP,# P,# P,#@P,# P,# P-S(P,# P,# P-S P,# P,#4T-C4W,S<T-#$U
M,S1$149"-S U,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P
M,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P
M,"<I+@T*(D%D9"!T:&4@<&%C:V%G92!S8W)I<'1S(@T*#0HB061D('1H92!C
M;&%S<R!N86UE<RP@;&]O<V4@;65T:&]D(&YA;65S+"!G;&]B86P@;F%M97,L
M(')E<V]U<F-E(&YA;65S(@T*<&%C:V%G92!C;&%S<TYA;65S#0H)861D.B C
M5&5S=$$[#0H)861D.B C5&5S=$%333L-"@EY;W5R<V5L9BX-"@T*(DYO;BUS
M;W5R8V4@1VQO8F%L($YA;65S(@T*<&%C:V%G92!B:6YA<GE';&]B86Q.86UE
M<SH@*%-E="!N97<-"@EY;W5R<V5L9BDN#0H-"G!A8VMA9V4@9VQO8F%L06QI
M87-E<SH@*%-E="!N97<-"@EY;W5R<V5L9BDN#0H-"B)297-O=7)C92!.86UE
M<R(-"G!A8VMA9V4@86QL4F5S;W5R8V5.86UE<SH@*%-E="!N97<-"@EA9&0Z
M("-497-T02 M/B G1&5F875L="!V:65W)SL-"@EY;W5R<V5L9BDN#0H-"B)!
M9&0@=&AE('!R97)E<75I<VET92!N86UE<R(-"G!A8VMA9V4@<V5T4')E<F5Q
M=6ES:71E<SH@*$ED96YT:71Y4V5T(&YE=PT*"6%D9#H@)T1O;'!H:6XG.PT*
M"6%D9#H@)T1O;'!H:6X@3590($)A<V4G.PT*"6%D9#H@)T1O;'!H:6X@5'EP
M92!#;VYV97)T97)S)SL-"@EY;W5R<V5L9BDN#0H-"G!A8VMA9V4A#0H-"B)#
M;&%S<R!$969I;FET:6]N<R(A#0H-"E-H96QL('-U8F-L87-S.B C5&5S=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,3<R-SE#,C P
M,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P
M,# P,# P,# Q,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P
M,# P,3 P,# P,# P,# P,# P,# P,# P,# P-C Q,$8P,#1$-C4W,S<S-C$V
M-S8U-3,V-3<Q-S4V-39%-C,V-3 P,# P,# P,$4P,C$R,# U,S4T-#(T,S9&
M-D,V0S8U-C,W-#8Y-D8V134P-S(V1C<X-SDP,# P,# P,#=!,# P,# P,# P
M,# P,# R,# Q,# P,#DR,# P,# P,3$P,# P,# T1C<R-C0V-3<R-C4V-#0S
M-D8V0S9#-C4V,S<T-CDV1C9%0S(P,# P,# P,C P,# P,# V,#,P0C P-$0V
M-3<S-S,V,38W-C4U,S8U-D4V-# P,# P,# P,$4P,3!%,# U,S4T-#(U,S<Y
M-D0V,C9&-D,U,#<R-D8W.#<Y,# P,# P,# Y,C P,# P,#$P,# P,# P-C,W
M,C8U-C$W-#8U-#$W-#-!-C4W.#<T-C4V13<T,T%#,C P,# P,# R,# P,# P
M,#8P,C U,# U,#9&-CDV13<T,# P,# P,# P0C P,# P,#!",# P,# P,C(P
M,C P,# P,# P,# P,$$S,#0P,# P0S<P,3 P,# V,# P,# P,$,R,#$P,# P
M,# P,# P,#!%03 Q,# P,# P,# P,# P.3(P,# P,# P.# P,# P,#9$-C4V
M13<U-#(V,3<R,T%#,C P,# P,# Q,# P,# P,# P,# P,# V,# P,# P,# V
M,#$P1C P-3<T.31%-#0T1C4W-3 T0S0Q-#,T-31$-#4T134T,# P,# P,# S
M-C P,#DP,#0R-SDW-#8U-#$W,C<R-C$W.3)#,# P,# P,D,P,# P,# P,# P
M,# P,# P,# P,# P1D9&1D9&1D9&1D9&1D9&1D9&1D9&1D9&1D9&1D9&1D8P
M-3 P,# P,# U,# P,# P-38P,C P,#!%.# P,# P,#=!,#$P,# P,# P,# P
M,# Y,# Q,# P,$,R,# P,# P,#$P,# P,# U03 P,# P,# P,# P,# P-T$P
M,# P,# P,# P,# P,$$P,# P,# P.3(P,# P,# P03 P,# P,#4S-S0V,3<T
M-CDV,S4T-C4W.#<T0S(P,# P,# Q,# P,# P,# P,# P,# P-C P,# P,#!#
M,C P,# P,# R,# P,# P,S8P,#!#,# T0S8Q-S(V-S8U-#DV13<T-C4V-S8U
M-S(P-# P,# P,# P,#$P,#0T,#$P,# P,#!&,# R,# P,# P,# P,# P,# P
M,# P,# P,# P,# P,# W,# P,# P,# P,# P,# P,# P,# P,# P,# P,# P
M1C P,C P,# P,# P,# P,#0R,#,P,# P,#0P,# P,#!&148S1#4W-S V,#(P
M1# P-$4W-39#-D,T,S9&-D4W-C8U-S(W-#8U-S(P,# P,# P,# P,# P,# P
M,# P,# P,# P,# P,# P,#4R,#$P,# P,# P,# P,# W03 Q,# P,# P,# P
M,# P.3 P,3 P,#!#,C P,# P,# R,# P,# P0S(P,3 P,# P,# P,# P,$8P
M,#$P,# P0S(P,# P,# P,C P,# P,#(R,#(P,# P,# P,# P,# X.3 Q,# P
M,#9&,# P,# P,C(P,C P,# P,# P,# P,$8Q,# P,# P,S,P,# P,#!&,# R
M,# P,$,R,#$P,# P,# P,# P,#!%03 Q,# P,# P,# P,# P.3(P,# P,# P
M-3 P,# P,#<T-C4W.#<T,T%#,C P,# P,# Q,# P,# P.3(P,# P,# P-3 P
M,# P,#0X-C4V0S9#-D9&,# R,# P,#DR,#(P,# P,# P,# P,#!",C R,# P
M,#)#,# P,# P,D,P,# P,# P,# P,# P,# Q,# P,# P1D9&1D9&1D9&1D9&
M1D9&1D9&1D9&1D9&1D9&1D9&1D9#-# P,# P,#,W,# P,# P,T,P,3 P,# U
M,# P,# P,#=!,#$P,# P,# P,# P,# Y,# Q,# P,#0P,#$P,# P,C(P,C P
M,# P,# P,# P,$,Q,# P,# P0S$P,# P,# P,# P,# P,#$S,# P,# P.# P
M-# P,# P,# P,# P,#$U,# P,# P-#8P-3 T,# P,S P,# P,#0Y-C,V1C9%
M,# P,# P,# P,# P,# P,#$P,# P,# P,$4P,C$Q,# U,S4T-#(U,S8Y-D4V
M-S9#-C4W-#9&-D4U,#<R-D8W.#<Y,# P,# P,# T13 R,$0P,# Q,# P,# P
M-3,U-#0R-#,V0S8Q-S,W,S4P-S(V1C<X-SDP,# P,# P,#,V,# P-C P-3,W
M-#<R-CDV138W,#<P,# P,# T-#9&-D,W,#8X-CDV13$R,#$P,# P,3@P,# P
M,# T.39$-C$V-S8U-3(V-39#-C$W-#8Y-S8V-30V-CDV0S8U-$,V1C8S-C$W
M-#9&-S(P13 Q,$4P,#4S-30T,C4S-SDV1#8R-D8V0S4P-S(V1C<X-SDP,# P
M,# P,#$R,#$P,# P,#<P,# P,# V,S<U-S(W,C8U-D4W-#$R,#$P,# P,$0P
M,# P,# U,S8X-C4V0S9#-38V.38U-S<R138Y-C,V1C!%,#(Q1C P-3,U-#0R
M-#4W.#<T-C4W,C9%-C$V0S4R-C4W,S9&-S4W,C8S-C4T0S8Y-C(W,C8Q-S(W
M.34P-S(V1C<X-SDP,# P,# P,#$R,#$P,# P,3 P,# P,# V-#9&-D,W,#8X
F-CDV138T-S(S,#,P,S4R138T-D,V0S P,# P,# P)RDI(0T*#0H`
`
end


Reply | Threaded
Open this post in threaded view
|

Re: Deployment problem

Blair McGlashan
Ian

You wrote in message news:[hidden email]...
> I wanted to make some changes to the way  my packages update the menus of
> existing tools, but the changes have started causing some problems. I
> migrated the same technique back to D4 and it works correctly. I am not
sure
> what I am doing is 100% legal but I've reduced it to the following example
> for comments...
>
> PackageA -
>     Contains 2 classes. A Shell subclass that has no code, just a view
with

> an embedded static text and a SessionManager subclass to start it up
>
> PackageB -
>     Contains 1 class with one class side #initialize method that is
> evaluated when the package is loaded.
>
> initialize
>     | ri view |
>     super initialize.
>     ri := ResourceIdentifier class: ClassBrowserShell name: 'Default
view'.
>     view := ri load.
>     ri save: view
>
> If I install PackageA and then deploy it then all works as expected.
>
> If I install PackageB followed by PackageA and deploy PackageA then the
> executable  fails when run. I get an runtime error dialog about failing to
> create a window, then my shell opens correctly. When I close the shell I
get
> a series of errors about ReferenceViews being unable to load toolbars.
>
> I'm a bit lost now. It looks like there is a ClassBrowserShell view
resource
> reference retained somewhere and the deployed app is trying to open it but
I
> can't see where.  Should the above work in D5?

I'm not sure. One comment I have is that generally speaking it isn't safe to
supersend #initialize on the class side, but that would depend on where in
the hierarchy PackageB's class is (I haven't looked yet).

It isn't clear to me why your PackageB should be failing to uninstall
cleanly, at least not yet. I suspect, though, that the load operation you
are doing is creating a hidden window that is still around when you deploy
the package. Does doing a panic before deployment help?

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Deployment problem

Ian Bartholomew-3
Blair,

> I'm not sure. One comment I have is that generally speaking it isn't safe
to
> supersend #initialize on the class side, but that would depend on where in
> the hierarchy PackageB's class is (I haven't looked yet).

I hadn't appreciated that about class side initialize, thanks (the supersend
just comes naturally). It was an Object subclass so it shouldn't, and
didn't, make a difference. Initially I had it as a normal class method
called from a package script and that did the same.

> It isn't clear to me why your PackageB should be failing to uninstall
> cleanly, at least not yet. I suspect, though, that the load operation you
> are doing is creating a hidden window that is still around when you deploy
> the package. Does doing a panic before deployment help?

Yes. The application runs fine if I do a panic beforehand. I'll try
reconstructing my working image later but I imagine it will solve the
problem there as well.

Regards
    Ian


Reply | Threaded
Open this post in threaded view
|

Re: Deployment problem

Ian Bartholomew-3
In reply to this post by Blair McGlashan
Blair,

> It isn't clear to me why your PackageB should be failing to uninstall
> cleanly, at least not yet. I suspect, though, that the load operation you
> are doing is creating a hidden window that is still around when you deploy
> the package. Does doing a panic before deployment help?

You were correct about the hidden ShellViews hanging around so I checked
back in D4. That does the same thing but the deployment process seems to
strip the zombies out so they don't cause the runtime errors. This doesn't
seem to occur in D5 and might cause a problem, in more general use, when
deploying from a used image that could contain "normal" zombies.

FWIW, I solved my original problem quite easily by doing a "view destroy"
after I had finished updating the resource.

Regards
    Ian