Skip to content

vs2022 Debug mode error #3959

Answered by Fedr
Gihong-Yim asked this question in Q&A
Jan 13, 2025 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

As far as I can see, your program crashes in

 uint* uiIndices = new uint[pstMeshInArchive->uiNumIndice];
...
 for (int i = 0; i < pstMeshInArchive->uiNumPrimitives; i++) 
 {
     indexList.push_back(ThreeVertIds{ VertId(uiIndices[i * 3 + 0]), VertId(uiIndices[i * 3 + 1]), VertId(uiIndices[i * 3 + 2]) });
 }

and here there are no MeshLib calls actually.

Most probably, you read out-of-range in uiIndices[i * 3 + 2]. Please verify that

3 * pstMeshInArchive->uiNumPrimitives <= pstMeshInArchive->uiNumIndice

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Gihong-Yim
Comment options

@Gihong-Yim
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Gihong-Yim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants