Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

406
Views
VTK funciona con real X, falla con Xvfb

Estoy depurando un script de Python de terceros que implementa el procesamiento de imágenes sin cabeza con la biblioteca VTK. Cuando se ejecuta con una sesión de ventana X normal, funciona como se esperaba, parpadeando una ventana durante una fracción de segundo. Cuando se ejecuta contra Xvfb (framebuffer virtual en la memoria), falla. El guión es así (se omite la pelusa):

 inname = args[0] outname = args[1] from vtk import * reader = vtkPLYReader() reader.SetFileName(inname) gf = vtkGraphicsFactory gf.SetOffScreenOnlyMode(1) gf.SetUseMesaClasses(1) if_ = vtkImagingFactory if_.SetUseMesaClasses(1) mapper = vtkPolyDataMapper() mapper.SetInputConnection(reader.GetOutputPort()) actor = vtkActor() actor.SetMapper(mapper) renderer = vtkRenderer() renderWindow = vtkRenderWindow() renderWindow.SetSize(xsize, ysize) renderWindow.SetOffScreenRendering(1) renderWindow.AddRenderer(renderer) renderer.AddActor(actor) renderer.SetBackground(1, 1, 1) renderWindow.Render() #<------------ This line crashes wif = vtkWindowToImageFilter() wif.SetInput(renderWindow) wif.Update() writer = vtkPNGWriter() writer.SetFileName(outname) writer.SetInput(wif.GetOutput()) writer.Write()

El mensaje de bloqueo dice:

 ERROR: In /builddir/build/BUILD/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 404 vtkXOpenGLRenderWindow (0x26942e0): Could not find a decent visual Segmentation fault (core dumped)

Xvfb se ejecuta como un servicio; su línea de comando es:

 /usr/bin/Xvfb :99 -ac -extension GLX

DISPLAY está configurado para :99 para la prueba. El sistema operativo es RHEL 6.

Cualquier comentario sobre qué es un "visual" y cómo habilito uno en Xvfb es bienvenido.

EDITAR: Ejecutar glxinfo da un mensaje similar:

 Error: couldn't find RGB GLX visual or fbconfig

Pero la extensión GLX está ahí mismo, en la línea de comandos. El registro de Xvfb no tiene ningún mensaje de error.

EDIT2: pero cuando hago xdpyinfo -queryExtensions , GLX no aparece en la lista.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Uso Xvfb para ejecutar pruebas de selenio, pero uso el módulo xvfbwrapper , es un módulo liviano para Xvfb

Debajo del código:

 from xvfbwrapper import Xvfb display = Xvfb() display.start() [ yourcode ] display.stop()
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!