Opened 14 years ago

Closed 14 years ago

#1542 closed Bug (Fixed)

Debug.au3, Debug window mode, Ignores possible OnEventMode state.

Reported by: anonymous Owned by: Jpm
Milestone: Component: Standard UDFs
Version: Severity: None
Keywords: _Debug Cc:


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 Changed 14 years ago by anonymous

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)
	Opt("GUIOnEventMode", $nOld) ;; [MOD]

	$__ghReportWindowEdit_Debug = 0
	$__gbReportWindowWaitClose_Debug = True
	$__gbReportWindowClosed_Debug = True
EndFunc   ;==>__Debug_ReportWindowWaitClose

comment:2 Changed 14 years ago by Jpm

Just to confirm your contxt can you put a repro script failing without the propose modification?

comment:3 Changed 14 years ago by anonymous

#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

Global Const $GUI_EVENT_CLOSE = -3

Opt("GUIOnEventMode", 1)

GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")

_DebugOut('Open Debug Window.')
Until $Quit
_DebugOut('Wait Loop Terminated.')

(tested on original v3.3.6.0 debug.au3)

comment:4 Changed 14 years ago by Jpm

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 Changed 14 years ago by anonymous


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 Changed 14 years ago by Jpm

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 Changed 14 years ago by Jpm

  • Milestone set to
  • Owner changed from Gary to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5740] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.