Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS when iterating through verticies in ofMesh #68

Open
virusys opened this issue Dec 26, 2021 · 0 comments
Open

EXC_BAD_ACCESS when iterating through verticies in ofMesh #68

virusys opened this issue Dec 26, 2021 · 0 comments

Comments

@virusys
Copy link

virusys commented Dec 26, 2021

Hi there, lately when I try to iterate through the list of vertices in an ofMesh object, I will get crashes.

Please refer to the attached sample project files:
lua mesh test.zip

Here is the offending block of code in the draw function:

function M.draw()
   M.cam:beginCamera()
   if isPlaying == true then
      local t = timing.beatTickNorm('16b')

      ofSetColor(0, 255, 255, 255)
      --      vbo:draw(GL_LINE_LOOP, 1, vbo:getNumVertices())
      for i=0, mesh:getNumVertices() do
-- crashes here
         local test = mesh:getVertex(i)
      end
      mesh:draw()
   end
   M.cam:endCamera()
end

And the crash log:

pd_2021-12-26-125449_BLOOPITY2.log

Is there a specific way I should be using to look at vertices of ofMesh objects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant