Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jaymelbe opened this issue Jul 17, 2014 · 11 comments
Open

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

jaymelbe opened this issue Jul 17, 2014 · 11 comments

Comments

@jaymelbe
Copy link

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
Copy link
Member

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
Copy link
Member

eregon commented Jul 17, 2014

@sjmackenzie It might be related to my merged patch baa705d.
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:

  • Opening the OPI
  • Feeding some {Browse hello}
  • Quitting/killing the Tk process (cmd+Q on OS X)
  • Trying to feed again => results in the error above

@eregon
Copy link
Member

eregon commented Jul 17, 2014

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:

  • The Graphics engine should probably restart itself cleanly when it was closed (or crashed)
  • We need better error reporting when the Graphics engine can not be started (could not find Tk, opening the pipe failed?)

@jaymelbe
Copy link
Author

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
Copy link
Member

Pull requests are welcome.

@Danweel
Copy link

Danweel commented Jan 11, 2021

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
Copy link
Member

layus commented Jan 12, 2021

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
Copy link

jmcdl commented Jan 26, 2021

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
Copy link
Member

layus commented Jan 26, 2021 via email

@jmcdl
Copy link

jmcdl commented Feb 7, 2021

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
Copy link

kfcaio commented Apr 18, 2021

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)
%**--------------------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants