Modify

Opened 7 months ago

Last modified 7 months ago

#4005 new Bug

Empty ReDim make Autoit crash

Reported by: Pickwy Owned by:
Milestone: Component: AutoIt
Version: 3.3.16.1 Severity: None
Keywords: redim crash Cc: admin@…

Description

Observed : Using the empty brackets syntax with ReDim hard crash the interpreter.
Expected : Runtime error or no change to Array

Local $Dummy[] = [1, 2, 3]
ReDim $Dummy ;Do nothing at all
ReDim $Dummy[] ;Crash

Attachments (0)

Change History (4)

comment:1 Changed 7 months ago by mLipok

Issue confirmed.

IMHO: AutoIt should throw AutoIt error something like:
Array ReDim has not set number of subscripts.

comment:2 follow-up: Changed 7 months ago by Andreik

Both ReDim throw a syntax error in SciTe. What do you expect more?

comment:3 in reply to: ↑ 2 Changed 7 months ago by Jos

Replying to Andreik:

Both ReDim throw a syntax error in SciTe. What do you expect more?

AutoIt3 shouldn't hard crash.

comment:4 Changed 7 months ago by Andreik

I understand and it should be treated more elegant as a runtime error. My point was if you write invalid code then it's a high chance to get bad or unexpected behavior. By the way, are you allowed to compile from SciTe if you have syntax errors?

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

Action
as new The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.