Deployment Problem (Spray? maybe)

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

Deployment Problem (Spray? maybe)

Andi Thomas
I've built my first D5 Web Services client application (thanks ) and thought
I'd package it up so I can show it off to friends and lovers.

Sadly, although it appears to package OK - nothing unusual in the log and
Lagoon gives a nice message and exits cleanly - double clicking on the .exe
does nothing.  A very brief appearance of a busy cursor and then nothing.
I'm on Win2K and looking in the task manager there's no hidden process or
application running.  It just seems to do nothing.

My subclass of RuntimeSessionManager has a very simple #main method,
something like:

"MyShellClass showOn: MyModelClass new"
------------------------------------

While I was typing this I thought I'd try an easier example.  A new subclass
of RuntimeSessionManager with a main method thus:  "MessageBox notify: 'It
worked' "

This does the same thing (ie: nothing), so I feel now like I'm missing
something very, very obvious and I'm going to slap myself hard when I find
out what it is.

Any clues, pointers, tips, new swear words...?
TIA, - Andi



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.362 / Virus Database: 199 - Release Date: 07-May-2002


Reply | Threaded
Open this post in threaded view
|

Re: Deployment Problem (Update)

Andi Thomas
Its even more confusing.  I'm packaged the Calculator and Hello World MVP
samples and they work very nicely thank you.  I'm at a loss as to why my
simple message box example doesn't?

"Andi Thomas" <[hidden email]> wrote in message
news:adhchs$10uob2$[hidden email]...
> I've built my first D5 Web Services client application (thanks ) and
thought
> I'd package it up so I can show it off to friends and lovers.
>
> Sadly, although it appears to package OK - nothing unusual in the log and
> Lagoon gives a nice message and exits cleanly - double clicking on the
.exe

> does nothing.  A very brief appearance of a busy cursor and then nothing.
> I'm on Win2K and looking in the task manager there's no hidden process or
> application running.  It just seems to do nothing.
>
> My subclass of RuntimeSessionManager has a very simple #main method,
> something like:
>
> "MyShellClass showOn: MyModelClass new"
> ------------------------------------
>
> While I was typing this I thought I'd try an easier example.  A new
subclass

> of RuntimeSessionManager with a main method thus:  "MessageBox notify: 'It
> worked' "
>
> This does the same thing (ie: nothing), so I feel now like I'm missing
> something very, very obvious and I'm going to slap myself hard when I find
> out what it is.
>
> Any clues, pointers, tips, new swear words...?
> TIA, - Andi
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.362 / Virus Database: 199 - Release Date: 07-May-2002
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.362 / Virus Database: 199 - Release Date: 07-May-2002


Reply | Threaded
Open this post in threaded view
|

Re: Deployment Problem (Update)

Ian Bartholomew-13
Andi,

> Its even more confusing.  I'm packaged the Calculator and Hello World MVP
> samples and they work very nicely thank you.  I'm at a loss as to why my
> simple message box example doesn't?

The MessageBox issue is known about. See the following extract from the
archive, it's part of a previous question and a reply from Blair.

=~=~=~=~=
> I was having a problem with running my deployed app which seems to be
> caused by displaying a MessageBox before the main app shell is opened.
> It can be replicated with other deployed apps.
> ...

This is a known issue: If you are going to open a message box before any
other windows during Dolphin's startup processing, then you must make it
#taskModal. If you don't then the "startup" process is suspended when the
message box is opened. This will allow the background idle loop to notice
that there are no windows open (the MessageBox is not considered to be a
Dolphin window). What happens next is the responsibility of the installed
SessionManager (more precisely its #keepAlive method), but the default
behaviour is to initiate system shutdown because there are no windows open.

To avoid this happenning, either:
a) Use a task modal MessageBox (e.g. MessageBox new taskModal; notify:
'Hello'); or
b) ensure that your MessageBox is opened after the shell window; or
c) override #keepAlive.

If you override #keepAlive to do nothing (for example), then you will need
to explicitly initiate system shutdown, for example when your main shell
window is closed. Obviously the easiest thing to do is to use a task modal
message box.

You should also avoid using a message box which is not task modal on system
shutdown (e.g. to prompt the user as to whether they really want to shut
down), as this may also cause problems.
=~=~=~=~=

It doesn't help much with your original problem though.  Assuming you are
just using a normal Shell (i.e. point (c) in Blair's comments above aren't
applicable) then it sounds like a case of the stripper removing more than it
should.  You would either need to either generate a stripper log and see if
you can spot the problem or turn off all the stripping options and the
reintroduce them one at a time

