cannot start demo

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
Maurizio
Posts: 52
Joined: Mon Jul 28, 2003 3:06 pm
Location: Italy

cannot start demo

Post by Maurizio »

I cannot start amy demo in newlist edit/gui server.
As I load a demo file and I click on the start button
a window appears saying :

The running NEWLISP process must first finish.

Same thing as I try to close the program.

To close it I have to kill it from task manager.

Any suggestion ?
Regards
Maurizio

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Close all newlisp processes and Java processes from the task manager then start the editor again. Double click the Icon only once, allthough no hour-glass cursor is appearing.

Lutz

ps: what version of Windows are you running?

Maurizio
Posts: 52
Joined: Mon Jul 28, 2003 3:06 pm
Location: Italy

Post by Maurizio »

I just rebooted my system and retried to load a demo.
As i click on the start button, on the lower window
appears the --- busy --- message, then appears the popup.
As I close the popup, on the lower window appears
"check"

If I try to close the program, another popup says :

Cannot quit, because other NewLISP process must exit first.

The only way to close the program is to kill java.

I have windows 2000 sp4, regulary auto-updated,
jdk1.6.0_02 and
jre1.6.0_02.

Regards
Maurizio

Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Post by Jeff »

I often get the same error on OSX when running the editor. If I execute something in the interpreter, even something as trivial as (println "Hello world"), I cannot then quit the program using the internal quit function; it can be terminated by terminating Java, though.
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Maurizio and Jeff, this was a complex area in the editor to code and if this still does not work on some machines I need your help. First let me explain how the whole thing works:

The editor starts a secondary newLISP process to evaluate code from the editor windows. The idea is, to keep this process running for immedeate evaluation of statements written into the edit window and without losing state. This way you can edit something, delete the edit and monitor window, but still have the auxiliary newLISP process on. I am trying to simulate a console session, which doesn't lose state until you exit.

When running a demo app (from the Help/Demo menu), these programs exit and leave the led in red whe quitting them, telling that the auxiliary process is down. A subsequent evaluation then starts it automatically or the restart button can be pressed.

Whenever starting an evaluation, the editor checks if the auxiliary process is on or off and restarts it if required. If the process is on it checks if it is busy or if a new eval can be started, else a warning box pops up.

The editor cannot exit if the auxiliary process hasn't exited. This is why the editor pops up a message box, asking to close other apps.

If I understand both of you well, in your case the editor doesn't exit allthough nothing is running. The only explanation I have is, that the editor for some reason could not start the auxilary newLISP process and now it assumes it's busy becuase it cannot talk to it.

On all of the systems I can check, (MacMini G4 PPC, MacBook Intel dual Core 2, older 1.8Ghz Windows XP Home PC/Celereon and a recent low end Dell XP/Home laptop PC) all this is stable and I observe what you are seeing only once in a hundred evaluations. So I believe that something special is going on in case of your Mac and PC:

My questions would be this:

(1) After starting the editor, do you see the led green?

(2) If not, can you get it green hitting the restart button?

(3) On Mac OS X, after starting the editor you should have 3 newlisp processes running (one of them very small in memory consumption) and one Java process. On Mac OSX the Java process should carry the newLISP icon in the Applications/Utilties Monito app.

On Win32 you should see 2 newLISP processes in the Taskmanager and 1 Java process.

(4) Can you exit the editor right after opening it (not evaluating anything)?

(5) In case of Maurizio's machine, where (if I understand well) it never has worked, could that be some firewall settings? The auxiliary newLISP process opens port 64002 (search for auxPort in newlisp-edit.lsp)

(6) Jeff, what kind of Mac and OS version are you exactly running?

The evaluation feature is the core feature of the whole editor app, and we have to get this stable. I also would like to get a feel of how many systems have this problem, who running fine on Mac or Win32 and who is not?

Lutz

Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Post by Jeff »

Lutz,

When starting the editor, the led is green. Immediately after the editor loads, here is the relevant process list:

D2ONL10051M:~ jober$ pstree | grep newlisp
| | | \-+- 19141 jober /usr/bin/newlisp /usr/bin/newlisp-edit
| | | |-+- 19142 jober /usr/bin/newlisp /usr/bin/newlisp-edit
| | | | \--- 19143 jober java -jar /usr/share/newlisp/guiserver.jar 47011
| | | \-+- 19144 jober /usr/bin/newlisp /usr/bin/newlisp-edit
| | | \--- 19145 jober newlisp -c -p 64002 -w /Users/jober
| | \--- 19230 jober grep newlisp

I attempted to print hello world after starting up and got the error message. I restarted the auxiliary process and was able to run it. I was then able to quit without problem.

I closed and started again, ran the single println command without error right away, and was then unable to quit.

Putting (exit) at the end of the program seemed to work, though :)

The system I used above is a PowerMac quad-core (each processor at at about 2.6ghz) running the osx 10.4 with all of the latest updates, around 4 gigs of ram, 300 gb hd, fancy rims and flames printed on the sides. It's running the latest devel snapshot available from the download site, made using darwin_utf8.
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

You seem to start newlisp-edit.lsp from a shell window, because I am seeing 4 newlisp processes, but that is Ok and shouldn't matter. But just to try it, can you start the editor from the icon tin the applications folder? and will it behave the same?

