Re: [Paraview] issue with python/qt wrapping on ubuntu: Cannot create GLX context. Aborting.

2012-03-14 Thread Chris Kees
This crash is apparently due to my attempt at off screen rendering.
Not sure if it's and os mesa problem on ubuntu or just a problem with
the way I was trying to do off screen rendering.

On Tue, Mar 6, 2012 at 1:31 PM, Chris Kees cek...@gmail.com wrote:
 Hi,

 I've got an issue running a python/QT/VTK app built from the paraview-3.14
 master branch and using qt-4.8 on ubuntu 11.04.  This has been working on
 darwin as recently as a month ago and used to work on linux. The code
 crashes with error:

 ERROR: In
 /home/cekees/proteus/externalPackages/ParaView/VTK/Rendering/vtkXOpenGLRenderWindow.cxx,
 line 629
 vtkXOpenGLRenderWindow (0x4ff4460): Cannot create GLX context.  Aborting.

 When I insert the python debugger before the main bunch of Qt setup code and
 single step through it, the code runs fine without error. If I let it
 continue and/or remove the debugging statement entirely, it gives me the
 crash. I've include the python code below. Any ideas on what is causing
 this?

 Thanks,
 Chris



         skipComm = False
         self.comm = comm
         self.compManager = vtkCompositeRenderManager()
         if not skipComm:
             self.communicator = vtkMPICommunicator()
             self.controller = vtkMPIController()

 self.controller.SetCommunicator(self.communicator.GetWorldCommunicator())
             self.compManager.SetController(self.controller)
             if useCoPro:
                 self.copro =
 initializeCoProcessor(self.comm,self.controller)
         self.myProcId = comm.rank()
         self.numProcs = comm.size()
         self.isMaster = comm.isMaster()
         self.background=(1,1,1)
         #self.background=(0,0,0)
         self.textColor=(0,0,0)
         self.name=name
         #vtk object dictionary
         self.vod={}
         if comm.rank() == 0:
             if hasQt:
                 if useMainWindow:
                     import pdb
                     pdb.set_trace()
                     #Qt widgets
                     self.frameWidget = QtGui.QFrame(g.mainWindow)
                     self.hbox = QtGui.QHBoxLayout()
                     self.iren = QVTKRenderWindowInteractor(self.frameWidget)
                     self.iren.Initialize()
                     if comm.size()  1:
                        self.iren.Disable()
                     else:

 self.iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
                     self.renWin = self.iren.GetRenderWindow()
                     self.renWin.SetWindowName(name)
                     self.hbox.addWidget(self.iren)
                     self.frameWidget.setLayout(self.hbox)
                     g.tabWidget.addTab(self.frameWidget,title)
                     g.tabWidget.setCurrentWidget(self.frameWidget)
                     screen = QtGui.QDesktopWidget().screenGeometry()
                     size = g.mainWindow.geometry()
                     (x,y) = (screen.width()-comm.size()*size.width())/2,
 (screen.height()-size.height())/2
                     g.mainWindow.move(x+comm.rank()*size.width(),y)
                     g.mainWindow.show()
                 else:
                     #self.iren =
 vtkRenderWindowInteractor()#QVTKRenderWindowInteractor()
                     self.iren = QVTKRenderWindowInteractor()
                     self.iren.Initialize()
                     if comm.size()  1:
                        self.iren.Disable()
                     else:

 self.iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
                     self.renWin = self.iren.GetRenderWindow()
                     #self.renWin = self.compManager.MakeRenderWindow()
                     #self.iren.SetRenderWindow(self.renWin)
                     self.renWin.SetWindowName(name)
                     self.iren.show()
             else:
                 self.iren = vtkRenderWindowInteractor()

 self.iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
                 self.iren.Initialize()
                 self.renWin = self.compManager.MakeRenderWindow()
                 self.iren.SetRenderWindow(self.renWin)
                 self.renWin.SetWindowName(name)
         else:
             self.renWin = self.compManager.MakeRenderWindow()
             self.renWin.OffScreenRenderingOn()

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] issue with python/qt wrapping on ubuntu: Cannot create GLX context. Aborting.

2012-03-06 Thread Chris Kees
Hi,

I've got an issue running a python/QT/VTK app built from the paraview-3.14
master branch and using qt-4.8 on ubuntu 11.04.  This has been working on
darwin as recently as a month ago and used to work on linux. The code
crashes with error:

ERROR: In
/home/cekees/proteus/externalPackages/ParaView/VTK/Rendering/vtkXOpenGLRenderWindow.cxx,
line 629
vtkXOpenGLRenderWindow (0x4ff4460): Cannot create GLX context.  Aborting.

When I insert the python debugger before the main bunch of Qt setup code
and single step through it, the code runs fine without error. If I let it
continue and/or remove the debugging statement entirely, it gives me the
crash. I've include the python code below. Any ideas on what is causing
this?

Thanks,
Chris



skipComm = False
self.comm = comm
self.compManager = vtkCompositeRenderManager()
if not skipComm:
self.communicator = vtkMPICommunicator()
self.controller = vtkMPIController()

self.controller.SetCommunicator(self.communicator.GetWorldCommunicator())
self.compManager.SetController(self.controller)
if useCoPro:
self.copro =
initializeCoProcessor(self.comm,self.controller)
self.myProcId = comm.rank()
self.numProcs = comm.size()
self.isMaster = comm.isMaster()
self.background=(1,1,1)
#self.background=(0,0,0)
self.textColor=(0,0,0)
self.name=name
#vtk object dictionary
self.vod={}
if comm.rank() == 0:
if hasQt:
if useMainWindow:
import pdb
pdb.set_trace()
#Qt widgets
self.frameWidget = QtGui.QFrame(g.mainWindow)
self.hbox = QtGui.QHBoxLayout()
self.iren = QVTKRenderWindowInteractor(self.frameWidget)
self.iren.Initialize()
if comm.size()  1:
   self.iren.Disable()
else:

self.iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
self.renWin = self.iren.GetRenderWindow()
self.renWin.SetWindowName(name)
self.hbox.addWidget(self.iren)
self.frameWidget.setLayout(self.hbox)
g.tabWidget.addTab(self.frameWidget,title)
g.tabWidget.setCurrentWidget(self.frameWidget)
screen = QtGui.QDesktopWidget().screenGeometry()
size = g.mainWindow.geometry()
(x,y) = (screen.width()-comm.size()*size.width())/2,
(screen.height()-size.height())/2
g.mainWindow.move(x+comm.rank()*size.width(),y)
g.mainWindow.show()
else:
#self.iren =
vtkRenderWindowInteractor()#QVTKRenderWindowInteractor()
self.iren = QVTKRenderWindowInteractor()
self.iren.Initialize()
if comm.size()  1:
   self.iren.Disable()
else:

self.iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
self.renWin = self.iren.GetRenderWindow()
#self.renWin = self.compManager.MakeRenderWindow()
#self.iren.SetRenderWindow(self.renWin)
self.renWin.SetWindowName(name)
self.iren.show()
else:
self.iren = vtkRenderWindowInteractor()

self.iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
self.iren.Initialize()
self.renWin = self.compManager.MakeRenderWindow()
self.iren.SetRenderWindow(self.renWin)
self.renWin.SetWindowName(name)
else:
self.renWin = self.compManager.MakeRenderWindow()
self.renWin.OffScreenRenderingOn()
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview