Primitive Process>>primTerminate failed (0)

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

Primitive Process>>primTerminate failed (0)

Joseph Frippiat-2
What is the meaning of this message ?

Thanks,

Joseph


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Andy Bower-3
Joseph,

> What is the meaning of this message ?

I think you may have posted enough messages on this topic already and
it may be polite just to wait for replies to come through.

Basically, Dolphin apps are not generally happy uness there is a top
level shell window (NOT a message box) opened as part of the
application. There are ways around this as mentioned in the Google link
I posted in one of your other threads on the same topic.

Actually, this link might explain things a bit better:

http://groups.google.com/group/comp.lang.smalltalk.dolphin/browse_frm/th
read/6945bc2570fe8fa/fab3491b1e9c5cfb?lnk=st&q=keepAlive+Dolphin+Smallta
lk&rnum=6#fab3491b1e9c5cfb

Regards,

--
Andy Bower
Dolphin Support
www.object-arts.com


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Joseph Frippiat-2
There is a top window.  The message box is an error message box coming
from some part of Dolphin Smalltalk, not from my application.

Thanks,

Joseph


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Blair McGlashan-3
"Joseph Frippiat" <[hidden email]> wrote in message
news:43d95252$0$29451$[hidden email]...
> There is a top window.  The message box is an error message box coming
> from some part of Dolphin Smalltalk, not from my application.
>

But you said your application did not open any windows?

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Joseph Frippiat
Blair McGlashan wrote:

> But you said your application did not open any windows?

There is one top window and the application should open it but it doesn't.

I notice this morning that it could open it: last night, after a last
try, I putted the computer in hibernation (I thought that the
application was not running) and this morning, when I wake up the
computer, my window was open and I was able to run the application normally.

I exited from the application and restarted it, this time the window
appeared after only two or three minutes.

And now it doesn't open ... Oops, I open the Windows Task Manager to
check if my exe is running and suddenly the main window appears ...

The starting sequence is the following:
        a) I double click on my exe.
        b) an error message box appears immediately with the message
    "PrimitiveProcess primTerminate failed(0)".
        c) I click on the OK button.
        d) an error log file is created.
        e) the main window appears after a random  interval of time or
            it doesn't appear.  It could also appears immediately with
            the error message box, as it just happened now.

Thanks,

Joseph


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Ian Bartholomew-21
Joseph,

> I notice this morning that it could open it: last night, after a last
> try, I putted the computer in hibernation (I thought that the
> application was not running) and this morning, when I wake up the
> computer, my window was open and I was able to run the application
> normally.
>
> I exited from the application and restarted it, this time the window
> appeared after only two or three minutes.

That's very odd, and not something I've seen mentioned before.

I would suggest going back to basic debugging techniques to get some
idea of just what is happening.  Start out my commenting out everything
but the basics, a single line in the session manager that starts up the
shell and comment out additions to any of the shell startup methods
(#onViewOpened etc).

Deploy that and see if the shell is displayed.  If it is then start
adding bits back, one at a time.

Bill's suggestion of using the trace tool from sysinternals is also a
good one.  You will have to add tracking statements to appropriate parts
of the your code but it can also help narrow things down.

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Udo Schneider
In reply to this post by Joseph Frippiat
Joseph Frippiat wrote:
> There is one top window and the application should open it but it doesn't.
How and from which method do you ope the window. How long does it take
in a development image to open the window? Is there some model
initialization or other time consuming stuff going on before the window
is opened?

You could try to open a simple Shell (Shell show) once the application
is started to check whether it's a "general" problem.

CU,

Udo


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Chris Uppal-3
In reply to this post by Joseph Frippiat
Joseph,

> I exited from the application and restarted it, this time the window
> appeared after only two or three minutes.

I'm repeating others' advice but with more emphasis.

Get a copy of DebugView and /USE/ it.  Free from:
    http://www.sysinternals.com/Utilities/DebugView.html
You are just wasting your own time if you have deployment problems and do not
use DebugView.

First off, just have it active while you try out your application.  I would not
be surprised if the Dolphin VM is sending debug messages that will make the
problem clearer immediately.

If not, or if the problem is still not clear /enough/ then do two things.

One is to use one or both of the classic debugging techniques:
a)  Add tracing[*] all over the place.  LOTs of tracing.
b)  Simplify until the problem goes away, then build up again slowly
     until you have pinpointed the problem.

The other is more abstract.  Review very carefully the way that your override
of SessionManager>>keepAlive works, and how it interacts with your
SessionManager>>main:.  What will happen if you fall off the end of your #main:
before Windows has managed to get your main window up and running ?  Search the
archives for more detail on #keepAlive.  And -- of course -- you can ask here
too.

[Andy, whether or not #keepAlive is the source of Joseph's problems, I really
think that the sample deployables should be updated.  The way they use
#keepAlive is simply wrong (even though it does work for such simple examples),
and is almost certain to cause problems for people who take them as a starting
point.]

    -- chris

[*] In case you don't know what the Trace stream is, it's an output stream
(like Transcript) which is used for recording debugging information.  In a
development image, executing:
    Trace display: "some message"; cr.
