Yade breaks terminal

Asked by Jan Stránský

Hello,
on Ubuntu 16.04 I have installed Yade packaged version (1.20.0) by
sudo apt-get install yade
When I run it without script, it works as expected.
When I run a script (even an empty one), the terminal is broken. It shows (in default color)
[0;34mYade [[1;34m1[0;34m]: [0m
instead of blue "Yade [1]:"
The IPython does not work as expected (e.g. no auto-completion).
After yade exit, the terminal itself does not work as expected (pressing enter does not create a new line).

on previous computer with Ubuntu 16.04 I did not have this problem.
The same problem is present in Yade compiled from source.

Do you know what could be the problem / how to solve it?
I remember reading about such problem, but was not able to find the corresponding discussion..

thanks
Jan

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Antonio Pol
Solved:
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

Hi Jan,

as far as I remember this incompatibility with
specific ipython version was fixed after 1.20
release.

Cheers

Anton

Am Dienstag, 1. August 2017 schrieb Jan Stránský :

> New question #654435 on Yade:
> https://answers.launchpad.net/yade/+question/654435
>
> Hello,
> on Ubuntu 16.04 I have installed Yade packaged version (1.20.0) by
> sudo apt-get install yade
> When I run it without script, it works as expected.
> When I run a script (even an empty one), the terminal is broken. It shows
> (in default color)
> [0;34mYade [[1;34m1[0;34m]: [0m
> instead of blue "Yade [1]:"
> The IPython does not work as expected (e.g. no auto-completion).
> After yade exit, the terminal itself does not work as expected (pressing
> enter does not create a new line).
>
> on previous computer with Ubuntu 16.04 I did not have this problem.
> The same problem is present in Yade compiled from source.
>
> Do you know what could be the problem / how to solve it?
> I remember reading about such problem, but was not able to find the
> corresponding discussion..
>
> thanks
> Jan
>
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden> <javascript:;>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

--

Anton

Revision history for this message
Best Antonio Pol (antoniopol) said :
#2

Hi,
I had the same problem with unbuntu 16.04 .
I solved that problem following:

https://bugs.launchpad.net/yade/+bug/1604266/comments/11

cheers

Antonio

Revision history for this message
Robert Caulk (rcaulk) said :
#3

Yes, this is still a problem on 16.04 and [1] is a bit of a hack fix. Here is the reference to the bug itself [2]. It seems to be a Qt problem because when I compile Yade remotely on Ubuntu 16.04 LTS servers the iPython terminal works beautifully (of course there is no graphical interface on the server edition so Yade is compiled without Qt).

It is odd that you did not have this problem on a previous computer with 16.04. Maybe you had just the right version of Qt manually installed without knowing it?

Note: you can fix the terminal with the "reset" command. You may not see any text, but it will still work.

[1]https://bugs.launchpad.net/yade/+bug/1604266/comments/11
[2]https://bugs.launchpad.net/yade/+bug/1604266

Revision history for this message
Jan Stránský (honzik) said :
#4

Hello,

@Antonio: thanks, I was looking for exactly this post :-)

@Robert: I don't think I did any manual Qt manipulation, but theoretically it is possible :-)
thanks for the reset command, didn't know that

cheers
Jan

Revision history for this message
Jan Stránský (honzik) said :
#5

Thanks Antonio Pol, that solved my question.

Revision history for this message
Robert Caulk (rcaulk) said :
#6

Ok, I figured I'd open this back up in an attempt to investigate a suspicion that I now share with Klaus.

Klaus mentions [1]:
"First of all, this is definitely not a Kubuntu specific problem. I could not identify a specific pattern but I tried various distros on various computers and the problem seems to be related to certain computers (maybe graphic card/driver?)."

It is strange that this ipython terminal problem might be related to the graphic card and driver, but after building a new computer and installing Yade on Ubuntu 16.04, I found my terminal working perfectly fine. My older computer has the same version of Yade installed on 16.04, but the terminal breaks just as described in this thread. One notable difference between my two computers is the graphics card. My older computer has an AMD FirePro D3000, while my new computer has a Nvidia 1080 GeForce GTX.

Jan, you mention that your older computer used to work fine with 16.04, and your newer computer doesn't. Can you report the graphics cards here? Maybe the AMD drivers are interfering somehow?

[1]https://bugs.launchpad.net/yade/+bug/1604266/comments/11

Revision history for this message
Jan Stránský (honzik) said :
#7

Hi Robert,
the old laptop was stolen, it was ASUS K55A sx198, bought in 10/2012.
current laptop: Gallium 0.4 on AMD MULLINS (DRM 2.49.0 / 4.10.0-33-generic, LLVM 3.8.0)
cheers
Jan

Revision history for this message
Persio (persiobarros) said :
#8

Hi all,

I don't think that this issue is solved.

I have just installed YADE on a freshly installed Linux Mint 18.3 (which is based on Ubuntu 16.04), on a virtual machine (VMware), for testing, and the problem is there.

But on the host, which have Mint 18.2, YADE runs without problems. All the qt libraries on both the host and the VM seems to be the same version.

The proposed solution in [1] is not a real solution. It is an ugly hack for me.

Any ideas?

Revision history for this message
Jan Stránský (honzik) said :
#9

Hi Persio,
Please specify the specific reason why you find [1] ugly.
For me it is a real solution, I can imagine without any problems this behavior to be the default one, than all these problems would be solved..
Cheers
Jan

Revision history for this message
Persio (persiobarros) said :
#10

Hi Jan,
I'm sorry if I sounded somewhat rude. It was not my intent.
The solution you have proposed has two parts:
First, edit the the yade script, commenting out one single line. This is easy.
Second, remove any call for the qt.controller() from the user scripts. That is the trouble, in my opinion. Most of the examples furnished by the yade team have that call. The beginner will have some difficulties with this part, since he/she will certainly try to run those examples and use them as a starting point to learn how to use yade.
By the way, I have installed a new VM with the last ubuntu 18.04, and installed yade in it. The bug is not present there.
Cheers,
Persio

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#11

I agree with Persio, we don't want to go through all example scripts to remove qt() stuff.
It would be clearly a regression.
Possibly, this hack could be applied selectively based on the graphic card manufacturer or anything that we believe is the source of the problem. Since this bug seems difficult to reproduce and (is that true?) is not yet reported on 18.04 it does not sound critical to me.
Bruno

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#12
Revision history for this message
Persio (persiobarros) said :
#13

From: <email address hidden> <email address hidden> on behalf of Bruno Chareyre <email address hidden>

Sent: Monday, October 15, 2018 10:27 AM
To: <email address hidden>
Subject: Re: [Question #654435]: Yade breaks terminal

Question #654435 on Yade changed:
https://answers.launchpad.net/yade/+question/654435
Question #654435 : Questions : Yade<https://answers.launchpad.net/yade/+question/654435>
answers.launchpad.net
Hello, on Ubuntu 16.04 I have installed Yade packaged version (1.20.0) by sudo apt-get install yade When I run it without script, it works as expected. When I run a script (even an empty one), the terminal is broken. It shows (in default color) [0;34mYade [[1;34m1[0;34m]: [0m instead of blue "Yade [1]:" The IPython does not work as expected (e.g. no auto-completion). After yade exit, the terminal itself does not work as expected (pressing enter does not create a new line). on previous comput...

Bruno Chareyre posted a new comment:
I think it is fixed. Could you please confirm in the bug report [1]?
Bruno

[1] https://bugs.launchpad.net/yade/+bug/1604266
https://github.com/yade/trunk/commit/e639305aac8d6503fbd2303b98f31b112323d4a3

--
You received this question notification because you are subscribed to
the question.

Hi,

Is the change already in the yadedaily package? Or I'll have to compile Yade from sources?

Persio

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#14

@Persio

> Is the change already in the yadedaily package?

Since the answer is a function of time it is better to check by yourself.
In the repository [1] the version number of yadedaily is "2018.02b-211bdb49ea" as I write.
The 'bdb49ea' part is github chain for the last commit of october 12th in [2], which is before the fix.
Therefore, yadedaily is not fixed yet (again: as I write).
Bruno

[1] http://www.yade-dem.org/packages/xenial/
[2] https://github.com/yade/trunk/commits/master