Sign in to follow this  
Followers 0
marko29

Is there a bug with _ArrayDisplay?

6 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

  • 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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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

Share this post


Link to post
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")

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

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0