CDAT / cdat

Community Data Analysis Tools
Other
174 stars 68 forks source link

vcs/VTK does NOT work correctly on VirtualBox #1044

Open jypeter opened 9 years ago

jypeter commented 9 years ago

I have been able to install UV-CDAT in the Linux running on my virtual machine in VirtualBox. It seems to work correctly and seems to pass all the ctest tests (though my screen blinks like crazy). The trouble is that, due to some bad interactions between VB, my installed Linux, GL, the support of he graphical card hardware inside virtualbox and I guess VTK, each time I make a plot with vcs, all my virtual machine screen goes black and VTK spits lots of error messages. The only way to get my screen back is to resize the screen of my VM.

I have made a video because this is the best way to describe my problem https://files.lsce.ipsl.fr/public.php?service=files&t=d7318c395817de25d279c1fca01292b0

I'm running the following very simple script

import numpy as np, vcs
id100 = np.identity(100)
x = vcs.init()
x.plot(id100)
x.pdf('test_id100')
x.png('test_id100')
x.interact()

Things to notice in the video

Hardware graphics support inside the VM has been flaky in Virtualbox for quite some time, but it does not prevent the window manager and everything I have used so far (except CDAT) to run correctly. I can run the glxgears demo/test correctly.

I have googled the _Extension GL_VERSION_15 could not be loaded error message and mostly got references to VTK/Paraview problems in 2010 and a VTK manual link http://www.vtk.org/doc/release/5.0/html/a01775.html

Can somebody help me with this? Is it possible to change something in vcs or VTK to make things run correctly? I'm using a Win 7 desktop and high end vcs graphics (and the GUI) are painfully slow (to the point of being useless) when I run them on our remote servers. I was hoping that running a local version of vcs would make things better

I have also tried to disable the accelerated graphics in the VM and run in software rendering mode. In that case, things work correctly, but everything (including the window manager) is running so slow that I might as well run on our remote server. The vcs from 1.5.1 has no problem of course! So this is obviously a VTK related problem

I'm using the up-to-date version of Fedora Core 20 on the latest stable release of VirtualBox (4.3.22). My graphics card is a NVIDIA NVS 310 with the latest Windows 7 drivers provided by Dell (I'm using a Dell desktop)

I can run extra tests if somebody tells me which ones

remram44 commented 9 years ago

I've been using Vagrant and VirtualBox the whole time (exact Vagrant image is remram/debian-7-amd64).

Your script works for me. I get these errors in the terminal (and in fact, printing them slows the program quite a bit, below interactive response times):

ERROR: In /home/vagrant/build-2.1.0-gfdb9e30/build/VTK/Rendering/OpenGL/vtkOpenG
LDisplayListPainter.cxx, line 188
vtkOpenGLDisplayListPainter (0x229c8a0): failed after RenderInternal 1 OpenGL er
rors detected
  0 : (1280) Invalid enum
ERROR: In /home/vagrant/build-2.1.0-gfdb9e30/build/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188
vtkOpenGLDisplayListPainter (0x228a4d0): failed after RenderInternal 1 OpenGL errors detected
  0 : (1280) Invalid enum
ERROR: In /home/vagrant/build-2.1.0-gfdb9e30/build/VTK/Rendering/OpenGL/vtkOpenGLExtensionManager.cxx, line 757
vtkOpenGLExtensionManager (0x2829a50): Extension GL_VERSION_1_5 could not be loaded.

screenshot

If I don't enable "3D acceleration" in VirtualBox, the plot is blank (white, except for axis and legend), but still no crash. I do not experience the "always on top" behavior either.

This is UV-CDAT 2.1.0 fdb9e30, since recent builds have so many issues. VirtualBox 4.1.30 running on Windows 7.

durack1 commented 9 years ago

@jypeter the issue above looks very similar to problems I've encountered using VNC.. I've hacked around this by redirecting graphics to a second backend display configured through Xvfb but I agree this is really not a usable solution for most folks..