Jump to content

Recommended Posts

Im having an issue with _ArrayDisplay, hoping I don't need a script to replicate it as its intermittent and only starts happening when in a large script.

When I use _ArrayDisplay it will intermittently just show no results but also freeze and just say "not responding"

I know that what I am passing into _ArrayDisplay is an array as I can access all of the the array but when I just want to preview it my whole program crashes and I have to restart the script.

Any ideas? hoping its a known fault but if not I will see if I can make a script demonstrating it but seems to happen alot more in very large scripts.

 

Thank you in advance

Link to post
Share on other sites

Not sure I fully understand what that means but I think you might be right.

I have setup a function called SQLQuery, I make a $String then pass it to my SQLQuery function and the returned array is what im trying to display. it sounds like you know what im doing more than I do xD. is there an issue with seeing the array then once its been returned back from a function? is it something im doing wrong?

Link to post
Share on other sites

What are the typical dimensions of your pathological arrays?

AutoIt arrays have a limit of 2²⁴ (16777216) cells, regardless of cells' contents.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to post
Share on other sites

Its not large, im sending this command with 

"Select * From Report where REP_Ticket = '12399' LIMIT 1;"

The result should be

$Results[1][18] 

and no single one is more than 10 characters long.

 

I've just found out what solves the issue but not sure why its a problem, maybe someone could shed some light on it (maybe its what @Chimp was asking but didn't understand)

when the function is being called from within  GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") is when I get the issues. anyone know why its an issue? thought maybe because its trying to freeze it for the _Arraydisplay to work but the program doesn't freeze when using msgbox so not sure what is wrong. 

Edited by joboy2k
Link to post
Share on other sites

If you read GUIRegisterMsg help file carefully, you would have seen this :

Warning: blocking of running user functions which executes window messages with commands such as "MsgBox()" can lead to unexpected behavior, the return to the system should be as fast as possible !!!

Link to post
Share on other sites
3 hours ago, joboy2k said:

... I've just found out what solves the issue but not sure why its a problem, maybe someone could shed some light on it (maybe its what @Chimp was asking but didn't understand) ...

when the function is being called from within  GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") is when I get the issues. anyone know why its an issue? thought maybe because its trying to freeze it for the _Arraydisplay to work but the program doesn't freeze when using msgbox so not sure what is wrong. 

yep
a callback function is a function that doesn't flows along the normal script flow, it's called instead randomly according to the firing of some events, "diverting" in that way the main flow. As stated in the AutoIt Help, such function must execute quick statements and return the flow control back to the main script as soon as possible.
So, if you use within a callback a "blocking" functions (ie functions that pause the execution of the program and wait for user input or introduces a long delay) such as MsgBox, InputBox, _ArrayDisplay .... and so on,  it can cause "unexpected behavior" in your script, that maybe is what's happening.
Probably, if you "stop" a callback function and in the meanwhile a new trigger  event calls it again, a sort of "tangle" recursive loop is triggered, that cause the lost of the correct address to return to the main scipt...
In short, dont't use those functions in a callback function

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to post
Share on other sites

Thank you everyone for the help, was definitely the issue, not really familiar with callback functions and there potential, I use them just to know when a listview is clicked so probably using it unnecessarily anyway. I have found a work around just for debugging reasons.

 

Many thanks all.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...