fuhsjr00 / bug.n

Tiling Window Manager for Windows
GNU General Public License v3.0
3.35k stars 212 forks source link

Launching Main.ahk crashes explorer #204

Closed xMez closed 5 years ago

xMez commented 5 years ago

I was trying to do work in some changed to bug.n but I cannot get it to run properly when i start from the Main.ahk file or when I build it myself.

When I launch it explorer.exe and bug.n immediately freeze, if I close explorer from when I get the prompt that it's frozen bug.n manages to launch. This does not happen when using the provided exe from the releases, but when I try to build it myself the file it creates has the same issues and the file it creates has a size of 437KB instead 339KB.

Build log

# 2019-03-11
2019-03-11 21:36:12> INFO....: Logging started with log level 5
2019-03-11 21:36:12> INFO....: Building bug.n started
2019-03-11 21:36:12> DEBUG...: **compile**: Variable set, source      -> F:\ahk\bug.n\tools\..\src\Main.ahk, the file does exist.
2019-03-11 21:36:12> DEBUG...: **compile**: Variable set, destination -> F:\ahk\bug.n\tools\..\bugn.exe, the file does exist.
2019-03-11 21:36:12> DEBUG...: **compile**: Variable set, customIcon  -> F:\ahk\bug.n\tools\..\src\logo.ico, the file does exist.
2019-03-11 21:36:12> DEBUG...: **compile**: Variable set, compiler    -> C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe, the file does exist.
2019-03-11 21:36:12> DEBUG...: **compile**: Variable set, useMpress   -> 1
2019-03-11 21:36:16> INFO....: Compiling the script to an executable finished.
2019-03-11 21:36:16> DEBUG...: **createCheatSheet**: Variable set, source    -> F:\ahk\bug.n\tools\..\doc\Default_hotkeys.md, the file does exist.
2019-03-11 21:36:16> DEBUG...: **createCheatSheet**: Variable set, destDir   -> F:\ahk\bug.n\tools\..\doc\Cheat_sheet, the file does exist.
2019-03-11 21:36:16> DEBUG...: **createCheatSheet**: Variable set, converter -> C:\Users\joten\AppData\Local\Pandoc\pandoc.exe, the file does **not** exist.
2019-03-11 21:36:16> INFO....: Creating the cheat sheet finished.
2019-03-11 21:36:16> ........: Building bug.n finished

Main.ahk log

2019-03-12 14:04:36 ====== Cleaning up ======
2019-03-12 14:04:36 ====== Exiting bug.n ======
2019-03-12 14:04:59 ====== Initializing ======
2019-03-12 14:06:13 Window ahk_id 0x3009e process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x2028c process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x10104 process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x305e8 process '' doesn't match expected 'bugn.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x1005fe process '' doesn't match expected 'bugn.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x101c2 process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x101bc process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x80948 process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x2052a process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x6094c process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x1011c process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x920160 process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x602a6 process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x1200158 process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 Window ahk_id 0x120788 process '' doesn't match expected 'explorer.exe', forgetting this window
2019-03-12 14:06:13 ====== Running ======

9.0.1 Release log

2019-03-12 14:13:25 ====== Cleaning up ======
2019-03-12 14:13:26 ====== Exiting bug.n ======
2019-03-12 14:13:37 ====== Initializing ======
2019-03-12 14:13:37 Window ahk_id 0x405e8 process '' doesn't match expected 'AutoHotkey.exe', forgetting this window
2019-03-12 14:13:37 Window ahk_id 0x80a54 process '' doesn't match expected 'AutoHotkey.exe', forgetting this window
2019-03-12 14:13:38 ====== Running ======
joten commented 5 years ago

The build process for an executable only packs the script and its dependencies together with the AutoHotkey executable; therefor there should be no difference between the two starting methods. The difference in size may be the result of not having mpress on your system, which would compress the resulting exe file. The logs do not seems to indicate any problem, though.

You may try to run the script with a different AutoHotkey.exe version; maybe ANSI, 32-bit would work. What are the changes you made to the script?

xMez commented 5 years ago

Now I've tried it with a different version of AHK, I was using 64-bit and have now switched to 32-bit Unicode and it works. There seems to be some incompatibilities for some windows functions between the two versions.

It also works to enforce building it with the 32-bit AHK binary even when having 64-bit version installed.

lifeike commented 4 years ago

same thing happens to me,too. and 32-bits version does not work. weird.