In order to have the icon in the appfolder you have to install from the binary installer. The newlisp binary it installs, is also a darwin_utf8, but you always can do a 'sudo make install' over that if required. The Applications/newLISP-GUI.app calls /usr/bin/newlisp-edit and /usr/share/newlisp/guiserver.jar both are also installed when you do a 'sudo make install'.

Lutz

ps: starting from the app icon starts java first then the newlisp-edit process second, perhaps that will make a difference.

Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Post by Jeff »

Same results again with the .app, and here is the process list:

D2ONL10051M:~ jober$ pstree | grep newlisp
| | \--- 27650 jober grep newlisp
| \-+- 27646 jober /usr/bin/newlisp /usr/bin/newlisp-edit 47011 javastart &
| \-+- 27647 jober /usr/bin/newlisp /usr/bin/newlisp-edit 47011 javastart
| \--- 27648 jober newlisp -c -p 64002 -w /Users/jober
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

I ran the /Applications/newLISP-GUI app for the first time tonight (double-clicking), and I got that error first time. It happens occasionally now: when I open up the application, there's an Untitled tab, then I open another file in another tab and try to run it - I get that error "The running newLISP process must finish first". Can't see a pattern to it, though.

Is there a way to stop a script running inside a tab, by the way? I'm killing off the processes in terminal to get back to 0...

iMac core duo/10.4.10/no flames on the side, just a little remote control...

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

answers to the following questions, may help me to pin this problem down:

- what the color has the little led dot before and after you hit the run button?

- what kind of app are you running, one of the demo apps?

- after getting the "stop other first" message can you recover hitting run again?

Lutz

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

I posted a "newlisp-edit-debug.lsp" with changed logic and debugging output in the development directory to try on either Mac OS X or Windows machines which had difficulties running programs out of the the editor:

http://newlisp.org/downloads/developmen ... -debug.lsp

This version produces diagnostic output in the monitor area. Follow these steps:

(1) start newlisp-edit-debug.lsp from the command line

(2) load button-demo.lsp

(3) hit the run button (demo should come up)

(4) hit the run button again (should put message box and leave led yellow)

(5) try to quit the editor (from the file menu, should put busy box and leave led yellow)

(6) close button demo (should close demo, led should be red now)

(7) exit the editor

If anything doesn't work as written here send me the log in the monitor output area.

If this version fixes your problems let me know too! You can then out-comment line 5 in newlisp-edit-demo.lsp, to get rid of the debugging output and use.

Thanks

Lutz

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

It works as you describe! Perhaps the messages could be enhanced some time "can't start running 'file.lsp' because another process 'untitled.lsp' is running in another tab ...'

Still wondering whether it might be good to have a way to stop execution of a program?

Maurizio
Posts: 52
Joined: Mon Jul 28, 2003 3:06 pm
Location: Italy

Post by Maurizio »

This is the sequence of events :
I start NewLisp from a desktop link

The gui appears, the little led dot is green,
the bottom windows is empty, Task Manager reports two instances of NewLisp and one of Java.

1)
I click on the close button of the window.
The little led dot goes yellow, a popup box appears saying
"Cannot quit because other NewLisp process must exit first."
Task Manager reports two instances o NewLisp and one of Java.

I close the popup.
The little led dot turns green,
on the button windows appears "check".
Task Manager reports two instances o NewLisp and one of Java.

If I try again, the sequence repeats exactly as described from point 1

Note : If I try several times, the process id of the two instances of NewLisp don't change until i kill them.
Seems that the editor process is unable to stop the secondary lisp engine.

Regards.
Maurizio.

Maurizio
Posts: 52
Joined: Mon Jul 28, 2003 3:06 pm
Location: Italy

Post by Maurizio »

I issued the previous message before reading about the debug version.
I'm now going to try it.
maurizio.

Maurizio
Posts: 52
Joined: Mon Jul 28, 2003 3:06 pm
Location: Italy

Post by Maurizio »

I'm trying now with NewLisp-edit-debug
the sequence happens exactly as before :
I start NewLisp-edit-debug :

NewLisp NewLisp-edit-debug.lsp

It shows a series of messages, the last is:
"GUI-server connected"

Then I can repeat the following sequence as long as I want :

I click on the gui close button
the led dot turns yellow
the popup appears.
on the dos console windows appears the following messages :
online -> true
busy -> true
online -> true
I close the popup
the led dot turns green.
on the bottom window appears :
"Check"
On the dos console windows nothing more appears.

I've always two running instances of NewLisp

Regards
Maurizio.

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

On my Win2K Pro SP4 german:

Code: Select all

C:\Programme\newlisp>java -version
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

C:\Programme\newlisp>

Code: Select all

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\Programme\newlisp>newlisp newlisp-edit-debug.lsp
GUI-server v.0.997
 double buffering supported.
 listening on 47011
 accepted connection from 0.0.0.0
 connecting to 0.0.0.0:47012
GUI-server connected
online -> true
busy -> nil

C:\Programme\newlisp>server shutdown
When I click on the gui close button , the 'Are you sure' dialog appears and then it shuts down. My led does not change color.
Hans-Peter

Locked