Opened 16 years ago
Closed 16 years ago
#1542 closed Bug (Fixed)
Debug.au3, Debug window mode, Ignores possible OnEventMode state.
| Reported by: | anonymous | Owned by: | J-Paul Mesnage |
|---|---|---|---|
| Milestone: | 3.3.7.0 | Component: | Standard UDFs |
| Version: | 3.3.6.0 | Severity: | None |
| Keywords: | _Debug | Cc: |
Description
Seems its missing a "Opt('GUIOnEventMode', 0)" prior to using "GUIGetMsg()" in function "Debug_ReportWindowWaitClose()".
Side effect: script will not close normally. (debug keeping it open because its not/never getting the $GUI_EVENT_CLOSE event from the debug window.)
Attachments (0)
Change History (7)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Just to confirm your contxt can you put a repro script failing without the propose modification?
Thanks
comment:3 by , 16 years ago
#AutoIt3Wrapper_Au3Check_Stop_OnWarning=y
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -q
#include <debug.au3>
Global Enum $_DbWin_ = 1, $_DbConsole_, $_DbMsgbox_, $_DbFile_
Global Const $DbErrExt = True
_DebugSetup(Default, False, $_DbWin_, 'DebugOut.log')
Global $Quit = 0
Func _Quit()
If Not $Quit Then $Quit = -1
EndFunc
Global Const $GUI_EVENT_CLOSE = -3
Opt("GUIOnEventMode", 1)
GUICreate("test")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
GUISetState(@SW_SHOW)
_DebugOut('Open Debug Window.')
Do
Sleep(100)
Until $Quit
_DebugOut('Wait Loop Terminated.')
(tested on original v3.3.6.0 debug.au3)
comment:4 by , 16 years ago
Thanks you ;)
I want to be for sure your script were using GUISetOnEvent.
next time don't assume that we can write a repro script.
I will check for possible regression in other case and fix this report
comment:5 by , 16 years ago
Roger.
next time don't assume that we can write a repro script.
Its a little bit more complicated in my case. But I'll try to keep it in mind.
comment:6 by , 16 years ago
Thanks again,
In fact looking at your example I found out another error when the use script does not delete the GUI at the end.
comment:7 by , 16 years ago
| Milestone: | → 3.3.7.0 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [5740] in version: 3.3.7.0

perhaps?, seems to work ok.
Func __Debug_ReportWindowWaitClose() Local $nOld = Opt("WinDetectHiddenText", True) Local $hWndReportWindow = WinGetHandle($__gsReportWindowTitle_Debug, $__gsReportWindowText_Debug) Opt("WinDetectHiddenText", $nOld) $nOld = Opt('GUIOnEventMode', 0) ;; [MOD] Local Const $GUI_EVENT_CLOSE = -3 While WinExists(HWnd($hWndReportWindow)) If GUIGetMsg() = $GUI_EVENT_CLOSE Then GUIDelete($hWndReportWindow) WEnd Opt("GUIOnEventMode", $nOld) ;; [MOD] $__ghReportWindowEdit_Debug = 0 $__gbReportWindowWaitClose_Debug = True $__gbReportWindowClosed_Debug = True EndFunc ;==>__Debug_ReportWindowWaitClose