Page 1 of 1

Need help debugging AutoHotFlow v1

Posted: 02 May 2018, 14:47
by bichlepa
This appeal for help is addressed to experienced AHK user and AHK developer.

Most of the features in AutoHotFlow v1 are implemented but I am struggling with crashes. I've spent over 30 hours to find and to fix them but can't find the reasons.
I use AHK_H because it allows real multi-threading. Possibly I can't find them because there may be bugs in AHK_H itself.

Please help me to fix the crashes! I really don't want to give up this project!

Quick start:
  • Clone the GitHub project. Use the branch "AutoHotFlow-1.0".
  • Run AutoHotFlow.ahk. It will start the actual process using the AHK-H binary, which is also in the repository.
  • Try to use it. You will see that it will sometimes freeze or crash.
I've updated the document Documentation\Code documentation.odt. You may read it to get a rough idea about the used threads.
If you need more documentation, I'll write it.
If you have hints how I could find the problems on myself, I'll try it.

Re: Need help debugging AutoHotFlow v1

Posted: 19 May 2018, 08:47
by joedf
what line does it crash on?

Re: Need help debugging AutoHotFlow v1

Posted: 19 May 2018, 09:11
by bichlepa
I have no idea on why and on which line it crashes. Sometimes it just hangs up until I kill it. Sometimes I get a message from Windows that AutoHotkey has stopped working.
Most likely it has something to do with multi-threading. Something like dead lock when using critical sections or missing mutex protection when accessing shared critical objects.

Re: Need help debugging AutoHotFlow v1

Posted: 19 May 2018, 13:36
by joedf
If you can, possible document steps to reproduce it otherwise it may be impossible to fix. You could try running it with a debugger?

Re: Need help debugging AutoHotFlow v1

Posted: 20 May 2018, 04:27
by bichlepa
There is no fix point at which it crashes. It randomly occurs while using it.
The fastest way to reproduce it, is to start AutoHotFlow, enable the flow "Huge test script" and run it several times. While it runs, you may try to open an other flow for edit. At that point it often hangs up.

I did not figure out how to use a debugger yet. I already tried to download Visual Studio and the source codes of AutoHotkey_H. With some help of HokeyIt I was able to build it, but I was not able to debug it yet.

Re: Need help debugging AutoHotFlow v1

Posted: 20 May 2018, 09:34
by joedf
Are you using scite4ahk or AhkStudio?

Re: Need help debugging AutoHotFlow v1

Posted: 20 May 2018, 09:40
by bichlepa
I use scite4ahk.