View Issue Details

IDProjectCategoryView StatusLast Update
0005284Multi Theft Auto : San AndreasClientpublic2010-04-16 17:38
ReporterNeonBlackAssigned Toccw 
Status resolvedResolutionfixed 
Product Version1.0.3 
Target Version1.0.4Fixed in Version1.0.4 
Summary0005284: Crash on click on a button...

By clicking on the button all (!) keys get unbound with unbindKey. Therefore a function-local function gets passed to the onclick-handler.
I hope you can get some needful information off the dump.

Steps To Reproduce

Very difficult since it's deepl yin a more or less complex gui construct. Maybe you get some information out of the code:

---------- CLIENTSIDE CODE ----------
function keySettings.create()
-- acts as handler for all the keys above to catch the pressed key
local function catchKey(key)
keySettings.toggleAllBinds(false, catchKey)
local selectedRow = keySettings.gridLists.keySet.selectedItem
local action = guiGridListGetItemText(keySettings.gridLists.keySet.element, selectedRow, 1)
keySettings.changes[action] = key
guiGridListSetItemText(keySettings.gridLists.keySet.element, selectedRow, 2, key, false, false)
toggle(keySettings.catcher, false, true, true)
keySettings.catcher = nil

keySettings.gridLists = {
    keySet = keySettings.window:createGridList{ x=17, y=32, width=466, height=319, onDblClick=function ()
        -- on doubleclick a window with information pops up and the player is able to press the desired key or to abort
        if keySettings.gridLists.keySet.selectedCount == 2 then
            keySettings.catcher = confirm("Druecke nun die Taste, der Du die Aktion zuweisen willst.", {{"Abbrechen",keySettings.toggleAllBinds,false,catchKey}}, "Zuweisung")
            keySettings.toggleAllBinds(true, catchKey)
    end }


function keySettings.toggleAllBinds(toggle, handler)
local keys = { "mouse1", "mouse2", "mouse3", "mouse4", "mouse5", "mouse_wheel_up", "mouse_wheel_down", "arrow_l", "arrow_u", "arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5", "num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "numdec", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home", "insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\", "=" }
toggle = toggle and bindKey or unbindKey
, key in next, keys do
toggle(key, "down", handler)

Additional Information

The crash happens by clicking on the ”Abbrechen“-button, which is created by the confirm-function.
By clicking on it the function keySettings.toggleAllBinds(false, catchKey) gets called.

Please don't hesitate to ask me for additional information.

TagsNo tags attached.



2010-04-08 11:37

administrator   ~~0011348

Is it an assertion fail error ?


2010-04-16 17:38

administrator   ~~0011367

Fixed in

Please test in 1.0.4-untested-21

Issue History

Date Modified Username Field Change