will send the message to the Transcript, but in a deployed application, doing
the same thing sends the message to the Windows debug device, where it can be
read and displayed by tools like DebugView.


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Udo Schneider
Chris Uppal wrote:
> [*] In case you don't know what the Trace stream is, it's an output stream
> (like Transcript) which is used for recording debugging information.  In a
> development image, executing:
>     Trace display: "some message"; cr.
> will send the message to the Transcript, but in a deployed application, doing
> the same thing sends the message to the Windows debug device, where it can be
> read and displayed by tools like DebugView.
There is an Dolphin Map Article documenting this:
http://www.dolphinmap.net/content/view/17/26/

CU,

Udo


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Joseph Frippiat
In reply to this post by Ian Bartholomew-21
Ian,

my application is a "sister" of your SerialChat (thank you for the good
starting point :-) ).  It's a "sister" because i first cloned it and
then I changed it to be a subclass of the Shell class.

I first made the developments with the release of Dolphin Smalltalk
(Dolphin Smalltalk 5.1 VE) distributed by the "Bitwise magazine" as I
was reluctant to install my own  licence of Dolphin X6 at work.

Because I missed all the improvements and the comfort of Dalphin X6, I
finally decided to install it at work.  I have a little concern about it
because if somebody has acces to my computer and open "My Dolphin
Account", he has access to my licence key...  It's a laptop, I bring it
every time with me at home, but who knows ?

When I loaded my application in X6, I had some problems with the Default
view.  I had to change the "arrangements" of some objects.

Today, I made another modification, I added an icon method to the class
side of the main class.  As I didn't have an icon, I simply pick the
method from the WebBrowserShell class.  The first time I tried to deploy
my application, the process didn't reach an end, I had to kill
Dolphin.exe.  The second time it succeeds to produce a working
application (wihout error message box and without starting delay) and
the third time it produces again a buggy one (with the message box and
the starting delay).  I really don't know what to do ...

I have also to find out which part of the development system my
application is distributing to try to remove it.

Thanks,

Joseph


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Joseph Frippiat
In reply to this post by Chris Uppal-3
Chris Uppal wrote:


> Get a copy of DebugView and /USE/ it.  Free from:
>     http://www.sysinternals.com/Utilities/DebugView.html
> You are just wasting your own time if you have deployment problems and do not
> use DebugView.

Here are the results:

00000000 0.00000000 [2084] WARNING: Ignored interrupt 18 to terminated
process a Process('Main' base 09070000 frame=nil)
00000001 0.00025087 [2084] Dolphin: Writing dump to 'C:\docext\Dolphin
Smalltalk X6\myPackages\KPS\Virtual Printer.ERRORS'
00000002 0.00347642 [2084] WARNING: No processes are Ready to run

Thanks,

Joseph


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Joseph Frippiat
In reply to this post by Chris Uppal-3
And also, several messages like this appeared after several minutes:

[2084] Resource library dolphindr006.dll could not be opened
('dolphindr006.dll' (16r7E: The specified module could not be found.))

Did I forget to do something manually for the installation of X6 ?

Thanks,

Joseph


Reply | Threaded
Open this post in threaded view
|

Licence key [Was: Primitive Process>>primTerminate failed (0)]

Chris Uppal-3
In reply to this post by Joseph Frippiat
Joseph Frippiat wrote:

> Because I missed all the improvements and the comfort of Dalphin X6, I
> finally decided to install it at work.  I have a little concern about it
> because if somebody has acces to my computer and open "My Dolphin
> Account", he has access to my licence key...  It's a laptop, I bring it
> every time with me at home, but who knows ?

Also, if you use that feature yourself from work then the key will show up in
your employer's network logs, since the key is part of the URL. I don't think
that's right.

I think I remember Andy saying that the "my dolphin page" stuff was intended to
be secured with HTTPS or similar.  I hope that's still the intention.

In the meantime, you could disable SmalltalkSystem>>myDolphinAccount, or even
hack it so that it only worked when you were at home.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Joseph Frippiat
In reply to this post by Udo Schneider
This is very interesting :-) .

But for my current application, I don't have very much to debug.  All
the codes are triggered with the push buttons on the main view or with
menu commands.  There is only one view.  There is not code in the
session manager except:

!VirtualprinterSessionManager methodsFor!

main
        "Start up the Virtual Printer application"

        self mainShellClass show! !

and

!VirtualprinterSessionManager class methodsFor!

mainShellClass
        "Answer the class of the application's main window (a <Shell> presenter)."

        ^VirtualPrinter! !

The application does only the following:
        - open a selected serial port with Ian IDB Serial package.
        - write a request on the selected serial port.
        - read the answer.
        - close the serial port.
        - store the answer in a text file.

The only code that is executed before the main window appear is this:

onViewOpened
        super onViewOpened.
        self beFinalizable.
        (self view viewNamed: 'status') model: (status := '  Not connected'
asValue).
        comPort
                list: self comPorts;
                selection: self comPorts first

The application runs perfectly in the development image.  And I was even
able to generate one working executable (only one).


