Jump to content

Is there a bug with _ArrayDisplay?


marko29
 Share

Recommended Posts

I am having the worst nightmare with code ever, all of sudden when i use _ArrayDisplay it doesnt respond, just loads and loads showing only the load icon.

I am searching if i did anything to it or added something to it to cause this but even all i do is

Dim $array[10]

All of suden later when i do _ArrayDisplay($array) somewhere later in function it starts "unresponsive mode" described above. I repeat i never modified it and it still acts this way, i also tested it in multiple functions but it seems that it doesnt loop forever only if i call it on the top of my code.

So what the hell is causing this if i dont touch the array(beside definition on top) and all i do is _ArrayDisplay($myar)

Btw i tried to fill it with some info in case the empty array could cause it but no help...

Edited by marko29
Link to comment
Share on other sites

  • Have you tried making a script only creating an array and calling _ArrayDisplay()?
  • What version of AutoIT are you using? Are you executing/compiling with the Beta build?
  • Is this a recent problem?
  • Do other functions from the Array.au3 work?
  • Have you tried executing the script in Scite? What messages came up in the Console?
I seriously doubt that there is any problem with _ArrayDisplay() itself...I would first re-download the zip archive of whatever version you are running, and at minimum overwrite the Array.au3. I have times when a power interruption or a BSOD has corrupted files in my Program Files directrory, so I would first compare your Array.au3 with a newly downloaded one. If that does not fix your problem I would then try a reinstall of AutoIT. Post back if you still find issues.

EDIT: Run this in Scite and see if any console message errors appear

#include <array.au3>
Local $Array[5] = [1, 2, 3, 4, 5]
_ArrayDisplay($Array, 'Array Display Test')
Edited by Varian
Link to comment
Share on other sites

If it's not caused by the code them it's caused by the data.

Loop through the array and display all elements using ConsoleWrite.

Can you post the code how you call _ArrayDisplay?

Edit: _ArrayDisplay seems to act a bit strange as soon as you have the pipe character ("|") = the default separator character in your table and use user defined column headings.

Example one works fine, example two shows no data only row numbers (but twice)

Global $aTestArray1[2][2] = [[1, 2],["Test Row 1 Column 1", "Test Row 1 Column 2"]]
Global $aTestArray2[2][2] = [[1, 2],["Test Row 1 Column 1||Line2", "Test Row 1 Column 2"]]
_ArrayDisplay($aTestArray1, "Test Array 1")
_ArrayDisplay($aTestArray2, "Test Array 2", -1, 0, "", "", "Row|Column1|Column2")

Just created a bug report (#1861) for this.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Ok, marko29, you have a real problem...how about some real info...

did this code ever work?

if so, what changed?

did you write the code?

We also "really" need to see a piece of whatever is failing.

and,

what is a "load" icon?

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

If you want to use pipes should you not just specify a different seperator and replace.

#include <array.au3>

Global $aTestArray1[2][2] = [[1, 2],["Test Row 1 Column 1", "Test Row 1 Column 2"]]
Global $aTestArray2[2][2] = [[1, 2],["Test Row 1 Column 1||Line2", "Test Row 1 Column 2"]]
_ArrayDisplay($aTestArray1, "Test Array 1")
_ArrayDisplay($aTestArray2, "Test Array 2", -1, 0, ",", "|", "Row,Column1,Column2")

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Thanks, that works just fine.

But if you have a look at the code you'll find that _ArrayDisplay checks the array if it contains the separator character. If it does the function selects a new separator character. But as this is not transparent to the user (and if you leave the separator character set to default) then the separator characters in $sHeader are misinterpreted.

BTW: I think the docu should be updated regarding $sSeparator and $sReplace. For me (I assume due to my limited english) it was not clear how this works without peeking at the code.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...