mozart / mozart2

Mozart Programming System v2
http://mozart.github.io/
BSD 2-Clause "Simplified" License
564 stars 96 forks source link

Graphics engine (tk.exe) crashed or could not be started #208

Open jaymelbe opened 10 years ago

jaymelbe commented 10 years ago

Hello,

I am trying to use Mozart2 on Linux (Ubuntu 14.04 LTS 64bits) but I am experiencing an issue with Tk. I get this: ''' Mozart Engine 2.0.0-alpha.0+build.3777.62f3ec5 (Fri, 23 Aug 2013 23:51:55 -0700) playing Oz 3

%\ Error: Tk module % %\ Graphics engine (tk.exe) crashed or could not be started % %**--------------------------------------------------------------

%**** % %\ Error: unhandled exception % %\ socketOrPipe(write 32) %**--------------------------------------------------------------

%**** % %\ Error: unhandled exception % %\ socketOrPipe(write 32) %**-------------------------------------------------------------- '''

I have installed tk and tk-dev... but the issue is still there. When trying to do {Browse 1} or use QTk. Any idea what could be wrong?

sjmackenzie commented 10 years ago

Hi @jaymelbe, seems another user recently had the same issue. @kennytm is this related to your patch? @jaymelbe did you pull the latest git version?

eregon commented 10 years ago

@sjmackenzie It might be related to my merged patch baa705de898c9edc7ce395a8be0d84086a7ae3fd. Reverting it would, instead of throwing an error, likely kill the entire process by the default action of SIGPIPE. I will try that to confirm. The cause of this error seems write on the pipe fails and I have no much idea why.

It is notably easy to reproduce by:

eregon commented 10 years ago

Indeed, the result with the reverted commit is:

%************************ Error: Tk module **********************
%**
%** Graphics engine (tk.exe) crashed or could not be started
%**
%**--------------------------------------------------------------

Process Oz Emulator exited abnormally with code 141

Exit code 141 means "killed by SIGPIPE".

Note the "Error: Tk module" is noticed as soon as Tk is killed/closed, while the second error (or exit) happens when trying to feed the code. I see two problems:

jaymelbe commented 10 years ago

Well.. that's very bad news. The build from source does not work with Windows and Ubuntu... There is no package for Windows The current package for Linux does not work because of this issue On Mac OS X, Aquamacs is messing up with they keyboard..

What is the recommended configuration to make Mozart2 works? I have 3PCs and a Mac.. and nobody is able to help me running Mozart2 on it.. that's crazy.

sjmackenzie commented 10 years ago

Pull requests are welcome.

Danweel commented 3 years ago

Hello! I've stumbled on this issue as well. Since it's been trouble for a while, is there advice for how to work around this? I don't need tkinter - I'm using emacs for OZ right now. I was setting up tkinter for Python for a different project, but should I pick a different set up? Most importantly, any idea as to how to get {Browse} working again? (MacOSx BigSur)

layus commented 3 years ago

The trouble is, you need tkinter for the browser. It is a graphical application, although admittedly not extremely complex.

You can work around the browser by using {Show X} instead of {Browse X}. Output will appear in the emacs "Oz emulator" buffer. The main difference is that {Show} does not update the result when unbound variables get bound. In that the browser is quite unique.

Also, this issue is six years old. It may be worth starting a new one and providing extra information (mozart version, macos version, tkinter version, emacs version)

jmcdl commented 3 years ago

I also ran into this problem on macOS Big Sur. I eventually was able to get Mozart running properly by using the virtual box .ova file that is made available on source forge. The "Browse" function appears to work correctly running it this way

Steps are:

  1. install virtual box (the "Portable-VirtualBox.zip" verion on sourceforge is windows only so don't use that)
  2. download the mozart2-2.0.0-alpha.0+build.4091-slitaz-1.01.ova file from https://sourceforge.net/projects/mozart-oz/files/Virtual%20Images/
  3. import it into virtual box

@layus I'm not sure why this method of using Mozart is not suggested in the github readme. It seems like it would save people some trouble.

layus commented 3 years ago

Well, it is not suggested because it is not reliably maintained, and comes with extra trouble as we end up having to provide support for virtualbox installation and configuration quirks on top of native issues on the three main OSes.

That being said, I am glad it helped you :-)

I wonder if anyone with macos expertise could explain how to dump error logs or dig deeper in this issue. That's out of my expertise.

Le 26 janvier 2021 21:17:00 GMT+01:00, James McDonell notifications@github.com a écrit :

I also ran into this problem on macOS Big Sur. I eventually was able to get Mozart running properly by using the virtual box .ova file that is made available on source forge. The "Browse" function appears to work correctly running it this way

Steps are:

  1. install virtual box (the "Portable-VirtualBox.zip" verion on sourceforge is windows only so don't use that)
  2. download the mozart2-2.0.0-alpha.0+build.4091-slitaz-1.01.ova file from https://sourceforge.net/projects/mozart-oz/files/Virtual%20Images/
  3. import it into virtual box

@layus I'm not sure why this method of using Mozart is not suggested in the github readme. It seems like it would save people some trouble.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mozart/mozart2/issues/208#issuecomment-767801277

jmcdl commented 3 years ago

Just wanted to note that I am able to run the programs on a mac without any problem when using VS Code with the mozart extension

kfcaio commented 3 years ago

I'm not able to get expected results using Ubuntu 18 on WSL:

Mozart Engine 2.0.0-alpha.0+build.4105.5c06ced (Tue, 2 Sep 2014 18:39:07 +0200) playing Oz 3


%************************ Error: Tk module **********************
%**
%** Graphics engine (tk.exe) crashed or could not be started
%**
%**--------------------------------------------------------------

%****************************************************************
%**
%** Error: unhandled exception
%**
%** socketOrPipe(write 32)
%**--------------------------------------------------------------