Jump to content

Recommended Posts

Posted

Can somebody try to reproduce this bug?

It would be helpful to know if this issue appeares on other environments too.

Issue:

Sometimes values of certain keys will return empty even if expicitly assigned a value before.

Conditions:

  • Map is bigger than ~50 key/values pairs
  • value is being worked with in a Function where a loop is iterating through the Map
  • before retrieving the value there is a isMap/MapKeys/MapAppend/MapRemove check on the Map value.
Dim $mMap[]

; Generate random key strings
For $i = 0 To 100
    $RndKey = ""
    For $i2 = 0 To 4
        $RndKey &= Chr(Random(65,90,1))
    Next
    $mMap[$RndKey] = 999
next


ConsoleWrite("-----------1-------------" & @CRLF); Unpredictable blank values

MapDisplay1($mMap)

ConsoleWrite("-----------2-------------" & @CRLF); ByRef always works

MapDisplay2($mMap)

ConsoleWrite("-----------3-------------" & @CRLF); not in a function always works

For $i In MapKeys($mMap)
    isMap($mMap[$i])
    ConsoleWrite($i&": "&$mMap[$i]&@CRLF)
Next


Func MapDisplay1( $m_Map )
    For $i In MapKeys($m_Map)
        isMap($m_Map[$i]) ;same problem with isMap($m_Map[$i]), MapKeys($m_Map[$i]), MapAppend/MapRemove but NOT with MapExists($m_Map,$i)
        ConsoleWrite($i&": "&$m_Map[$i]&@CRLF)
    Next
EndFunc

Func MapDisplay2( ByRef $m_Map ) 
    For $i In MapKeys($m_Map)
        isMap($m_Map[$i])
        ConsoleWrite($i&": "&$m_Map[$i]&@CRLF)
    Next
EndFunc

 

The value is not lost or overwritten on the global map, only on the local map inside the function.

 

Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite
Posted

Ack, it's very strange. File a bug in tracker.

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)

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
×
×
  • Create New...