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:
Code: Select all
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 359 C++
AutoHotkey64.exe!heap_alloc_dbg(const unsigned __int64 size, const int block_use, const char * const file_name, const int line_number) Line 450 C++
AutoHotkey64.exe!_malloc_dbg(unsigned __int64 size, int block_use, const char * file_name, int line_number) Line 496 C++
AutoHotkey64.exe!malloc(unsigned __int64 size) Line 27 C++
[External Code]
AutoHotkey64.exe!CKuStringT<char,CKuStringUtilA>::New(bool bCopy) Line 406 C++
AutoHotkey64.exe!CKuStringT<char,CKuStringUtilA>::GetBuffer() Line 549 C++
AutoHotkey64.exe!CKuStringT<char,CKuStringUtilA>::GetBufferSetLength(__int64 len) Line 555 C++
AutoHotkey64.exe!StringWCharToUTF8(const wchar_t * sWChar, CKuStringT<char,CKuStringUtilA> & sUTF8, int iChars) Line 49 C++
AutoHotkey64.exe!CStringUTF8FromWChar::CStringUTF8FromWChar(const wchar_t * sWChar, int iChars) Line 58 C++
AutoHotkey64.exe!Debugger::PropertyWriter::BeginProperty(const char * aName, const char * aType, int aNumChildren, void * & aCookie) Line 3015 C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1193 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323 C++
AutoHotkey64.exe!Debugger::PropertyWriter::_WriteProperty(ExprTokenType & aValue, IObject * aThisOverride) Line 2999 C++
AutoHotkey64.exe!Debugger::PropertyWriter::WriteBaseProperty(IObject * aBase) Line 2954 C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1204 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, wchar_t * aName) Line 1346 C++
AutoHotkey64.exe!Debugger::context_get(char * * aArgV, int aArgCount, char * aTransactionId) Line 1090 C++
AutoHotkey64.exe!Debugger::ProcessCommands(const char * aBreakReason) Line 323 C++
AutoHotkey64.exe!Debugger::PreExecLine(Line * aLine) Line 190 C++
AutoHotkey64.exe!Line::ExecUntil(ExecUntilMode aMode, ResultToken * aResultToken, Line * * apJumpToLine) Line 9602 C++
AutoHotkey64.exe!UserFunc::Execute(ResultToken * aResultToken) Line 1622 C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount, FreeVars * aUpVars) Line 2056 C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount) Line 1796 C++
AutoHotkey64.exe!Func::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 2568 C++
AutoHotkey64.exe!Object::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 638 C++
AutoHotkey64.exe!Debugger::PropertyWriter::WriteDynamicProperty(wchar_t * aName) Line 2963 C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1221 C++
------------ the following part repeats for a long while
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, wchar_t * aName) Line 1346 C++
AutoHotkey64.exe!Debugger::context_get(char * * aArgV, int aArgCount, char * aTransactionId) Line 1090 C++
AutoHotkey64.exe!Debugger::ProcessCommands(const char * aBreakReason) Line 323 C++
AutoHotkey64.exe!Debugger::PreExecLine(Line * aLine) Line 190 C++
AutoHotkey64.exe!Line::ExecUntil(ExecUntilMode aMode, ResultToken * aResultToken, Line * * apJumpToLine) Line 9602 C++
AutoHotkey64.exe!UserFunc::Execute(ResultToken * aResultToken) Line 1622 C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount, FreeVars * aUpVars) Line 2056 C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount) Line 1796 C++
AutoHotkey64.exe!Func::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 2568 C++
AutoHotkey64.exe!Object::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 638 C++
AutoHotkey64.exe!Debugger::PropertyWriter::WriteDynamicProperty(wchar_t * aName) Line 2963 C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1221 C++
---------------
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, wchar_t * aName) Line 1346 C++
AutoHotkey64.exe!Debugger::context_get(char * * aArgV, int aArgCount, char * aTransactionId) Line 1090 C++
AutoHotkey64.exe!Debugger::ProcessCommands(const char * aBreakReason) Line 323 C++
AutoHotkey64.exe!Debugger::PreExecLine(Line * aLine) Line 190 C++
AutoHotkey64.exe!Line::ExecUntil(ExecUntilMode aMode, ResultToken * aResultToken, Line * * apJumpToLine) Line 9602 C++
AutoHotkey64.exe!UserFunc::Execute(ResultToken * aResultToken) Line 1622 C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount, FreeVars * aUpVars) Line 2056 C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount) Line 1796 C++
AutoHotkey64.exe!Func::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 2568 C++
AutoHotkey64.exe!Object::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 638 C++
AutoHotkey64.exe!Debugger::PropertyWriter::WriteDynamicProperty(wchar_t * aName) Line 2963 C++
AutoHotkey64.exe!Object::DebugWriteProperty(IDebugProperties * aDebugger, int aPage, int aPageSize, int aDepth) Line 1221 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, IObject * aObject) Line 1177 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp) Line 1323 C++
AutoHotkey64.exe!Debugger::WritePropertyXml(Debugger::PropertyInfo & aProp, wchar_t * aName) Line 1346 C++
AutoHotkey64.exe!Debugger::context_get(char * * aArgV, int aArgCount, char * aTransactionId) Line 1090 C++
AutoHotkey64.exe!Debugger::ProcessCommands(const char * aBreakReason) Line 323 C++
AutoHotkey64.exe!Debugger::PreExecLine(Line * aLine) Line 190 C++
AutoHotkey64.exe!Line::ExecUntil(ExecUntilMode aMode, ResultToken * aResultToken, Line * * apJumpToLine) Line 9602 C++
AutoHotkey64.exe!UserFunc::Execute(ResultToken * aResultToken) Line 1622 C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount, FreeVars * aUpVars) Line 2056 C++
AutoHotkey64.exe!UserFunc::Call(ResultToken & aResultToken, ExprTokenType * * aParam, int aParamCount) Line 1796 C++
AutoHotkey64.exe!Func::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 2568 C++
AutoHotkey64.exe!Object::Invoke(ResultToken & aResultToken, int aFlags, wchar_t * aName, ExprTokenType & aThisToken, ExprTokenType * * aParam, int aParamCount) Line 638 C++
The maximum number of stack frames supported by Visual Studio has been exceeded.
, 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...