[vtk-developers] Endless loop in vtkClearOpenGLErrors

Lodron, Gerald Gerald.Lodron at joanneum.at
Wed Feb 19 03:57:19 EST 2014


Hello,

As already encountered in my mail from 11th Dezember (see below) I encountered a second endless loop situation where i came in that same endless loop code part (on a different PC, so I really believe that this is not on relying on my PC/Drivers):

I made a gui with tabs where I created a new tab with an QVTKWidget. That Tab was hidden at start and/but I called the Render() function in code. Then I get into the endless loop in  vtkClearOpenGLErrors() of vtkOpenGLError.h called from vtkOpenGLRenderer....
When I change the tab visible before calling Render() it works. That is not a nice behaviour, I really recommend to change that
inline
void vtkClearOpenGLErrors()
{
  while (glGetError()!=GL_NO_ERROR){;}
}
Into something more stable....

Best regards,
Gerald Lodron
Von: paraview-developers-bounces at paraview.org [mailto:paraview-developers-bounces at paraview.org] Im Auftrag von Lodron, Gerald
Gesendet: Mittwoch, 11. Dezember 2013 06:29
An: Burlen Loring
Cc: VTK Developer (vtk-developers at vtk.org); Paraview Developer (Paraview-developers at paraview.org)
Betreff: Re: [Paraview-developers] [Paraview] WG: endless loop in vtkOpenGLError

Hi

Hi

For me it is important that my updated internal libraries run again and with that trick they do, may someone of the Paraview Community can try to reproduce the issue, it seems that it does not appear on VTK6.0.0. Since I am also programming in CUDA I have always updated drivers, so normally this should not be the reason....

Thanks for the hint and help, best regards,
Gerald


Von: Burlen Loring [mailto:burlen.loring at gmail.com]
Gesendet: Dienstag, 10. Dezember 2013 17:48
An: Lodron, Gerald
Cc: VTK Developer (vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>); (vtkusers at vtk.org<mailto:vtkusers at vtk.org>)
Betreff: Re: AW: [Paraview] WG: endless loop in vtkOpenGLError

Hi Gerald,

It sounds like in your situation the underlying rendering context either isn't properly initialized or is getting scrambled. I couldn't reproduce the infinite loop you mentioned, it's probably a driver specific symptom when the interactor is used uninitialized. Your best bet is to initialize the interactor before doing any rendering. I'm not an authority on the use of this class but the examples I looked at all did this.

ParaView is using the VTK master branch which has the gl error checking. VTK 6 doesn't have those changes.

Burlen
On 12/10/2013 01:19 AM, Lodron, Gerald wrote:
Hi

I am currently compiling vtk6-0-0 to check it but thanks for the hint of the test. I looked at it and copied the code to my test, and it worked. I found out that the endless loop also appears on the test if you add

  view->GetRenderer()->Render();

before

    view ->GetInteractor()->Initialize();

if you use
view->GetRendererWindow()->Render();
instead of
  view->GetRenderer()->Render();
it does not appear, strange behaviour...... I will test it in vtk6 when I compiled it, but for me it seems that pv 4.1 has a newer vtk version than 6.0 since all the SetInput functions were missing...

thanks
best regards,


Von: Burlen Loring [mailto:burlen.loring at gmail.com]
Gesendet: Montag, 09. Dezember 2013 22:25
An: Lodron, Gerald; Paraview Developer (Paraview-developers at paraview.org<mailto:Paraview-developers at paraview.org>); Paraview User (paraview at paraview.org<mailto:paraview at paraview.org>)
Betreff: Re: [Paraview] WG: endless loop in vtkOpenGLError

Hi Gerald,

your example isn't complete, also I had to make some substantial changes(based on the TestLinePlot.cxx ctest) it to get it to work. At any rate, to figure out if you're problem is self inflicted or not, to keep this simple use VTK and not PV for now, cd into a VTK build and run the following command:

ctest -R TestLinePlot --verbose

if those tests pass, then you can use TestLinePlot.cxx as an example of how it should be done. If they fail then that's something we can work with. report the test output from one of the failing tests. Once you figure out exactly what's going on, then try using VTK that's in PV.

Thanks
Burlen
On 12/09/2013 12:19 AM, Lodron, Gerald wrote:
vtkContextView* poContextView = vtkContextView::New();
    poContextView->GetRenderer()->SetBackground(1.0, 1.0, 1.0);

    vtkChartXY* poChart = vtkChartXY::New();
    poChart->GetAxis(1)->SetTitle( "xaxis" );
    poChart->GetAxis(0)->SetTitle( "yaxis" );
    poChart->SetTitle( "Title" );

    poContextView->GetScene()->AddItem(poChart);

    // Create a poTable with some points in it...
    vtkTable* poTable = vtkTable::New();

    vtkSmartPointer<vtkDoubleArray> oXAxis = vtkSmartPointer<vtkDoubleArray>::New();
    oXAxis->SetName("xaxis");
        poTable->AddColumn(oXAxis);

    //poTable->AddColumn(oXAxis);

    vtkSmartPointer<vtkDoubleArray> oPositionlot = vtkSmartPointer<vtkDoubleArray>::New();

    oPositionlot->SetName( "Data0" );
    poTable->AddColumn(oPositionlot);


    poTable->SetNumberOfRows( 10 );

    poContextView->GetRenderWindow()->SetMultiSamples(0);

    poTable->GetColumn(0)->SetName("col1");
    for ( size_t nRow = 0; nRow < 10; ++nRow )
    {
        poTable->SetValue(nRow, 0, 1);
    }

    vtkPlot * poPlot = poChart->AddPlot(vtkChart::LINE);
    poPlot->SetInputData(poTable, 0, 0);
    //poPlot->SetInput(m_poTable, 0, nColumn);
    poPlot->SetColor( 1, 0, 0, 1 );
    poPlot->SetWidth( 1 );
    poPlot->GetPen()->SetLineType(1);

     poContextView->GetRenderer()->Render();
     poContextView->GetInteractor()->Initialize();
    poContextView->GetInteractor()->Start();


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20140219/308646fd/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20140219/308646fd/attachment-0001.txt>


More information about the vtk-developers mailing list