Open k-specht opened 4 years ago
Checked every array-indexed access line, still can't find evidence of heap corruption. Crashes happen much less now, so maybe I fixed something? VSC won't allow me to create memory dumps to debug any of this, so this issue might remain open forever.
The crashes are actually external libraries crashing from what I've noticed, and they do not appear critical to rendering since they can be ignored. However, I still don't like the presence of a memory heap corruption error every now and then, so I'll keep looking into this issue as the project develops.
What's interesting is that you'd expect this to be consistent; it's using the same math to divide every time so if it goes out of bounds in one iteration the other ones should also crash.
The issue likely lies with the Sphere::Divide() method and the fact that it is emptying the vertex/index vector, since this issue appeared once I introduced the new division system.