{"action":"created","issue":{"url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1390","labels_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1390/labels{/name}","comments_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1390/comments","events_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1390/events","html_url":"https://github.com/PointCloudLibrary/pcl/issues/1390","id":112260689,"number":1390,"title":"OSX VTK6 PCLVisualizer::wasStopped() behavior ","user":{"login":"SergioRAgostinho","id":1709142,"avatar_url":"https://avatars.githubusercontent.com/u/1709142?v=3","gravatar_id":"","url":"https://api.github.com/users/SergioRAgostinho","html_url":"https://github.com/SergioRAgostinho","followers_url":"https://api.github.com/users/SergioRAgostinho/followers","following_url":"https://api.github.com/users/SergioRAgostinho/following{/other_user}","gists_url":"https://api.github.com/users/SergioRAgostinho/gists{/gist_id}","starred_url":"https://api.github.com/users/SergioRAgostinho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergioRAgostinho/subscriptions","organizations_url":"https://api.github.com/users/SergioRAgostinho/orgs","repos_url":"https://api.github.com/users/SergioRAgostinho/repos","events_url":"https://api.github.com/users/SergioRAgostinho/events{/privacy}","received_events_url":"https://api.github.com/users/SergioRAgostinho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-10-20T00:41:29Z","updated_at":"2015-11-18T09:21:28Z","closed_at":null,"body":"Hi all, \r\n\r\n```PCLVisualizer::wasStopped()``` is described in the [documentation](http://docs.pointclouds.org/trunk/classpcl_1_1visualization_1_1_p_c_l_visualizer.html#a74c66157950fed442b8b2b9196936b15) as \"Returns ```true``` when the user tried to close the window.\". From various comments around the web, the intended behaviour seems to be for the method to return true when the user presses the 'x' corner button of the window.  \r\n\r\nI'm working with OS X 10.10 and vtk6.2 and this is not working for me. When I close the window, ```PCLVisualizer::wasStopped()``` still returns ```false``` and my console then get's polluted with the following message\r\n\r\n```\r\nERROR: In /tmp/vtk20150617-7180-8mym6w/VTK-6.2.0/Rendering/OpenGL/vtkOpenGLPolyDataMapper2D.cxx, line 442\r\nvtkOpenGLPolyDataMapper2D (0x7fe94bd15170): failed after RenderOverlay 1 OpenGL errors detected\r\n  0 : (1286) Invalid framebuffer operation\r\n````\r\nAfter some digging I found this mention in VTK's documentation for [vtkRenderWindow::IsDrawable()](http://www.vtk.org/doc/nightly/html/classvtkRenderWindow.html#a1c220caf00768e887eaf8f0496ab4696) acknowledging the issue with Cocoa. \r\nI managed to correct this behavior by getting the smart pointer to the ```vtkRenderWindow``` and adding the additional check to ```vtkRenderWindow::IsDrawable()```.\r\n\r\nWould it not be best to add this additional check into ```PCLVisualizer::wasStopped()```?\r\n\r\nMy tests were limited to console apps. \r\n"},"comment":{"url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/comments/157653018","html_url":"https://github.com/PointCloudLibrary/pcl/issues/1390#issuecomment-157653018","issue_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1390","id":157653018,"user":{"login":"VictorLamoine","id":5566160,"avatar_url":"https://avatars.githubusercontent.com/u/5566160?v=3","gravatar_id":"","url":"https://api.github.com/users/VictorLamoine","html_url":"https://github.com/VictorLamoine","followers_url":"https://api.github.com/users/VictorLamoine/followers","following_url":"https://api.github.com/users/VictorLamoine/following{/other_user}","gists_url":"https://api.github.com/users/VictorLamoine/gists{/gist_id}","starred_url":"https://api.github.com/users/VictorLamoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VictorLamoine/subscriptions","organizations_url":"https://api.github.com/users/VictorLamoine/orgs","repos_url":"https://api.github.com/users/VictorLamoine/repos","events_url":"https://api.github.com/users/VictorLamoine/events{/privacy}","received_events_url":"https://api.github.com/users/VictorLamoine/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T09:21:28Z","updated_at":"2015-11-18T09:21:28Z","body":"Oh you're right!"}}