python-visual seg faults even in simple test cases

Bug #429015 reported by gs
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
python-visual (Ubuntu)
Undecided
Unassigned
Nominated for Karmic by malky731
Nominated for Lucid by gs

Bug Description

Binary package hint: python-visual

Test case 1:

Observed outcome

~ $python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from visual import *
>>> v = vector('x')
Segmentation fault

Expected outcome (output from 8.04.3)

u9@test:~$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from visual import *
>>> v = vector('x')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Vectors must be constructed from sequences of 2 or 3 float members.
>>>

Test case 2:

Observed outcome

~ $python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from visual import *
>>> v=vector(1,2,3)
>>> for i in v:
... print i
...
1.0
2.0
3.0
Segmentation fault

Expected outcome (output from 8.04.3)

u9@test:~$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from visual import *
>>> v=vector(1,2,3)
>>> for i in v:
... print i
...
1.0
2.0
3.0
>>>

Ubuntu releases tested:

Error occurs on 9.04 32bit, 9.04 64bit,, 8.10 64bit
Error does not occur on 8.04 32bit, 8.04 64bit
Not tested 8.10 32bit

How to reproduce:

Clean install from CD
aptitude update
aptitude safe-upgrade (this step is optional, has no effect on outcome, positive or negative)
aptitude install python-visual
(Important! Do not activate proprietary graphics driver.)
run test as shown above

What happens if one activates proprietary graphics driver (For these tests I used the menu option to install the drivers):

No change with ATI/AMD graphics cards. Errors (seg faults) occur exactly the same as without the proprietary graphics driver.

With Nvidia graphics cards test 1 and 2 do not seg fault.

Reproducibility (hardware tested):

6 different computers (2xnvidia graphics, 4x ATI/AMD graphics) 1 Dell, 1 Dell laptop, 1 Lenovo laptop, 3 different custom builds.

A third test case has slightly different behavior:

Test case 3:

Observed outcome

~ $python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from visual import *
>>> quit()
Segmentation fault

Expected outcome:

~ $python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from visual import *
>>> quit()
~ $

Test case 3 works on 8.04.3 AND 8.10, but fails on 9.04. Unlike test case 1 and 2 installing proprietary graphics drivers on systems with nvidia graphics does not change the negative outcome.

This last error is less severe than the first two, because it happens when exciting the python interpreter. Still it is very annoying.

Additional remarks:

Same behavior for new upstream version (5.12_release), compiled from source.

python-visual is used heavily with novice programmers and a seg fault instead of an error message for a simple syntax error is deadly.

python-visual on debian lenny works on all tested hardware.

Revision history for this message
buggycub (smusnmr) wrote :

Same problem with Ubuntu 9.10 and Python 2.6.4 and python-visual! What to do?

Thanks!

Revision history for this message
Florian Diesch (diesch) wrote :

http://vpython.org/contents/download_linux.html says:

There is a bug in the standard Boost libraries on Ubuntu 9.10, and to build VPython
you must first install Boost 1.38 libraries from https://launchpad.net/~ajmitch/+archive/ppa.

After adding the PPA and updating the packages the simple test cases above work for me on 9.10

python-visual:
  Installed: 1:5.11-1
  Candidate: 1:5.11-1
  Version table:
 *** 1:5.11-1 0
        500 http://de.archive.ubuntu.com karmic/universe Packages
        100 /var/lib/dpkg/status
libboost-python1.38.0:
  Installed: 1.38.0-6ubuntu6.1~ppa1
  Candidate: 1.38.0-6ubuntu6.1~ppa1
  Version table:
 *** 1.38.0-6ubuntu6.1~ppa1 0
        500 http://ppa.launchpad.net karmic/main Packages
        100 /var/lib/dpkg/status
     1.38.0-6ubuntu6 0
        500 http://de.archive.ubuntu.com karmic/main Packages

Revision history for this message
buggycub (smusnmr) wrote :

In addition to the Boost 1.38 libraries, I had to install libgtkglextmm-x11-1.2-dev to get a functional VPython
 (python-visual - VPython 3D scientific visualization library, version 1:5.11-1) on my Ubuntu 9.10 i386.

Revision history for this message
Jaime Villate (villate) wrote :

Thanks Florian and linuxcub. I had to do both #2 and #3 to make VPython work in my Ubuntu 9.10 amd64 system.

Revision history for this message
Gary.Pajer (gary-pajer) wrote :

This bug persists in Ubuntu 10.04 beta1

Revision history for this message
Scott Howard (showard314) wrote :

Thanks for the report and helping to make ubuntu better. I believe this is a duplicate of bug #457688 and have marked it as such. Please check to make sure that bug report is complete and continue to report any additional bugs that you find.

Revision history for this message
gs (gs-orst) wrote :

This bug is certainly NOT a duplicate of 457688. What kind of testing did you do that makes you 'believe' that?

Revision history for this message
Scott Howard (showard314) wrote :

Comment #2 and 3 show that this bug is fixed from installing from https://launchpad.net/~ajmitch/+archive/ppa .

That ppa is devoted to the fix for bug #457688 (it contains a single cherrypicked patch in libboost. That patch fixes python-visual segfaults exactly like the one reported here)
Comment #4 here confirmed the fix.

http://vpython.org/contents/download_linux.html discusses the doc string bug, which has the identical symptoms as you describe.
"There is a bug in the standard Boost libraries on Ubuntu 9.10, and to build VPython
you must first install Boost 1.38 libraries from https://launchpad.net/~ajmitch/+archive/ppa.
Be sure to read and follow ALL of the instructions; click on everything in sight on that web page."

I reproduced this bug in Lucid, and fixed this bug using the fix described here (which is actually fixing the bug that I believe to be a duplicate of this bug). The fix described here is the fix for bug #457688 (which is a cherry pick from libboost's svn). Therefore, fixing bug #457688 (and bug #539049) fixes the bug described here.

Either there are two bugs here (one that me, Florian Diesch, linuxcub, Jaime Villate, and vpython developers have noticed and a second one that you have), or they are the same bug.

You're testing is quite thorough and complete, so I'll defer to your judgement a to whether you're reporting the same bug that Florian Diesch, linuxcub, and Jaime Villate are seeing. Have you tried the fix described here (install https://launchpad.net/~ajmitch/+archive/ppa)?
Thanks again for your help.

Revision history for this message
gs (gs-orst) wrote :

I originally filed this bug against 9.04, which predates bug #457688, which first appeared in 9.10. So without any testing I can say for certain this bug is different. None of the reports mention the graphics that are used and hence are quite irrelevant to this bug. This bug never occurred with nvidia graphics enabled. It is of course possible that the problems described here are fixed in Lucid if you get visual to run in the first place, but in this case my bet would be that this is not because of the fix for bug #457688 but rather because of changes elsewhere in Lucid.
I'll try to test Lucid if I get around to it but I make no promises. As you noticed I tested this rather exhaustively last summer trying to get 9.10 fixed, but I can't justify putting that much time into this again without receiving any useful feedback. I run several computer labs at a university and they all run debian now because of this bug and #457688.

Revision history for this message
gs (gs-orst) wrote :

This bug is still present in Lucid beta2 (64bit). See new bug #560297 for details.

Tested on computer with ati graphics, but hardware acceleration not installed.

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

Other bug subscribers