Thanks,

Joseph


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Ian Bartholomew-21
Joseph,

Have you tried commenting out this bit and re-deploying.  It seems the
only "non-standard" bit of code and could be causing the problem.  How
does your #comPorts method get the list of available com ports?

>     comPort
>         list: self comPorts;
>         selection: self comPorts first

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Ian Bartholomew-21
I wrote:

> Have you tried commenting out this bit and re-deploying.  It seems the
> only "non-standard" bit of code and could be causing the problem.  How
> does your #comPorts method get the list of available com ports?

Ummm, never mind - I see where it comes from now :-)

I'll try deploying SerialChat and see what happens - it's not something
I recall doing before.

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Licence key [Was: Primitive Process>>primTerminate failed (0)]

Andy Bower-3
In reply to this post by Chris Uppal-3
Chris,

> Also, if you use that feature yourself from work then the key will
> show up in your employer's network logs, since the key is part of the
> URL. I don't think that's right.

Hmm.. good point that.. we'll patch it in a future release.

Best regards

--
Andy Bower
Dolphin Support
www.object-arts.com


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Schwab,Wilhelm K
In reply to this post by Joseph Frippiat
Joseph,

> Because I missed all the improvements and the comfort of Dalphin X6, I
> finally decided to install it at work.  I have a little concern about it
> because if somebody has acces to my computer and open "My Dolphin
> Account", he has access to my licence key...  It's a laptop, I bring it
> every time with me at home, but who knows ?

Use control-alt-del and then lock the computer; you will need to enter a
password to interact with it, but everything will be as you left it
after that point.  Also, consider a cable and lock if you leave the
machine unattended.


> When I loaded my application in X6, I had some problems with the Default
> view.  I had to change the "arrangements" of some objects.
>
> Today, I made another modification, I added an icon method to the class
> side of the main class.  As I didn't have an icon, I simply pick the
> method from the WebBrowserShell class.  The first time I tried to deploy
> my application, the process didn't reach an end, I had to kill
> Dolphin.exe.  The second time it succeeds to produce a working
> application (wihout error message box and without starting delay) and
> the third time it produces again a buggy one (with the message box and
> the starting delay).  I really don't know what to do ...

Just a hunch, but look at the process browser to see if you have any
deployments stuck in limbo, or (less unlikely) other processes that
should have gone away.  A healthy image, absent deliberate background
procesing, will typically have five processes (idle, finalizer, main,
weak collection cleanup, timer - from memory so beware<g>).  You might
see more than one main (the message loop) with modal dialogs.  If you
see various processes/threads that you did not create or do not intend
to be active in the deployed app, they might need to be terminated.

You might want to post what you see and wait for advice before trying to
fix it.


> I have also to find out which part of the development system my
> application is distributing to try to remove it.

You should be able to see that from the package browser prerequisites
pane.  Trace your package back to the development environment, and it
will probably become obvious.

Have a good one,

Bill


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


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Chris Uppal-3
In reply to this post by Joseph Frippiat
Joseph,

> And also, several messages like this appeared after several minutes:
>
> [2084] Resource library dolphindr006.dll could not be opened
> ('dolphindr006.dll' (16r7E: The specified module could not be found.))

That's Dolphin complaining that it can't open the DLL where the Dolphin system
icons, and whatnot, are kept.   It could well be a side-effect of you having
some dependencies on the Development System packages.

I'd guess that it's probably harmless.  One thing you could try is to copy your
deployed .exe into the Dolphin folder and see what happens if you run it from
there.  I doubt if it'll fix your problems but it shouldn't take more than a
couple of seconds to try out.

BTW, having a dependency on the dev-sys packages is sometimes a symptom of
something that's more deeply wrong.  It's usually worth tracking down exactly
/why/ you have the dependency, even if you don't take the time to fix it
straight-away.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Primitive Process>>primTerminate failed (0)

Chris Uppal-3
In reply to this post by Joseph Frippiat
Joseph,

> 00000000 0.00000000 [2084] WARNING: Ignored interrupt 18 to terminated
> process a Process('Main' base 09070000 frame=nil)
> 00000001 0.00025087 [2084] Dolphin: Writing dump to 'C:\docext\Dolphin
> Smalltalk X6\myPackages\KPS\Virtual Printer.ERRORS'
> 00000002 0.00347642 [2084] WARNING: No processes are Ready to run

Hmm.  That's not as helpful as I'd hoped :-(   It still seems that there's a
problem with idle panic -- which there shouldn't be.

I suggest adding trace statements to your #main, at least enough so that you
can see
    when it is entered
    when you start to open your shell
    when that returns
    just before #main is about to return.

And also to your shell's #onViewOpened:
    before and after the super-send of #onViewOpened:
    before and after the things you do with com ports
    just before it is about to return.

The important thing is the relative order and timing of these events (as
recorded by DebugView).

Lastly (for now).  You are deploying from a clean image aren't you ?  I can't
think why I didn't ask before.  I know that it annoys Andy when I say this, but
I still think it's good advice: /NEVER/ deploy from anything except a clean
image.

    -- chris


12