One other faint possibility, and I only mention it as I haven't tried it
before, is the use of #showOn in the SessionManager. I have always used
#show, and provided the model in a Shell class side #defautModel method.

Check that there isn't an "errors" file being created in the same folder as
the app. I've had similar problems before, spent some time trying to track
it down and the discovered that Dolphin had been telling me the problem all
along.

If that doesn't work then you might have to resort to strategically placed
#outputDebugString's in the application. I don't know what is currently
considered the best way to display the generated strings though.

Regards
    Ian


Reply | Threaded
Open this post in threaded view
|

Re: Deployment Problem (Update)

Steve Alan Waring
In reply to this post by Andi Thomas
Hi Andi,

Opening a MessageBox in a SessionManager can be troublesome because the
system can not find any open windows, and takes this as an indication that
it should quit.

You can use something like:

  MySessionManager>>main

    (MessageBox new)
      taskModal;
      notify: 'It worked'.
    "TextPresenter showOn: 'Made it!'"

This will show the MessageBox, and if you uncomment the last line, it will
also open the TextPresenter as expected.

If your Spray client is trying to show a MessageBox before opening a view,
this would be the reason that it is failing to open.

If this isnt the problem, please feel free to email me the package and I
will take a look.

Thanks,
Steve
[hidden email]
http://www.dolphinharbor.org


Reply | Threaded
Open this post in threaded view
|

Re: Deployment Problem (Update)

Andi Thomas
In reply to this post by Ian Bartholomew-13
Immense thanks to both Ian and Steve.
It would appear that the problem was my use of a dialog in my view rather
than a shell.

Changed the view and now everything is just dandy.

My first painful, learning experience with deploying a GUI app (only been
doing headless console stuff 'til now).

- Andi


"Ian Bartholomew" <[hidden email]> wrote in message
news:14ZK8.4126$VP6.371105@stones...
> Andi,
>
> > Its even more confusing.  I'm packaged the Calculator and Hello World
MVP

> > samples and they work very nicely thank you.  I'm at a loss as to why my
> > simple message box example doesn't?
>
> The MessageBox issue is known about. See the following extract from the
> archive, it's part of a previous question and a reply from Blair.
>
> =~=~=~=~=
> > I was having a problem with running my deployed app which seems to be
> > caused by displaying a MessageBox before the main app shell is opened.
> > It can be replicated with other deployed apps.
> > ...
>
> This is a known issue: If you are going to open a message box before any
> other windows during Dolphin's startup processing, then you must make it
> #taskModal. If you don't then the "startup" process is suspended when the
> message box is opened. This will allow the background idle loop to notice
> that there are no windows open (the MessageBox is not considered to be a
> Dolphin window). What happens next is the responsibility of the installed
> SessionManager (more precisely its #keepAlive method), but the default
> behaviour is to initiate system shutdown because there are no windows
open.

>
> To avoid this happenning, either:
> a) Use a task modal MessageBox (e.g. MessageBox new taskModal; notify:
> 'Hello'); or
> b) ensure that your MessageBox is opened after the shell window; or
> c) override #keepAlive.
>
> If you override #keepAlive to do nothing (for example), then you will need
> to explicitly initiate system shutdown, for example when your main shell
> window is closed. Obviously the easiest thing to do is to use a task modal
> message box.
>
> You should also avoid using a message box which is not task modal on
system
> shutdown (e.g. to prompt the user as to whether they really want to shut
> down), as this may also cause problems.
> =~=~=~=~=
>
> It doesn't help much with your original problem though.  Assuming you are
> just using a normal Shell (i.e. point (c) in Blair's comments above aren't
> applicable) then it sounds like a case of the stripper removing more than
it
> should.  You would either need to either generate a stripper log and see
if
> you can spot the problem or turn off all the stripping options and the
> reintroduce them one at a time
>
> One other faint possibility, and I only mention it as I haven't tried it
> before, is the use of #showOn in the SessionManager. I have always used
> #show, and provided the model in a Shell class side #defautModel method.
>
> Check that there isn't an "errors" file being created in the same folder
as
> the app. I've had similar problems before, spent some time trying to track
> it down and the discovered that Dolphin had been telling me the problem
all

> along.
>
> If that doesn't work then you might have to resort to strategically placed
> #outputDebugString's in the application. I don't know what is currently
> considered the best way to display the generated strings though.
>
> Regards
>     Ian
>
>
>
>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.362 / Virus Database: 199 - Release Date: 07-May-2002


