I ran AutoHotkey.exe in debug mode in Visual Studio + the script in debug mode in VSCode with vscode-autohotkey-debug (attach mode), and the stack before the crash was the following:
and the final error occurred in C:\Program Files (x86)\Windows Kits\10\Source\10.0.22621.0\ucrt\heap\debug_heap.cpp at line 359 _CrtMemBlockHeader* const header{static_cast<_CrtMemBlockHeader*>(HeapAlloc(__acrt_heap, 0, block_size))};
When I added the following lines here before the return
then the output was as follows:
I tried get => FileAppend("a", "*") instead of get => 1, but the line wasn't executed.
Hopefully this is of some help, and I'll try to debug this further when I get some free time...
CODE:
ntdll.dll!00007ff949cbb3c2()Unknown
>AutoHotkey64.exe!heap_alloc_dbg_internal(const unsigned __int64 size, const int block_use, const char * const file_name, const int line_number) Line 359C++
AutoHotkey64.exe!heap_alloc_dbg(const unsigned __int64 size, const int block_use, const char * const file_name, const int line_number) Line 450C++
AutoHotkey64.exe!_malloc_dbg(unsigned __int64 size, int block_use, const char * file_name, int line_number) Line 496C++
AutoHotkey64.exe!malloc(unsigned __int64 size) Line 27C++
[External Code]
AutoHotkey64.exe!CKuStringT<char,CKuStringUtilA>::New(bool bCopy) Line 406C++
AutoHotkey64.exe!CKuStringT<char,CKuStringUtilA>::GetBuffer() Line 549C++
AutoHotkey64.exe!CKuStringT<char,CKuStringUtilA>::GetBufferSetLength(__int64 len) Line 555C++
AutoHotkey64.exe!StringWCharToUTF8(const wchar_t * sWChar, CKuStringT<char,CKuStringUtilA> & sUTF8, int iChars) Line 49C++
AutoHotkey64.exe!CStringUTF8FromWChar::CStringUTF8FromWChar(const wchar_t * sWChar, int iChars) Line 58C++
AutoHotkey64.exe!Debugger::PropertyWriter::BeginProperty(const char * aName, const char * aType, int aNumChildren, void * & aCookie) Line 3015C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1193C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323C++
AutoHotkey64.exe!Debugger::PropertyWriter::_WriteProperty(ExprTokenType & aValue, IObject * aThisOverride) Line 2999C++
AutoHotkey64.exe!Debugger::PropertyWriter::WriteBaseProperty(IObject * aBase) Line 2954C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1204C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, wchar_t * aName) Line 1346C++
AutoHotkey64.exe!Debugger::context_get(char * * aArgV, int aArgCount, char * aTransactionId) Line 1090C++
AutoHotkey64.exe!Debugger::ProcessCommands(const char * aBreakReason) Line 323C++
AutoHotkey64.exe!Debugger::PreExecLine(Line * aLine) Line 190C++
AutoHotkey64.exe!Line::ExecUntil(ExecUntilMode aMode, ResultToken * aResultToken, Line * * apJumpToLine) Line 9602C++
AutoHotkey64.exe!UserFunc::Execute(ResultToken * aResultToken) Line 1622C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount, FreeVars * aUpVars) Line 2056C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount) Line 1796C++
AutoHotkey64.exe!Func::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 2568C++
AutoHotkey64.exe!Object::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 638C++
AutoHotkey64.exe!Debugger::PropertyWriter::WriteDynamicProperty(wchar_t * aName) Line 2963C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1221C++
------------ the following part repeats for a long while
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, wchar_t * aName) Line 1346C++
AutoHotkey64.exe!Debugger::context_get(char * * aArgV, int aArgCount, char * aTransactionId) Line 1090C++
AutoHotkey64.exe!Debugger::ProcessCommands(const char * aBreakReason) Line 323C++
AutoHotkey64.exe!Debugger::PreExecLine(Line * aLine) Line 190C++
AutoHotkey64.exe!Line::ExecUntil(ExecUntilMode aMode, ResultToken * aResultToken, Line * * apJumpToLine) Line 9602C++
AutoHotkey64.exe!UserFunc::Execute(ResultToken * aResultToken) Line 1622C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount, FreeVars * aUpVars) Line 2056C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount) Line 1796C++
AutoHotkey64.exe!Func::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 2568C++
AutoHotkey64.exe!Object::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 638C++
AutoHotkey64.exe!Debugger::PropertyWriter::WriteDynamicProperty(wchar_t * aName) Line 2963C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1221C++
---------------
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, wchar_t * aName) Line 1346C++
AutoHotkey64.exe!Debugger::context_get(char * * aArgV, int aArgCount, char * aTransactionId) Line 1090C++
AutoHotkey64.exe!Debugger::ProcessCommands(const char * aBreakReason) Line 323C++
AutoHotkey64.exe!Debugger::PreExecLine(Line * aLine) Line 190C++
AutoHotkey64.exe!Line::ExecUntil(ExecUntilMode aMode, ResultToken * aResultToken, Line * * apJumpToLine) Line 9602C++
AutoHotkey64.exe!UserFunc::Execute(ResultToken * aResultToken) Line 1622C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount, FreeVars * aUpVars) Line 2056C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount) Line 1796C++
AutoHotkey64.exe!Func::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 2568C++
AutoHotkey64.exe!Object::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 638C++
AutoHotkey64.exe!Debugger::PropertyWriter::WriteDynamicProperty(wchar_t * aName) Line 2963C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1221C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, wchar_t * aName) Line 1346C++
AutoHotkey64.exe!Debugger::context_get(char * * aArgV, int aArgCount, char * aTransactionId) Line 1090C++
AutoHotkey64.exe!Debugger::ProcessCommands(const char * aBreakReason) Line 323C++
AutoHotkey64.exe!Debugger::PreExecLine(Line * aLine) Line 190C++
AutoHotkey64.exe!Line::ExecUntil(ExecUntilMode aMode, ResultToken * aResultToken, Line * * apJumpToLine) Line 9602C++
AutoHotkey64.exe!UserFunc::Execute(ResultToken * aResultToken) Line 1622C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount, FreeVars * aUpVars) Line 2056C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount) Line 1796C++
AutoHotkey64.exe!Func::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 2568C++
AutoHotkey64.exe!Object::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 638C++
The maximum number of stack frames supported by Visual Studio has been exceeded.
and the final error occurred in C:\Program Files (x86)\Windows Kits\10\Source\10.0.22621.0\ucrt\heap\debug_heap.cpp at line 359 _CrtMemBlockHeader* const header{static_cast<_CrtMemBlockHeader*>(HeapAlloc(__acrt_heap, 0, block_size))};
When I added the following lines here before the return
CODE:
OutputDebugStringA(aProp.fullname);
OutputDebugStringA("\n");
then the output was as follows:
CODE:
<irrelevant data cropped>
Send.<base>
Send
SendMode.<base>
SendMode
Sleep.<base>
Sleep
SomeClass.<base>
SomeClass.__Init
SomeClass.Prototype
this.<base>
this.__Init
this.Prototype
this.<base>
this.__Init
this.Prototype
this.<base>
this.__Init
this.Prototype
this.<base>
this.__Init
... repeating
I tried get => FileAppend("a", "*") instead of get => 1, but the line wasn't executed.
Hopefully this is of some help, and I'll try to debug this further when I get some free time...
Statistics: Posted by Descolada — Today, 14:51