crocodile wrote: ↑14 Jan 2023, 19:11
1, this thread is not looking for help, the topic is "Error reporting is meaningless"
and u know its meaningless becaaaause??? because uve found out whats actually causing the error and have determined it wasnt due to an "Invalid read/write"? as far as i understood, u have no clue whatsoever whats causing the crashes. so how did u figure the error message was meaningless? because it doesnt point to the exact place where the error occurred? it doesnt have to. in fact, in some cases, particularly if
you are for example trampling memory u shouldnt be touching or are misusing APIs which in turn mangle memory regions due to your having passed incorrect parameters(eg sizes, buffer lengths, char counts, etc), the damage done need not be immediately apparent. it may be only much later, whenever something ends up needing to touch the trampled memory region that the error may or may not manifest itself
2, I can't use this complicated process to debug ahk code. If all AutoHotkey users have to master this complex debugging method to use AutoHotkey, then I will try it.
¯\_(ツ)_/¯ complicated scripts, complicated debugging processes. u can try cutting parts out of script and testing them in isolation(using whichever methods u happen to like), but ud waste a whole lot more time doing that. and in the end its not even guaranteed ud find anything anyway
3, even if I use this complex debugging process, I am skeptical that the problem will be reproduced in a debug environment.
¯\_(ツ)_/¯ u can be skeptical all u like, i cant help with that. im not here to convince anyone
4, I accept that my AutoHotkey crashes directly or reports an "unknown error", but I can't accept "Invalid memory read/write".
why? the error is the same in all cases -
STATUS_ACCESS_VIOLATION 0xC0000005. it says "Invalid memory read/write" because in the grand majority of cases that is what would be causing such an error. for the end-user, this error message is simple and understandable. "unknown error" is not, its even more meaningless. and ur first preference of ignoring the error and letting ahk crash silently is completely unacceptable as a default behavior in a language that allows u to DllCall any random shit u may think of and fiddle with memory any which way u like. in
your scripts, u may override this behavior with ur own custom onerror handler if u dont like seeing the error dialog that much, eg:
Code: Select all
OnError((Thrown, Mode) => Mode == 'ExitApp')