From: Eduardo DAVILA Date: Thu, 28 Jul 2022 09:54:01 +0000 (+0200) Subject: #3251 Bug with segmentation fault with VTK 9.2 ( SupportsOpenGL ) X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f2dedff80da1e1f29aa544eb396d6e4c2b801d7d;p=bbtkGEditor.git #3251 Bug with segmentation fault with VTK 9.2 ( SupportsOpenGL ) --- diff --git a/appli/bbEditor/bbEditor.cxx b/appli/bbEditor/bbEditor.cxx index 4bbc842..affb5a2 100644 --- a/appli/bbEditor/bbEditor.cxx +++ b/appli/bbEditor/bbEditor.cxx @@ -129,13 +129,16 @@ bool wxBBEditorApp::OnCmdLineParsed(wxCmdLineParser& parser) #define GL_MAJOR_VERSION 0x821B #define GL_MINOR_VERSION 0x821C + bool wxBBEditorApp::OnInit( ) { - vtkRenderWindow *renWin = vtkRenderWindow::New(); + + printf("EED wxBBEditorApp::OnInit >>>>> vtkRenderWindow IsDirect %d\n", renWin->IsDirect() ); + +/* EED 2022-07-26 Segmentation fault with VTK9.2 in MacOs int supportopengl=renWin->SupportsOpenGL(); printf("EED wxBBEditorApp::OnInit >>>>> vtkRenderWindow SupportsOpenGL %d\n", supportopengl ); - printf("EED wxBBEditorApp::OnInit >>>>> vtkRenderWindow IsDirect %d\n", renWin->IsDirect() ); renWin->Delete(); if (supportopengl==0) { @@ -147,7 +150,7 @@ bool wxBBEditorApp::OnInit( ) wxMessageBox(message); exit(0); } - +*/ vtkOutputWindowbbGEditor *vtkoutputwindowbbgeditor= vtkOutputWindowbbGEditor::New(); vtkOutputWindow::SetInstance( vtkoutputwindowbbgeditor ); @@ -188,7 +191,6 @@ bool wxBBEditorApp::OnInit( ) iegbbs->OpenBBS(input_file[i], input_file[i]); } } - return true; } diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index cf2315f..e839044 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -74,7 +74,6 @@ namespace bbtk { wxVtkSceneManager::wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager,Factory::Pointer bbtkfactory) { - _cbName = "ComplexBoxName"; _cbPackageName = "PackageName"; _Author = "Author ??"; @@ -111,7 +110,6 @@ wxVtkSceneManager::wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView } _idConnectionInCreation = -1; _contLastId = 0; - } //========================================================================= @@ -235,6 +233,7 @@ void wxVtkSceneManager::configureBaseView() _fillObjectActor->GetProperty()->SetOpacity(0); _aPolygonMapper->Modified(); _baseView->GetRenderer()->AddActor(_fillObjectActor); + } //=========================================================================