--- Begin Message ---
------------------------------------------------------------
revno: 6314
committer: Garth N. Wells <gnw20@xxxxxxxxx>
branch nick: dolfin-all
timestamp: Fri 2011-09-30 00:38:38 +0100
message:
Attempt to import vtk before the DOLFIN imports to avoid a segfault with Oneiric and latest Nvidia drivers.
I have no idea why I get the segfault, or why this works. I don't get a segfault when plotting from C++, but I do when plotting from Python. Any ideas?
modified:
site-packages/dolfin/__init__.py
--
lp:~dolfin-core/dolfin/wells
https://code.launchpad.net/~dolfin-core/dolfin/wells
You are subscribed to branch lp:~dolfin-core/dolfin/wells.
To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/wells/+edit-subscription
=== modified file 'site-packages/dolfin/__init__.py'
--- site-packages/dolfin/__init__.py 2011-05-20 05:14:24 +0000
+++ site-packages/dolfin/__init__.py 2011-09-29 23:38:38 +0000
@@ -9,6 +9,13 @@
# Remove some unnecessary imports from UFL
del set_handler, set_level
+# Attempt to import vtk (imported now to avoid a segfault with Ubuntu 11.10
+# and Nvidia OpenGL libraries)
+try:
+ import vtk
+except:
+ continue
+
# Import names from the compiled cpp module
from dolfin.cppimports import *
from dolfin.cppimports import __version__, __swigversion__
--- End Message ---