Dictionary_Find GPF
issueid=391 27-03-2013 16:31
Super Moderator
Number of reported issues by Petr Schreiber: 162
Dictionary_Find GPF
Dictionary_Find GPFs in ThinBASIC 1.9.4.0

Hi,

it seems the Dictionary is a bit broken in ThinBASIC 1.9.4.0, the following example GPFs for me on Dictionary_Find:
Uses "Dictionary"

DWord dict = Dictionary_Create(64, TRUE)
Dictionary_Add(dict, "Item", "Something")
MsgBox 0, Dictionary_Find(dict, "Item")
The issue also affects the dictionary class, where I get GPF on dict.Find again:
Uses "Dictionary"

Dim dict As cDictionary 
dict = New cDictionary(64, TRUE)
dict.Add("Item", "Something")
MsgBox 0, dict.Find("Item")

Petr
Issue Details
Issue Number 391
Project thinBasic
Category Unknown
Status Fixed
Priority 2
Affected Version 1.9.2
Fixed Version 1.9.6
Milestone (none)
Users able to reproduce bug 1
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




28-04-2013 16:39
Super Moderator
The problem still exists in 1.9.5.0, this example GPFs for me in find method:
Uses "Console"
Uses "Dictionary"

DWord pDictionary = Dictionary_Create(1024, TRUE)   
PrintL "Dictionary created:", pDictionary

Dictionary_Add(pDictionary, "TileGrass.bmp", "513")
PrintL "Key added"

Dictionary_Find(pDictionary, "TileGrass.bmp")
PrintL "Key found, press any key to quit..."
WaitKey
Petr

+ Reply