Bug 38: (Xinux) Crashes, hotbar being nuked
Moderators: Community Managers, Developers
-
BugTracker
- Posts: 810
- Joined: Wed Aug 28, 2013 9:40 am
Bug 38: (Xinux) Crashes, hotbar being nuked
Bug ID : 38 - Crashes, hotbar being nuked Bug Date : 2014/11/03 08:21:32 Assigned To : Xinux Priority : Medium Category : VGClient Sub-Category : Other Severity : Standard Reproducible : Some of the timeDetails:
Crash to desktop in Hag's Coastline. I came back into the game at 48831 79765 12408, but that's not where I was when I crashed (I was in the dungeon under the boat). I also lost all my hotkeys, except for the default first hotkey bar.
Originated From World: New Telon (1) Chunk : Hag's Coastline (77) Location : 48831 79765 12408
- John Adams
- Retired
- Posts: 4582
- Joined: Wed Aug 28, 2013 9:40 am
- Location: Phoenix, AZ.
- Contact:
Re: Bug 38: (Xinux) Crashes, hotbar being nuked
Xinux, not sure if this is still an issue. I haven't lost my hotbars (with the starting Abilities anyway) for a while. The bug seems to allude to bars other than the first one (?)
Also, I do still see SQL insert issues on hotbars, so that's why I pushed this. Players are trying to make new hotbar icons and getting SQL insert errors because there's already a key there.
A suggestion to solve this might be to change the SQL insert to a INSERT ON DUPLICATE KEY UPDATE query instead.
EDIT:
Example usage:
This will replace m_wb bar, slot 0 with ability_id 27111 regardless of what was there before. I will implement this on NT for testing today.
Code (I think this gives me the desired results)
Rev 931
Also, I do still see SQL insert issues on hotbars, so that's why I pushed this. Players are trying to make new hotbar icons and getting SQL insert errors because there's already a key there.
A suggestion to solve this might be to change the SQL insert to a INSERT ON DUPLICATE KEY UPDATE query instead.
EDIT:
Example usage:
Code: Select all
INSERT INTO `character_hotbars` (`char_id_fk`, `bar_name`, `slot_id`, `ability_id`, `item_unique_id`, `reference`, `command_text`, `icon_id`) VALUES
(1, 'm_wb', 0, 27111, - 1, 'noname', 'noname', 0)
ON DUPLICATE KEY UPDATE
bar_name = 'm_wb', slot_id = 0, ability_id = 27111, item_unique_id = - 1, reference = 'noname', command_text = 'noname', icon_id = 0 ;Code (I think this gives me the desired results)
Code: Select all
// new way string bar_name = database.Escape(packet_struct->GetString32("bar_name")); int32_t slot_id = packet_struct->GetUInt32("slot_id"); int32_t ability_id = packet_struct->GetInt32("ability_id"); int32_t item_unique_id = packet_struct->GetInt32("item_unique_id"); string reference = database.Escape(packet_struct->GetString32("reference")); string command_text = database.Escape(packet_struct->GetString32("command_text")); int32_t icon_id = packet_struct->GetInt32("icon_id"); if (!database.Query("INSERT INTO `character_hotbars`\n" "(`char_id_fk`, `bar_name`, `slot_id`, `ability_id`, `item_unique_id`, `reference`, `command_text`,`icon_id`)\n" "VALUES (%i,'%s',%i,%i,%i,'%s','%s',%i)\n" "ON DUPLICATE KEY UPDATE\n" "bar_name = '%s',\n" "slot_id = %i,\n" "ability_id = %i,\n" "item_unique_id = %i,\n" "reference = '%s',\n" "command_text = '%s',\n" "icon_id = %i", // INSERT INTO values character->GetCharacterID(), bar_name.c_str(), slot_id, ability_id, item_unique_id, reference.c_str(), command_text.c_str(), icon_id, // ON DUPLICATE UPDATE values bar_name.c_str(), slot_id, ability_id, item_unique_id, reference.c_str(), command_text.c_str(), icon_id)) { - John Adams
- Retired
- Posts: 4582
- Joined: Wed Aug 28, 2013 9:40 am
- Location: Phoenix, AZ.
- Contact:
Re: Bug 38: (Xinux) Crashes, hotbar being nuked
Cyrcle and I determined that when this happens, it's because the VGClient doesn't remember the player name when it comes in - thus doesn't know which UI file to load on the drive - and you see blanks. Cyrcle camped and came back, all his stuff was there.
Closing.
Closing.