Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#3595 closed Bug (No Bug)

Call("Ubound", $array) crashes if $array is empty

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


Global $aNumbers[3] = [3, 5, 6]
Global $aEmpty[0]

$i = Call("Ubound", $aNumbers);//Works on non-empty arrays
MsgBox(0, '1st array', $i)

$j = Call("Ubound", $aEmpty);//Crashes when array is empty instead of returning 0

Problem signature:

Problem Event Name: APPCRASH
Application Name: autoit3.exe
Application Version:
Application Timestamp: 55fc1979
Fault Module Name: autoit3.exe
Fault Module Version:
Fault Module Timestamp: 55fc1979
Exception Code: c0000005
Exception Offset: 00004d46
OS Version: 6.1.7601.
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Wrapper info:

"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "E:\New folder\Encoded_7TMF.au3" /UserParams

+>06:52:19 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v. Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409)
+> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\X\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\X\AppData\Local\AutoIt v3\SciTE

Running AU3Check ( from:C:\Program Files (x86)\AutoIt3 input:E:\New folder\Encoded_7TMF.au3

+>06:52:19 AU3Check ended.rc:0

Running:(\Program Files (x86)\AutoIt3\autoit3.exe "E:\New folder\Encoded_7TMF.au3"

--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
!>06:52:21 AutoIt3.exe ended.rc:-1073741819
+>06:52:21 AutoIt3Wrapper Finished.

Exit code: 3221225477 Time: 1.893

Attachments (0)

Change History (5)

comment:1 Changed 6 years ago by anonymous

$j = Call("IsArray", $aEmpty)

Also crashes, Call() doesn't seem to handle empty arrays as parameters well.

comment:2 Changed 6 years ago by anonymous

I figured it out. For some reason

$j = Call("Ubound", "$aEmpty")

works. But

$j = Call("Ubound", $aEmpty)


comment:3 Changed 6 years ago by anonymous

If I'm not wrong Autoit3.exe parses the value of $aEmpty first before loading the function Call() in my first example.

For it to work as intended I need to put the quotes in the parameters as well.

comment:4 Changed 6 years ago by BrewManNH

  • Resolution set to No Bug
  • Status changed from new to closed

Why would you use such a silly method to call a builtin function in the first place?

comment:5 Changed 6 years ago by Melba23

It also works if you add the optional parameter:

$i = Call("Ubound", $aEmpty, 1)
MsgBox(0, 'Call Empty + param', $i)

But I agree with BrewManNH - unless you can come up with a sensible use case this is so obscure it does not deserve to have any time spent on it.


Last edited 6 years ago by Melba23 (previous) (diff)

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

as closed The ticket will remain with no owner.

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

Note: See TracTickets for help on using tickets.