View Issue Details

IDCategoryLast Update
0006833bugs2020-04-19 20:17
Reporterjohne53Assigned Tojohne53 
Reproducibilityalways 
Status closedResolutionfixed 
PlatformPCOSWindowsOS Version8.1
Product Version4.7 
Fixed in Version 
Summary0006833: New keyboard bindings file not getting found
DescriptionI found this in Mixbus (Windows version) but it probably affects Ardour too - and all platforms...

Ever since the bindings file got changed to "ardour.keys" I see an error now after loading any session (error message = 'Global keybindings are missing')
Additional InformationThe bindings file is actually present on my system but there seems to be a problem at this line in ArdourKeyboard::find_bindings_file()

find_files_matching_pattern (found, spath, string_compose ("*.%1", Keyboard::binding_filename_suffix));

The filename suffix is ".keys" so we're in fact searching for "*..keys" (with 2 periods), rather than "*.keys" (with a single period). I'm not sure whether ".keys" needs to get changed or whether "*.%1" is the culprit. One of the periods needs to get removed though.
TagsNo tags attached.

Activities

johne53

2016-05-04 08:51

reporter   ~0018169

Any preferences on which option should get used to fix this?

paul

2016-05-05 13:20

administrator   ~0018170

Seems odd that this could work on any platform if the bug is as you suspect, no?

johne53

2016-05-05 15:30

reporter   ~0018174

Yes it does seem odd - which is why I held back from pushing a fix. However, if I use "*%1" (rather than "*.%1") it does fix the problem. Maybe someone could try that on the other platforms and let us know if it then stops working or if it carries on working?

johne53

2016-05-07 16:27

reporter   ~0018181

I figured out why it appears to work... currently, 'ArdourKeyboard::setup_keybindings()' is the only place where we call 'ArdourKeyboard::find_bindings_files()'. And as things stand, that call will always fail. However, when it fails we then go on to build a user_keybindings_path. And if that fails (i.e. the user hasn't created any custom keybindings) we eventually reach this code:-

    if (keybindings_path.empty()) {
        keybindings_path = default_bindings;
    }

This sets a keybindings file having the name "ardour.keys" (i.e. with a single period, instead of the double period that we were originally searching for). That file will usually get found.

Remember that this is currently the ONLY place where we call 'find_bindings_files()' and when it fails (which it always will) we then go on to look for a custom bindings file and (if that also fails) we eventually look for the correct filename with just a single period.

Or to put it another way... if 'find_bindings_files()' ever got called from anywhere else, it would always fail.

johne53

2016-05-08 13:32

reporter   ~0018183

I just pushed a fix to git master. I'm pretty confident that it'll restore the originally intended behaviour. Because of the above safeguards though, there shouldn't be any adverse affect on the current behaviour (hopefully on any platform).

system

2020-04-19 20:17

developer   ~0023606

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2016-03-25 14:22 johne53 New Issue
2016-05-04 08:51 johne53 Note Added: 0018169
2016-05-05 13:20 paul Note Added: 0018170
2016-05-05 15:30 johne53 Note Added: 0018174
2016-05-07 16:27 johne53 Note Added: 0018181
2016-05-08 13:32 johne53 Note Added: 0018183
2016-05-08 13:32 johne53 Status new => resolved
2016-05-08 13:32 johne53 Resolution open => fixed
2016-05-08 13:32 johne53 Assigned To => johne53
2020-04-19 20:17 system Note Added: 0023606
2020-04-19 20:17 system Status resolved => closed