{"action":"created","issue":{"url":"https://api.github.com/repos/alexrj/Slic3r/issues/3540","repository_url":"https://api.github.com/repos/alexrj/Slic3r","labels_url":"https://api.github.com/repos/alexrj/Slic3r/issues/3540/labels{/name}","comments_url":"https://api.github.com/repos/alexrj/Slic3r/issues/3540/comments","events_url":"https://api.github.com/repos/alexrj/Slic3r/issues/3540/events","html_url":"https://github.com/alexrj/Slic3r/issues/3540","id":184369990,"number":3540,"title":"Ubuntu 16.10 segmentation fault when plater is displayed on 1.3.0-dev","user":{"login":"mloebl","id":309719,"avatar_url":"https://avatars.githubusercontent.com/u/309719?v=3","gravatar_id":"","url":"https://api.github.com/users/mloebl","html_url":"https://github.com/mloebl","followers_url":"https://api.github.com/users/mloebl/followers","following_url":"https://api.github.com/users/mloebl/following{/other_user}","gists_url":"https://api.github.com/users/mloebl/gists{/gist_id}","starred_url":"https://api.github.com/users/mloebl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mloebl/subscriptions","organizations_url":"https://api.github.com/users/mloebl/orgs","repos_url":"https://api.github.com/users/mloebl/repos","events_url":"https://api.github.com/users/mloebl/events{/privacy}","received_events_url":"https://api.github.com/users/mloebl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-10-21T00:04:01Z","updated_at":"2016-11-13T23:27:50Z","closed_at":null,"body":"### Version\n\n_1.3.0-dev_\n\nGit describe:\n_1.2.9-367-g8910b49_\n### Operating system type + version\n\n_Ubuntu 16.10 x64_\n### Behavior\n- Segmentation fault launching with plater \n- Running in any mode that shows the plater\n  - if I start with --no-plater it starts up ok\n  - I think it may be an opengl related issue \n  -  Precompiled linux binary of 1.2.9 works fine \n  -  Worked fine on 16.04 before I upgraded to 16.10 and installed latest Nvidia driver 370.28 (done at same time)\n  -  no errors during build, here's gui build output: \n\nApp::cpanminus is up to date. (1.7042)\nClass::Accessor is up to date. (0.34)\nGrowl::GNTP is up to date. (0.21)\nLWP::UserAgent is up to date. (6.15)\nNet::Bonjour is up to date. (0.96)\nOpenGL is up to date. (0.70)\nSocket is up to date. (2.024)\nWx is up to date. (0.9928)\nWx::GLCanvas is up to date. (0.09)\n- End of output from trace:\n\n> > (eval 254)[/usr/local/lib/x86_64-linux-gnu/perl/5.22.2/OpenGL.pm:6194]:1: sub OpenGL::GL_TRIANGLES { 4 }\n> > /usr/share/perl5/Class/Accessor.pm:175:         my $self = shift;\n> > /usr/share/perl5/Class/Accessor.pm:177:         if(@_) {\n> > /usr/share/perl5/Class/Accessor.pm:180:             return $self->get($field);\n> > /usr/share/perl5/Class/Accessor.pm:158:     my $self = shift;\n> > /usr/share/perl5/Class/Accessor.pm:160:     if(@_ == 1) {\n> > /usr/share/perl5/Class/Accessor.pm:161:         return $self->{$_[0]};\n\nThis is where it segfaults\n"},"comment":{"url":"https://api.github.com/repos/alexrj/Slic3r/issues/comments/260221472","html_url":"https://github.com/alexrj/Slic3r/issues/3540#issuecomment-260221472","issue_url":"https://api.github.com/repos/alexrj/Slic3r/issues/3540","id":260221472,"user":{"login":"lordofhyphens","id":31754,"avatar_url":"https://avatars.githubusercontent.com/u/31754?v=3","gravatar_id":"","url":"https://api.github.com/users/lordofhyphens","html_url":"https://github.com/lordofhyphens","followers_url":"https://api.github.com/users/lordofhyphens/followers","following_url":"https://api.github.com/users/lordofhyphens/following{/other_user}","gists_url":"https://api.github.com/users/lordofhyphens/gists{/gist_id}","starred_url":"https://api.github.com/users/lordofhyphens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordofhyphens/subscriptions","organizations_url":"https://api.github.com/users/lordofhyphens/orgs","repos_url":"https://api.github.com/users/lordofhyphens/repos","events_url":"https://api.github.com/users/lordofhyphens/events{/privacy}","received_events_url":"https://api.github.com/users/lordofhyphens/received_events","type":"User","site_admin":false},"created_at":"2016-11-13T23:27:50Z","updated_at":"2016-11-13T23:27:50Z","body":"Looks like commit e7bf734b1295e6196675c40374f963df6b6f9513 in OpenGL.pm is the first one that breaks things, which changed several bind calls.\r\n\r\nI am unsure at present what (if anything) Slic3r is doing wrong. \r\n\r\nHere's the diff: \r\n````\r\nAuthor: Bob Free <bfree@graphcomp.com>  2015-06-10 01:26:05\r\nCommitter: Christian Walde <walde.christian@googlemail.com>  2016-09-27 12:43:05\r\nParent: 0596a1796d3115070b90cef6de10ed79648174cf (improve the safety of some pointer handling)\r\nBranches: master, remotes/origin/bleeding, remotes/origin/master, remotes/origin/questionable_glutclose_fix, remotes/origin/rel\r\nFollows: OpenGL-0.6704\r\nPrecedes: OpenGL-0.6704_91, bleeding-0.67048\r\n\r\n    allow all glBindBuffer uses by GL2.0 instead of ARB_vertex_buffer_object\r\n\r\n----------------------------- pogl_gl_Accu_GetM.xs -----------------------------\r\nindex ac3ba1a..fe622e0 100644\r\n@@ -393,15 +393,18 @@ glColorPointer_p(size, oga)\r\n \tOpenGL::Array oga\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglColorPointer(size, oga->types[0], 0, oga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglColorPointer(size, oga->types[0], 0, oga->data);\r\n #endif\r\n+\t\tglColorPointer(size, oga->types[0], 0, data);\r\n \t}\r\n \r\n #endif\r\n@@ -793,15 +796,18 @@ glEdgeFlagPointer_p(oga)\r\n \tOpenGL::Array oga\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglEdgeFlagPointer(0, oga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglEdgeFlagPointer(0, oga->data);\r\n #endif\r\n+\t\tglEdgeFlagPointer(0, data);\r\n \t}\r\n \r\n #endif\r\n\r\n----------------------------- pogl_gl_GetP_Pass.xs -----------------------------\r\nindex 73353aa..213e518 100644\r\n@@ -751,15 +751,18 @@ glIndexPointer_p(oga)\r\n \tOpenGL::Array oga\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglIndexPointer(oga->types[0], 0, oga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglIndexPointer(oga->types[0], 0, oga->data);\r\n #endif\r\n+\t\tglIndexPointer(oga->types[0], 0, data);\r\n \t}\r\n \r\n #endif\r\n@@ -1533,15 +1536,18 @@ glNormalPointer_p(oga)\r\n \tOpenGL::Array oga\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglNormalPointer(oga->types[0], 0, oga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglNormalPointer(oga->types[0], 0, oga->data);\r\n #endif\r\n+\t\tglNormalPointer(oga->types[0], 0, data);\r\n \t}\r\n \r\n #endif\r\n\r\n----------------------------- pogl_gl_Pixe_Ver2.xs -----------------------------\r\nindex 0f1c406..0622756 100644\r\n@@ -685,15 +685,18 @@ glTexCoordPointer_p(size, oga)\r\n \tOpenGL::Array oga\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglTexCoordPointer(size, oga->types[0], 0, oga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglTexCoordPointer(size, oga->types[0], 0, oga->data);\r\n #endif\r\n+\t\tglTexCoordPointer(size, oga->types[0], 0, data);\r\n \t}\r\n \r\n #endif\r\n@@ -1486,15 +1489,18 @@ glVertexPointer_p(size, oga)\r\n \tOpenGL::Array oga\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglVertexPointer(size, oga->types[0], 0, oga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglVertexPointer(size, oga->types[0], 0, oga->data);\r\n #endif\r\n+\t\tglVertexPointer(size, oga->types[0], 0, data);\r\n \t}\r\n \r\n #endif\r\n\r\n---------------------------- pogl_gl_Vert_Multi.xs ----------------------------\r\nindex cffd5a8..5392ffb 100644\r\n@@ -97,17 +97,18 @@ glVertexPointerEXT_p(size, oga)\r\n \t\tloadProc(glVertexPointerEXT,\"glVertexPointerEXT\");\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglVertexPointerEXT(size, oga->types[0], 0, oga->item_count/size,\r\n-\t\t\toga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglVertexPointerEXT(size, oga->types[0], 0, oga->item_count/size,\r\n-\t\t\toga->data);\r\n #endif\r\n+\t\tglVertexPointerEXT(size, oga->types[0], 0, oga->item_count/size, data);\r\n \t}\r\n \r\n #//# glNormalPointerEXT_c($type, $stride, $count, (CPTR)pointer);\r\n@@ -146,17 +147,18 @@ glNormalPointerEXT_p(oga)\r\n \t\tloadProc(glNormalPointerEXT,\"glNormalPointerEXT\");\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglNormalPointerEXT(oga->types[0], 0, oga->item_count/3,\r\n-\t\t\toga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglNormalPointerEXT(oga->types[0], 0, oga->item_count/3,\r\n-\t\t\toga->data);\r\n #endif\r\n+\t\tglNormalPointerEXT(oga->types[0], 0, oga->item_count/3, data);\r\n \t}\r\n \r\n #//# glColorPointerEXT_c($size, $type, $stride, $count, (CPTR)pointer);\r\n@@ -198,17 +200,18 @@ glColorPointerEXT_p(size, oga)\r\n \t\tloadProc(glColorPointerEXT,\"glColorPointerEXT\");\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglColorPointerEXT(size, oga->types[0], 0, oga->item_count/size,\r\n-\t\t\toga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglColorPointerEXT(size, oga->types[0], 0, oga->item_count/size,\r\n-\t\t\toga->data);\r\n #endif\r\n+\t\tglColorPointerEXT(size, oga->types[0], 0, oga->item_count/size, data);\r\n \t}\r\n \r\n #//# glIndexPointerEXT_c($type, $stride, $count, (CPTR)pointer);\r\n@@ -247,17 +250,18 @@ glIndexPointerEXT_p(oga)\r\n \t\tloadProc(glIndexPointerEXT,\"glIndexPointerEXT\");\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglIndexPointerEXT(oga->types[0], 0, oga->item_count,\r\n-\t\t\toga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglIndexPointerEXT(oga->types[0], 0, oga->item_count,\r\n-\t\t\toga->data);\r\n #endif\r\n+\t\tglIndexPointerEXT(oga->types[0], 0, oga->item_count, data);\r\n \t}\r\n \r\n #//# glTexCoordPointerEXT_c($size, $type, $stride, $count, (CPTR)pointer);\r\n@@ -299,17 +303,18 @@ glTexCoordPointerEXT_p(size, oga)\r\n \t\tloadProc(glTexCoordPointerEXT,\"glTexCoordPointerEXT\");\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglTexCoordPointerEXT(size, oga->types[0], 0, oga->item_count/size,\r\n-\t\t\toga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglTexCoordPointerEXT(size, oga->types[0], 0, oga->item_count/size,\r\n-\t\t\toga->data);\r\n #endif\r\n+\t\tglTexCoordPointerEXT(size, oga->types[0], 0, oga->item_count/size, data);\r\n \t}\r\n \r\n #//# glEdgeFlagPointerEXT_c($stride, $count, (CPTR)pointer);\r\n@@ -346,15 +351,18 @@ glEdgeFlagPointerEXT_p(oga)\r\n \t\tloadProc(glEdgeFlagPointerEXT,\"glEdgeFlagPointerEXT\");\r\n \tCODE:\r\n \t{\r\n-#ifdef GL_ARB_vertex_buffer_object\r\n+\t\tGLvoid * data = oga->data;\r\n+#ifdef GL_VERSION_2_0\r\n+\t\tglBindBuffer(GL_ARRAY_BUFFER, oga->bind);\r\n+\t\tdata = NULL;\r\n+#elif defined(GL_ARB_vertex_buffer_object)\r\n \t\tif (testProc(glBindBufferARB,\"glBindBufferARB\"))\r\n \t\t{\r\n \t\t\tglBindBufferARB(GL_ARRAY_BUFFER_ARB, oga->bind);\r\n+\t\t\tdata = NULL;\r\n \t\t}\r\n-\t\tglEdgeFlagPointerEXT(0, oga->item_count, oga->bind ? 0 : oga->data);\r\n-#else\r\n-\t\tglEdgeFlagPointerEXT(0, oga->item_count, oga->data);\r\n #endif\r\n+\t\tglEdgeFlagPointerEXT(0, oga->item_count, data);\r\n \t}\r\n \r\n #endif // GL_EXT_vertex_array\r\n````"}}
{"actor":{"display_login":"lordofhyphens"}}