Opened on Apr 14, 2024 at 7:21:21 AM
Last modified on Dec 22, 2025 at 9:00:06 AM
#4005 assigned Bug
Empty ReDim make Autoit crash
| Reported by: | Pickwy | Owned by: | Jon |
|---|---|---|---|
| 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 (5)
follow-up: 3 comment:2 by , on Apr 30, 2024 at 11:51:02 AM
Both ReDim throw a syntax error in SciTe. What do you expect more?
comment:3 by , on Apr 30, 2024 at 6:17:58 PM
Replying to Andreik:
Both ReDim throw a syntax error in SciTe. What do you expect more?
AutoIt3 shouldn't hard crash.
comment:4 by , on Apr 30, 2024 at 6:47:48 PM
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?

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