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 Apr 25 11:49:32 2014  
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group:  None of the others
Status: FixedPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
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.


Sun Feb 28 02:37:27 2016, comment #4:

Fixed by Wedge009 in https://github.com/wesnoth/wesnoth/pull/564.

Thank you.

Andreas Löf <aginor>
Project Member
Thu Feb 18 11:55:13 2016, comment #3:

This wasn't merged but instead re-opened in PR #564. The intention was to fix some related bugs before merging - I only finally managed to do this just now.

Wedge009 <wedge009>
Project Member
Sat Oct 17 14:05:38 2015, 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>
Project Member
Sat Oct 17 11:27:58 2015, 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>
Project Member
Fri Apr 25 11:49:32 2014, 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 vultraz (Updated the item)
  • -unavailable- added by aginor (Posted a comment)
  • -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



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Mar 5 13:11:35 2016vultrazOpen/ClosedOpen=>Closed
    Sun Feb 28 02:37:27 2016aginorStatusNone=>Fixed
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup