yade not working prpoperly on Ubuntu/Kubuntu 16.04

Bug #1604266 reported by Klaus Thoeni
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Yade
Fix Committed
Undecided
Bruno Chareyre

Bug Description

Any version of yade (package, yadedaily, compiled) is giving problems on Ubuntu/Kubuntu 16.04. The ipython terminal shows a strange behaviour when starting yade with a script. In addition, yade might crash when doing some simple operations in the ipython command line. Also, using the Inspector does not work for the packaged version (it works for yadedaily and compiled). See discussions [1] and [2]. Problem might be related to QT5 and IPyhton.

[1] https://answers.launchpad.net/yade/+question/295951
[2] https://answers.launchpad.net/yade/+question/295827

Revision history for this message
Václav Šmilauer (eudoxos) wrote :

FYI IPython packaged in 16.04 does not support qt5 yet, you need to install version >=5 from pip.

Revision history for this message
Klaus Thoeni (klaus.thoeni) wrote :

Hi Vaclav, thanks for the hint. I did install IPython from pip but it did not solve all the problems, e.g., the QT controller is not working now. I think some more updates in the code are needed to get full QT5 support.

Revision history for this message
Anton Gladky (gladky-anton) wrote :

Klaus,

I have just tested Ubuntu 16.04 and used standard package and yadedaily and I could not reproduce the problem.

The only warning I get is the following:

OpenGL Warning: No pincher, please call crStateSetCurrentPointers() in your SPU
QColor::setRgbF: RGB parameters out of range

But it has no negative influence and can be related to a VirtualBox.
I was trying to install Kubuntu on VirtualBox, but failed. Will try again.

Linux Mint is working also fine.

Best regards

Anton

Revision history for this message
Klaus Thoeni (klaus.thoeni) wrote :

Hi Anton,

did you use IPython from pip as indicated by Vaclav or just standard packages?

I can provide you the virtual machine for Ubuntu/Kubuntu if it helps. Let me know.

Cheers
Klaus

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) wrote : AW: [Yade-dev] [Bug 1604266] Re: yade not working prpoperly onUbuntu/Kubuntu 16.04

Hi,
just reading through and saw that you get this error:
" QColor::setRgbF: RGB parameters out of range"
I got this error multiple times under Ubuntu 14.04 and could not fix it.
regrads
Alex

-----Ursprüngliche Nachricht-----
Von: Yade-dev [mailto:<email address hidden>] Im Auftrag von Anton Gladky
Gesendet: Mittwoch, 20. Juli 2016 21:38
An: <email address hidden>
Betreff: [Yade-dev] [Bug 1604266] Re: yade not working prpoperly onUbuntu/Kubuntu 16.04

Klaus,

I have just tested Ubuntu 16.04 and used standard package and yadedaily and I could not reproduce the problem.

The only warning I get is the following:

OpenGL Warning: No pincher, please call crStateSetCurrentPointers() in your SPU
QColor::setRgbF: RGB parameters out of range

But it has no negative influence and can be related to a VirtualBox.
I was trying to install Kubuntu on VirtualBox, but failed. Will try again.

Linux Mint is working also fine.

Best regards

Anton

--
You received this bug notification because you are a member of Yade developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1604266

Title:
  yade not working prpoperly on Ubuntu/Kubuntu 16.04

Status in Yade:
  New

Bug description:
  Any version of yade (package, yadedaily, compiled) is giving problems
  on Ubuntu/Kubuntu 16.04. The ipython terminal shows a strange
  behaviour when starting yade with a script. In addition, yade might
  crash when doing some simple operations in the ipython command line.
  Also, using the Inspector does not work for the packaged version (it
  works for yadedaily and compiled). See discussions [1] and [2].
  Problem might be related to QT5 and IPyhton.

  [1] https://answers.launchpad.net/yade/+question/295951
  [2] https://answers.launchpad.net/yade/+question/295827

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1604266/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to : <email address hidden>
Unsubscribe : https://launchpad.net/~yade-dev
More help : https://help.launchpad.net/ListHelp

Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 1604266] Re: yade not working prpoperly on Ubuntu/Kubuntu 16.04

Klaus,

it is just standard package, installed by apt-get install yade.
Nothing more.

I will try to install Kubuntu on another machine during the next
few days.

Best regards

Anton

Revision history for this message
Anton Gladky (gladky-anton) wrote :

I can confirm this behavior but I would restrict it only for Kubuntu. I still have the same feeling that the problem is in Qt-incompatibility somewhere...

Regards

Anton

Revision history for this message
Klaus Thoeni (klaus.thoeni) wrote :

Hi Anton,

thanks for having a look at this. Nevertheless, this should not be restricted to Kubuntu. In fact, I can reproduce the exactly same behaviour in Ubuntu and 3 more users have confirmed the problem on Ubuntu. Ubuntu and Kubuntu use the same packages/library versions so this makes also sense.

The IPython version from packages is 2.4.1 and as Vaclav pointed out it does not support QT5. Installing IPython 5.0.0 with pip however does not solve the problem. The strange terminal behaviour is gone but the GUI is not working properly (it only works in "idle" mode, i.e., after pressing Ctrl+D). The warnings when launching yade with IPython 5.0.0 are as follows:

Welcome to Yade 1.20.0
TCP python prompt on localhost:9000, auth cookie `cuasek'
XMLRPC info provider on http://localhost:21000
QSettings::value: Empty key passed
QSettings::value: Empty key passed
/home/yade/.local/lib/python2.7/site-packages/IPython/config.py:13: ShimWarning: The `IPython.config` package has been deprecated. You should import from traitlets.config instead.
  "You should import from traitlets.config instead.", ShimWarning)
/home/yade/.local/lib/python2.7/site-packages/IPython/core/interactiveshell.py:440: UserWarning: As of IPython 5.0 `PromptManager` config will have no effect and has been replaced by TerminalInteractiveShell.prompts_class
  warn('As of IPython 5.0 `PromptManager` config will have no effect'
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]

In [1]:

BTW, I tried to compile with QT4 by installing corresponding packages and USE_QT5=0. Configuration and compilation was smooth. However, when launching yade it crashes:

Welcome to Yade 2016-07-09.git-9003796
TCP python prompt on localhost:9000, auth cookie `escsay'
XMLRPC info provider on http://localhost:21000
Traceback (most recent call last):
  File "./yade-2016-07-09.git-9003796", line 281, in <module>
    import yade.qt # this yade.qt is different from the one that comes with qt3
  File "/home/yade/YADE/source-code/install/lib/x86_64-linux-gnu/yade-2016-07-09.git-9003796/py/yade/qt/__init__.py", line 15, in <module>
    from yade.qt.Inspector import *
  File "/home/yade/YADE/source-code/install/lib/x86_64-linux-gnu/yade-2016-07-09.git-9003796/py/yade/qt/Inspector.py", line 3, in <module>
    from PyQt5.QtCore import *
RuntimeError: the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class
*** Error in `/usr/bin/python': free(): invalid pointer: 0x00007f38a12c67c0 ***

It looks like it's still accessing some qt5 libs.

Would appreciate if we could solve the issue either way (qt4 or qt5).

Cheers
Klaus

Revision history for this message
Václav Šmilauer (eudoxos) wrote :

I am correcting what I said about IPython 5.0. The first version supporting qt5 is 3.x. 4.x will probably work with Yade, but with some warnings. 5.0 is not compatible due to API changes (custom prompt, shortcuts, eventloop integration). That is all unrelated to importing incorrect qt version in #8. Cheers, Vaclav

Revision history for this message
Anton Gladky (gladky-anton) wrote :

2016-07-27 16:43 GMT+02:00 Václav Šmilauer <email address hidden>:
> I am correcting what I said about IPython 5.0. The first version
> supporting qt5 is 3.x. 4.x will probably work with Yade, but with some
> warnings. 5.0 is not compatible due to API changes (custom prompt,
> shortcuts, eventloop integration). That is all unrelated to importing
> incorrect qt version in #8. Cheers, Vaclav

Thanks Vaclav. You are right. It looks like there is no qt-problem. But
the problem is in terminal, used by Kubuntu. It works differently as in all
other systems. More over, it freezes after starting and exiting from yade.

Very strange problem.

Anton

Revision history for this message
Klaus Thoeni (klaus.thoeni) wrote :

Hi all,

here a follow up on this from my side and a "work-around". I know what's causing the problem and it can be avoided

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?).

Anyway, I could figure out what is causing the problem. It is related to QT and not loading yade.qt.Controller() at start-up is solving the problem. In order to deactivate this you have to manually modify your yade executable script after install (e.g., /home/user/path-to-your-local-yade-install/install/bin/yade... or /usr/bin/yade or /usr/bin/yadedaily). Look for this line:

if (gui<>'none'): yade.qt.Controller()

It should be around line 174. Comment this line and safe the script. Launch yade and it should work. In the ipython terminal you can now press F12 to load the Controller and it will be fine.

Note that this means that you should not load the qt.Controller() in your scripts either but rather do it once you are in the ipython terminal.

I even thought about committing this fix, it just involves commenting/deleting the same line in core/main/main.py.in but wasn't sure if is in all our interests as some are not having this problem and it would mean that the qt.Controller() is not loaded by default.

Let me know what you think or if anyone has deeper understanding on what's going on. At least we know what is causing the problem and that there is a workaround.

HTH
Klaus

Revision history for this message
Robert Caulk (rcaulk) wrote :

This explains why I am not encountering this issue with the 16.04 LTS server version.

Revision history for this message
Klaus Thoeni (klaus.thoeni) wrote :

Yes, compiling yade without QT is another solution :-)

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

I think it is solved in [1] by configuring ipython _before_ running anything (exactly as what happens when yade is started without a script).
Bruno

[1] https://github.com/yade/trunk/commit/e639305aac8d6503fbd2303b98f31b112323d4a3

Changed in yade:
status: New → Fix Committed
assignee: nobody → Bruno Chareyre (bruno-chareyre)
Revision history for this message
Robert Caulk (rcaulk) wrote :

Thanks Bruno. I confirm that your patch fixed the problem on my computer running VM 16.04.

I should point out that in the end, the common denominator of people running into this problem was that they were all using a virtual machine.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.