[mcstas-users] mcgui using a mint 17.1 VM

Peter Kjær Willendrup pkwi at fysik.dtu.dk
Tue Jan 5 15:55:04 CET 2016

Hi Rob,

On 05 Jan 2016, at 15:43 , robert.dalgliesh at stfc.ac.uk<mailto:robert.dalgliesh at stfc.ac.uk> wrote:

As requested on the install page.. I have found a number of problems with the packaged install.

Using a clean install of a Mint 17.1 VM an install of mcstas 2.2a fails to run simulations using mcgui.

It does not seem to be possible to run a simulation through the interface.

The error seems to be Tk based.

Tk::Error###: This shouldn't happen at /usr/share/perl/5.18/Text/Wrap.pm line 84.
Tk callback for .toplevel39
Text::Wrap::wrap at /usr/share/perl/5.18/Text/Wrap.pm line 84
main::run_dialog_create at /usr/bin/mcgui line 746
main::run_dialog at /usr/bin/mcgui line 818
main::my_system at /usr/bin/mcgui line 979
main::menu_run_simulation at /usr/bin/mcgui line 1278
main::__ANON__ at /usr/bin/mcgui line 1639
Tk callback for .frame.menubutton1.menu
Tk::__ANON__ at /usr/lib/perl5/Tk.pm line 251
Tk::Menu::Invoke at /usr/lib/perl5/Tk/Menu.pm line 532
(command bound to event)

The Tk::Error is in fact of a general nature - has been observed on Mac OS X as well as different Linuxes and has been fixed in our GitHub repos.

- See https://github.com/McStasMcXtrace/McCode/commit/8b9c1e6dbdbbf413c6d0ae8b193c3053a38a6fdc, a matter of a couple of small fixes in mcgui / run_dialog_create.

As far as I could see, the problem only occurs when mcgui is run with very long file/pathnames for the instrument. A workaround in some cases was to cd to the folder of the instrument and run mcgui my.instr

In addition the bug that has been around for several releases regarding the killing of mcdisplay processes still seems to be live.
Pressing cancel either seems to leave the binary running or leaves the dialog box up.

Not sure of the cause.

OK, thanks for reminding me of that one.

A workaround is to not use the “cancel” button but rather give a “q” directly in the mcdisplay window (in case you are using PGPLOT) or close the window in case of e.g. MATLAB mcdisplay.

Best and hope these little tricks help,


Peter Kjær Willendrup
Senior Research Engineer, Special Advisor

DTU Physics

Technical University of Denmark

[cid:image002.gif at 01CCCAF1.5E6331F0]

Department of Physics

Building 307

DK-2800 Kongens Lyngby

Direct +45 2125 4612

Mobil +45 2125 4612
Fax +45 4593 2399

pkwi at fysik.dtu.dk<mailto:pkwi at fysik.dtu.dk>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20160105/688fa756/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 58 bytes
Desc: image001.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20160105/688fa756/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1055 bytes
Desc: image002.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20160105/688fa756/attachment-0001.gif>

More information about the mcstas-users mailing list