Reply | Threaded
Open this post in threaded view
|

Re: Deployment Problem (Socket error now)

Andi Thomas
In reply to this post by Andi Thomas
Well I've now moved onto a new problem.  In development it all works just
fine, but when deployed I get an unknown socket error.  Partial Stack dump
follows.

Prerequisites look ok (to my untrained eye) and there doesn't seem to be
anything missing in the stripper log.

Sorry to sound like a cluts(sp?) but you guys are just tooo helpful..!

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

06:49:34, 04-Jun-2002: Windows Socket error 10093: unknown error

*----> VM Context <----*
Process: {071A0004:suspended frame 071A0329, priority 5, callbacks 0
last failure 7143430:nil, FPE mask 3, thread nil}
Active Method: RuntimeSessionManager>>logError:
IP: 06F8DDDF (15)
SP: 071A03E0
BP: 071A03B8 (221)
ActiveFrame: {071A03BC: cf 071A03A1, sp 071A03D0, bp 071A03B8, ip 5,
SicsCreateNewBusinessFromTemplateSessionManager(RuntimeSessionManager)>>logE
rror:}

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

*----> Stack <----*
[071A03E0: 231]-->50
[071A03DC: 230]-->60
[071A03D8: 229]-->nil
[071A03D4: 228]-->'Windows Socket error 10093: unknown error'
[071A03D0: 227]-->a VMLibrary
[071A03CC: 226]-->59572700
[071A03C8: 225]-->RuntimeSessionManager>>logError:
[071A03C4: 224]-->59572712
[071A03C0: 223]-->8
[071A03BC: 222]-->59572688
[071A03B8: 221]-->a SocketError




"Andi Thomas" <[hidden email]> wrote in message
news:adhdkh$10rmtd$[hidden email]...

> Its even more confusing.  I'm packaged the Calculator and Hello World MVP
> samples and they work very nicely thank you.  I'm at a loss as to why my
> simple message box example doesn't?
>
> "Andi Thomas" <[hidden email]> wrote in message
> news:adhchs$10uob2$[hidden email]...
> > I've built my first D5 Web Services client application (thanks ) and
> thought
> > I'd package it up so I can show it off to friends and lovers.
> >
> > Sadly, although it appears to package OK - nothing unusual in the log
and
> > Lagoon gives a nice message and exits cleanly - double clicking on the
> .exe
> > does nothing.  A very brief appearance of a busy cursor and then
nothing.
> > I'm on Win2K and looking in the task manager there's no hidden process
or

> > application running.  It just seems to do nothing.
> >
> > My subclass of RuntimeSessionManager has a very simple #main method,
> > something like:
> >
> > "MyShellClass showOn: MyModelClass new"
> > ------------------------------------
> >
> > While I was typing this I thought I'd try an easier example.  A new
> subclass
> > of RuntimeSessionManager with a main method thus:  "MessageBox notify:
'It
> > worked' "
> >
> > This does the same thing (ie: nothing), so I feel now like I'm missing
> > something very, very obvious and I'm going to slap myself hard when I
find

> > out what it is.
> >
> > Any clues, pointers, tips, new swear words...?
> > TIA, - Andi
> >
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.362 / Virus Database: 199 - Release Date: 07-May-2002
> >
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.362 / Virus Database: 199 - Release Date: 07-May-2002
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.362 / Virus Database: 199 - Release Date: 07-May-2002


Reply | Threaded
Open this post in threaded view
|

Re: Deployment Problem (Socket error now)

Steve Alan Waring
Hi Andi,

> 06:49:34, 04-Jun-2002: Windows Socket error 10093: unknown error

>From MSDN:

| WSANOTINITIALISED (10093)
| Successful WSAStartup not yet performed.
| Either the application has not called WSAStartup or WSAStartup
| failed. The application may be accessing a socket that the current
| active task does not own (that is, trying to share a socket between
| tasks), or WSACleanup has been called too many times.

Dolphin calls WSAStartup very early in its startup procedure, and I think it
is unlikely that you are using a Socket before this happens.

A couple of thoughts:

Does the image you are deploying from have any instances of Socket or
ServerSocket? If so, what is using them?

Do you get the same error if you install the packages into a fresh image and
deploy?

Do you register for the #sessionStarted event to do some kind of
initialization which involves sockets? It might be possible that your code
is using a socket saved into an image before the startUp procedure makes it
invalid.

If this doesnt help, can you email me the full error dump report.
Thanks,
Steve
[hidden email]
http://www.dolphinharbor.org