Opened 8 years ago

Closed 8 years ago

#2170 closed Bug (Fixed)

_ArrayDisplay fails handling arrays with no elements

Reported by: ripdad Owned by: guinness
Milestone: Component: Standard UDFs
Version: Severity: None
Keywords: Cc:


When trying to view with _ArrayDisplay, array.au3 crashes at:
Line #(depending on version) --> Local $avArrayText[$iUBound + 1]

#include <array.au3>


Func _Test()
    Local $objWMI = ObjGet('Winmgmts:\\.\root\CIMV2')
    Local $objClass = $objWMI.Get('__NotifyStatus')
    Local $Value
    For $objItem in $objClass.SystemProperties_()
        $Value = $objItem.Value

        If IsArray($Value) Then

            MsgBox(0, '', 'Elements: ' & UBound($Value) & @CRLF & 'Subscripts: ' & UBound($Value, 0))





Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by trancexx

That variable is array, so IsArray() is fine.
_ArrayDisplay() needs to check for situations like this.

comment:2 Changed 8 years ago by trancexx

  • Component changed from AutoIt to Standard UDFs
  • Summary changed from IsArray detects arrays with no elements to _ArrayDisplay fails handling arrays with no elements

comment:3 Changed 8 years ago by guinness

  • Milestone set to
  • Owner set to guinness
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [6887] in version:

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 owner will remain guinness.

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

Note: See TracTickets for help on using tickets.