Sign in to follow this  
Followers 0
monoceres

GUICtrlDelete(), bug?

8 posts in this topic

Okay I seem to have ran into a bug, but I want to check with you guys before making a fool out of myself in AutoIt Trac.

This gives me a hard crash:

GUICreate("",500,600)

$l5 = GUICtrlCreateLabel("Install folder", 10, 10, 300)
GUICtrlSetFont(-1, 16, 600)
$l4 = GUICtrlCreateLabel("1", 10, 50)
$input = GUICtrlCreateInput("8", 10, 100 + 30, 200, 20)
$browse = GUICtrlCreateButton("8", 220, 98 + 30, 65, 25)
$l1 = GUICtrlCreateLabel("8", 10, 170, 200)
$l2 = GUICtrlCreateLabel("8", 10, 190, 200)
$l3 = GUICtrlCreateLabel("8", 10, 210, 200)
$cancel = GUICtrlCreateButton("8", 355, 288, 75, 25)
$next = GUICtrlCreateButton("2", 260, 288, 75, 25)
$pic2 = GUICtrlCreatePic("", 0, 280, 450, 1)

GUISetState()
Do
    $msg = GUIGetMsg()
Until $msg = -3

GUISetState(@SW_HIDE)
GUICtrlDelete($input)
GUICtrlDelete($browse)
GUICtrlDelete($l1)
GUICtrlDelete($l3)
GUICtrlDelete($l2)
GUICtrlDelete($l4)
GUICtrlDelete($l5)
GUICtrlDelete($cancel)
GUICtrlDelete($next)
GUICtrlDelete($pic2)
GUISetState(@SW_SHOW)
Sleep(1000)

But if you comment GUICtrlDelete($input) or GUICtrlDelete($browse) the crash does not appear, mighty strange if you ask me.

Sorry for the long example but I couldn't reproduce otherwise (It's part of a bigger project)

The whole thing could just be a stupid misstake by me though :)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites



Hmm this doesn't crash for me... running totally as is from your post, everything works fine (for me). Maybe a dumb question but what exactly do you mean by hard crash?


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

Hmm this doesn't crash for me... running totally as is from your post, everything works fine (for me). Maybe a dumb question but what exactly do you mean by hard crash?

This is what I mean:

Posted Image

It's translates to: AutoIt v3 Script has stopped working.

You can search online for a solution.

Search online and close application

Close application.


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

I can confirm the crash as well. It occurs when you try to delete the Pic control. I think it might be OS related i'm running Vista Ultimate. What are you running?

Share this post


Link to post
Share on other sites

Vista Ultimate x32


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Yep. It seems to be a Vista quirk. I just tried it on XP with no errors.

Share this post


Link to post
Share on other sites

Ok after messing with it some more its very strange indeed. If I remove any one of the the GUICtrlDelete calls or the GUISetState(@SW_HIDE) call it doesn't crash. Strange...

Share this post


Link to post
Share on other sites

Managed to get it down to do this:

GUICreate("",500,600)
$input = GUICtrlCreateInput("8", 10, 100 + 30, 200, 20)
$pic2 = GUICtrlCreatePic("", 0, 280, 450, 1)
GUISetState()

Do
    $msg = GUIGetMsg()
Until $msg = -3

GUISetState(@SW_HIDE)
GUICtrlDelete($input)
GUICtrlDelete($pic2)
GUISetState(@SW_SHOW)
Sleep(1000)

Reporting the bug to AutoIt Trac now :)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0