#1617 closed Bug (Fixed)
Lockup: failed GuiCreate + undeleted window.
Reported by: | anonymous | Owned by: | Jpm |
---|---|---|---|
Milestone: | 3.3.7.0 | Component: | AutoIt |
Version: | 3.3.6.1 | Severity: | None |
Keywords: | lockup guicreate guidelete | Cc: |
Description
;; when window 2* is not deleted before the failing GUICreate, AutoIt locks up in its exit process. ;; *) or any additional created windows after startup. (but not the first initial created window.) ;; exit process) after any OnExit processing. (seems like a endless loop case in its final exit process) ;; - not tested with other 'force GUICreate error' values. ;; >Running:(3.3.6.1):Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 OS:X86) Dim $hWnd1, $hWnd2, $hWnd3, $hWnd9, $iStyle, $iStyleExt $hWnd1 = GUICreate('GUI-1 test') $hWnd2 = GUICreate('GUI-2 test') GUISetState(@SW_SHOW) ;; not needed to trigger problem. ;~ $hWnd3 = GUICreate('GUI-3 test') ;~ GUISetState(@SW_SHOW) ;; not needed to trigger problem. ConsoleWrite('GUIDelete($hWnd1) = ' & GUIDelete($hWnd1) & @CRLF) ConsoleWrite('GUIDelete($hWnd2) = ' & GUIDelete($hWnd2) & @CRLF) ;~ ConsoleWrite('GUIDelete($hWnd3) = ' & GUIDelete($hWnd3) & @CRLF) $iStyle = 1409286144 ;; force GUICreate error. $iStyleExt = 256 $hWnd9 = GUICreate('GUI-9 test', -1, -1, -1, -1, $iStyle, $iStyleExt) ;~ ConsoleWrite('[9] $hWnd9=' & $hWnd9 & ', @err=' & @error & ', @ext=' & @extended & @CRLF) ;~ ConsoleWrite('[9] $hWnd9=' & $hWnd9 & ', $iStyle=' & $iStyle & ', $iStyleExt=' & $iStyleExt & @CRLF)
@jpm: Wow. That list is getting smaller every day. (or: Thanks for your work) :)
Attachments (0)
Change History (9)
comment:1 Changed 15 years ago by anonymous
comment:2 Changed 15 years ago by Jpm
Thanks for your support.
I am not sure to understand how the complete script works.
When you say OnExit are you using OnAutoItExitRegister?
From under Win7 everything is fine I will check under WinXP
The failing creation use
$iStyle = BitOr($WS_CHILD, $WS_VISIBLE, $WS_CLIPSIBLINGS) ; 0x54000000 ;1409286144 ;; force GUICreate error.
$iStyleExt = $WS_EX_WINDOWEDGE ; 256
comment:3 Changed 15 years ago by Jpm
I test with the attached script with no error under XP
#include <WindowsConstants.au3> OnAutoItExitRegister("MyTestFunc") Local $hWnd1, $hWnd2, $hWnd3, $hWnd9, $iStyle, $iStyleExt $hWnd1 = GUICreate('GUI-1 test',default,default, 100, 100) GUISetState(@SW_SHOW) ;; not needed to trigger problem. $hWnd2 = GUICreate('GUI-2 test') GUISetState(@SW_SHOW) ;; not needed to trigger problem. _ConsoleWrite('GUIDelete($hWnd1) = ' & GUIDelete($hWnd1) & @CRLF) _ConsoleWrite('GUIDelete($hWnd2) = ' & GUIDelete($hWnd2) & @CRLF) ;~ ConsoleWrite('GUIDelete($hWnd3) = ' & GUIDelete($hWnd3) & @CRLF) $iStyle = BitOr($WS_CHILD, $WS_VISIBLE, $WS_CLIPSIBLINGS) ; 1409286144 ;; force GUICreate error. $iStyleExt = $WS_EX_WINDOWEDGE ; 256 $hWnd9 = GUICreate('GUI-9 test', -1, -1, -1, -1, $iStyle, $iStyleExt) ;~ ConsoleWrite('[9] $hWnd9=' & $hWnd9 & ', @err=' & @error & ', @ext=' & @extended & @CRLF) ;~ ConsoleWrite('[9] $hWnd9=' & $hWnd9 & ', $iStyle=' & $iStyle & ', $iStyleExt=' & $iStyleExt & @CRLF) Func MyTestFunc() MsgBox(64, "Exit Results 1", 'Exit Message from MyTestFunc()') EndFunc Func _ConsoleWrite($msg) MsgBox(262144,'_ConsoleWrite' , $msg) EndFunc
comment:4 Changed 15 years ago by anonymous
Disable the "GUIDelete($hWnd2)" part to make it lockup.
(got to go right now, be back later)
comment:5 Changed 15 years ago by anonymous
(Same anonymous, differand location)
Alternitive (or better), move the "GUIDelete($hWnd2)" below the "$hWnd9 = GUICreate('GUI-9 test',...". And drop in a hotkey-waiting loop after the "GUIDelete($hWnd2)"
This shows that the $hWnd2 window failed to deleted. Witch is probely wy AutoIt locks up in its exit process. (can't test anything at my current location.)
comment:6 follow-up: ↓ 9 Changed 15 years ago by Jpm
Yes the new repro with the move of GUIDelete($hWnd2) reproduce the behavior.
Now I can really investigate.
Stay tune.
comment:7 Changed 15 years ago by Jpm
- Milestone set to 3.3.7.0
- Owner set to Jpm
- Resolution set to Fixed
- Status changed from new to closed
Fixed by revision [5812] in version: 3.3.7.0
comment:8 Changed 15 years ago by anonymous
:)
---
Off topic:
While taking my time to write a (none posted) reply. Jpm dropped in a reply.
Instead of loosing the message I got a nice notification about the situation. (Thanks 2)
comment:9 in reply to: ↑ 6 Changed 15 years ago by MrCreatoR <mscreator@…>
Replying to Jpm:
Yes the new repro with the move of GUIDelete($hWnd2) reproduce the behavior.
Now I can really investigate.
Stay tune.
Actualy you can reproduce the bug (GUICreate related) with only two lines:
$hGUI = GUICreate('', -1, -1, -1, -1, -1, 0x40000000) ; $WS_CHILD = 0x40000000 ConsoleWrite("@error: " & @error & @CRLF & "$hGUI: " & $hGUI & @CRLF)
And i think the lockup issue is somehow related to ticket #1618 (ShellExecute("C:\") causes script hanging, i have posted it before i have seen this one).
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.
Hum, Number don't say that much: 1409286144 is a mix of the default GUI-Style value minus $GUI_SS_DEFAULT_GUI and plus $WS_CHILD value.
BitAND($iStyle, BitNOT($GUI_SS_DEFAULT_GUI))
BitOR($iStyle, $WS_CHILD)
Just in case.