bugBattle for Wesnoth - Bugs: bug #21969, wesnoth spamming preferences file...

Show feedback again

bug #21969: wesnoth spamming preferences file with hotkeys for "null" commands

Submitted by:  Duthlet <duthlet>
Submitted on:  Fri 25 Apr 2014 11:49:32 AM UTC  
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group:  None of the others
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.11.12+devOperating System: Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat 17 Oct 2015 02:05:38 PM UTC, comment #2:

I did an experiment with removing deleted hot-keys from the hot-keys vector instead of marking them as 'null'. I think there are complications with how the vector is stored in memory, when it is written to the preferences text file, and how hot-keys are detected (command != "null") when reading/writing the hot-keys vector.

...but after all that, I discovered that it's much simpler just to cull the null commands at the save preferences step. I've submitted PR #530 for this - it will be included whenever the sdl2 branch gets merged to master.

Wedge009 <wedge009>
Sat 17 Oct 2015 11:27:58 AM UTC, comment #1:

I saw some of this when testing hot-keys for SDL 2.0 (actually, for SDL 1.2 as well). I think the problem is that deleting a hot-key doesn't remove it from the preferences file, but simply overwrites it with a null command.

I never got to the point of 80k lines of null hot-keys though. After testing I reset the hot-keys to default and just re-added the few non-default keys that I use.

Probably worth having a look into this to avoid writing null commands instead of actually deleting the entry from the preferences file.

Wedge009 <wedge009>
Fri 25 Apr 2014 11:49:32 AM UTC, original submission:

I was just playing with the Select/Move/Attack hotkey setting it to a keyboard key and upon setting it back to the mouse wesnoth suddenly slowed down. It turned out wesnoth had written over 80000 lines of hotkeys with command="null" into the preferences file for hotkeys
ctrl + `
ctrl + x
c + shift
crtl + c + shift
iirc I have cleared all of those but "ctrl + `" before.
seeing bug #20251 I actually might have cleared that one as well.
I can not reproduce this bug.

Duthlet <duthlet>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by wedge009 (Posted a comment)
  • -unavailable- added by duthlet (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup