Modify

#2073 closed Bug (Fixed)

ContinueLoop crashes script if nothing to jump

Reported by: Melba23 Owned by: trancexx
Milestone: 3.3.9.0 Component: AutoIt
Version: 3.3.8.0 Severity: None
Keywords: ContinueLoop Cc:

Description (last modified by Melba23)

Using ContinueLoop without a following statement to jump over to reach Next crashes AutoIt with:

"ContinueLoop" statement with no matching "While", "Do" or "For" statement.:

The Help file states:

ContinueLoop will continue execution of the loop at the expression testing statement (that is the While, Until or Next statement).

Code:

; Works
For $i = 1 To 3
	If $i = 2 Then
		ContinueLoop
	EndIf
Next

; Works
For $i = 1 To 3
	If $i = 2 Then ContinueLoop
	Sleep(10)
Next

; Crashes
For $i = 1 To 3
	If $i = 2 Then ContinueLoop
Next

Au3Check passes all 3 versions. I realise the final loop is badly coded, but I feel it should not crash AutoIt.

According to the original thread http://www.autoitscript.com/forum/topic/135947-bug/
it does not crash in v3.3.6.1.

M23

Attachments (0)

Change History (8)

comment:1 by trancexx, on Dec 26, 2011 at 4:45:36 PM

Issue is introduced by revision [5885].

in reply to:  1 comment:2 by J-Paul Mesnage, on Dec 26, 2011 at 6:59:50 PM

Replying to trancexx:

Issue is introduced by revision [5885].

In fact something else as this rev has been reverted by Jon rev 6138
perhaps the duplicate of 1503

Version 0, edited on Dec 26, 2011 at 6:59:50 PM by J-Paul Mesnage (next)

comment:3 by jchd, on Dec 27, 2011 at 6:53:59 AM

Another instance of a highly related issue:
{{{#include <GuiListView.au3>
#include <SQLite.au3>}}}
due to the "final" ExitLoop at line 7112 of first include.
Temporary ugly workaround seems to work: insert dummy instruction after offending ExitLoop, ContinueLoop, ContinueCase, like "Local $Dummy".

comment:4 by trancexx, on Jan 22, 2012 at 8:28:24 PM

Milestone: 3.3.9.0
Owner: set to trancexx
Resolution: Fixed
Status: newclosed

Fixed by revision [6668] in version: 3.3.9.0

comment:5 by Melba23, on Jan 28, 2012 at 10:07:30 AM

Description: modified (diff)

comment:6 by Melba23, on Jan 28, 2012 at 10:07:57 AM

Description: modified (diff)

comment:7 by Melba23, on Jan 28, 2012 at 10:08:19 AM

Description: modified (diff)

in reply to:  3 comment:8 by BrewManNH, on Feb 24, 2012 at 2:19:54 AM

Replying to jchd:

Another instance of a highly related issue:
{{{#include <GuiListView.au3>
#include <SQLite.au3>}}}
due to the "final" ExitLoop at line 7112 of first include.
Temporary ugly workaround seems to work: insert dummy instruction after offending ExitLoop, ContinueLoop, ContinueCase, like "Local $Dummy".

I tested this by adding a line after line #7114 in GUIListView.au3, I just put $hWnd += 1 in that line, and this error went away. I'm not sure if it's related to the issue with ContinueLoop or not but it seems similar.

Modify Ticket

Action
as closed The owner will remain trancexx.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.