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

Debug Heap exception during Debugging #201

Open
mourendxu opened this issue Jan 24, 2022 · 8 comments
Open

Debug Heap exception during Debugging #201

mourendxu opened this issue Jan 24, 2022 · 8 comments

Comments

@mourendxu
Copy link

mourendxu commented Jan 24, 2022

I am trying to debug some of my objects written using the min dev kit. And I keep getting these debug heap errors, ONLY when starting or exiting Max. Why is this happening? Is there something I am not cleaning up or?

File: minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp
Line: 996

Thank you!

@isabelgk
Copy link
Contributor

Can you give some more information about your system, what the actual error logs are, etc.?

Thanks!

@mourendxu
Copy link
Author

Hi finally got the error again:
Debug Assertion Failed

Program: (my object)
File: minkernel\crts\ucrf\src\appcrf\heap\debug_heap.cpp
Line: 996
Expression: __acrt_first_block == header

@mourendxu
Copy link
Author

Sorry, forgot to add
Windows 10 latest update, Visual Studio 2019 Version 16.11.10

@mourendxu
Copy link
Author

I am also getting exception here, in debug_heap.cpp, Line 1406
extern "C" int __cdecl _CrtIsValidHeapPointer(void const* const block)
{
if (!block)
return FALSE;

return HeapValidate(__acrt_heap, 0, header_from_block(block));

}

@isabelgk
Copy link
Contributor

Thanks for the followup!

To narrow it down to whether this is an issue with the min-api or your particular object, does this error happen when trying to debug any of the min-devkit example objects?

@mourendxu
Copy link
Author

Hi, Thank you for the reply. So, it seems to pop up just running Max in Debug mode in visual studio. I start my debug session with no patch indicated. It loads just Max. And this error popped up several times simply just on initialization. Therefore, I don't think? it's my code. It's not persistent either. After several restarts, it will just go away. Or it will show up when I exit Max. I would close the Max patch, then exit. I see in the console that my object has exited(the destructor has been called).

Does that help? Please let me know if you need info from me.

Thank you.

@isabelgk
Copy link
Contributor

Thanks, yes, that's helpful. What version of Max are you using?

@mourendxu
Copy link
Author

mourendxu commented Feb 21, 2022

I believe I am running the latest, which is 8.2.1.

Thank you.

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

2 participants