Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Keybinder v2 notes/problems

(1/15) > >>

oBFusCATed:
I've updated my main install of the codeblocks to the latest rev and the keybinder seems to be broken for me.
Here is the list of things I've spotted as problems:

1. Memory leak from "m_pAccelEntries = new wxAcceleratorEntry[m_AccelCount];" use unique_ptr?
2. ctrl-shift-. and ctrl-shift-t doesn't work as accelerators
3. The new keybinder failed to parse the old config and lost all my bindings
4. The old menu name is not visible on windows7 with wx-master + 4k 27inch display in the settings on windows (this is with the latest night build)
5. I have ctrl-f4 instead of ctrl-w for file->close file?
6. The json file is not sorted, so it is hard to compare with another version. It would be really good if this is sorted
7. The json file contains all the keybindings. I think it would be better if it stores only the user specified bindings and leave everything else as default.
8. Can we really make a introspecting keybinder work reliably? Wouldn't it be better if we specify commands using code? VStudio has such an approach. And this would make it possible to have the sublime/vscode command windows.

I'm on gentoo linux, wx3.0.4+patch and wx-master+asan. Both wx versions behave the same sort of.

Pecan:

--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---I've updated my main install of the codeblocks to the latest rev and the keybinder seems to be broken for me.
Here is the list of things I've spotted as problems:

--- End quote ---


--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---1. Memory leak from "m_pAccelEntries = new wxAcceleratorEntry[m_AccelCount];" use unique_ptr?

--- End quote ---
At the point it needs to be deleted, the whole address space is about to be destroyed. But since it seems to offend, I'll add a delete.


--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---2. ctrl-shift-. and ctrl-shift-t doesn't work as accelerators

--- End quote ---
I'm using both shortcuts every day. Please describe your environment and how you're setting them. Further data would help me recreate the problem.
Would you attach the cbKeybinder.ini file that Keybinder tried to convert.
 

--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---3. The new keybinder failed to parse the old config and lost all my bindings

--- End quote ---
Would you attach your old cbKeybinder.ini file so I can try and duplicate the problem. Windows or Linux? This happens on Linux for the nightly build (June 10 and prior). But I fixed this in head.


--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---4. The old menu name is not visible on windows7 with wx-master + 4k 27inch display in the settings on windows (this is with the latest night build)

--- End quote ---
I'll try this on a VMWare Windows 7, but I don't have access to such a nice monitor. What do you mean by "wx-master" on "lastest night build" I thought the nightly builds were using 3.1 on windows. And I've I made major fixes since the latest nightly build (june 10).


--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---5. I have ctrl-f4 instead of ctrl-w for file->close file?

--- End quote ---
Both probably work. Keybinder now preserves the global accelerators set in main.cpp . Somehow the global shortcut got set as the first accelerator. Please attach your cbKeybinder.ini file so I can try to recreate the problem.
 

--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---6. The json file is not sorted, so it is hard to compare with another version. It would be really good if this is sorted

--- End quote ---
I agree. I'll put it on the todo list.


--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---7. The json file contains all the keybindings. I think it would be better if it stores only the user specified bindings and leave everything else as default.

--- End quote ---
I'll put this on the todo list to see what happens.


--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---8. Can we really make a introspecting keybinder work reliably? Wouldn't it be better if we specify commands using code? VStudio has such an approach. And this would make it possible to have the sublime/vscode command windows.

--- End quote ---
I don't know yet what any of this means. I'll do some googling.
 

--- Quote from: oBFusCATed on June 27, 2019, 07:23:34 pm ---I'm on gentoo linux, wx3.0.4+patch and wx-master+asan. Both wx versions behave the same sort of.

--- End quote ---
I'll try to create a VMWare gentoo. But it looks really complicated. It will take some time. I can't find an ISO image like Ubuntu or Mint that VMware Player can just load and run without all that configuration voodoo.

oBFusCATed:
1. The memory leak makes using asan harder. I can learn to ignore some leaks, but it will be best if there are as few known leaks as possible. This would make it easy for me to spot new leaks and problem.
2. ctrl-shift-. and ctrl-shift-t doesn't work on a fresh config. So I do

--- Code: ---rm ~/.config/codeblocks/debug* -v
--- End code ---
and then start codeblocks from codeblocks. For this test I use wx-master (wxwidgets built from recent master and also I'm using asan for everything, but I doubt this last fact matters). But I see a single cbKeyBinder10.ini. Does this mean that it is common for all personalities?

3. See the attached cbKeyBinder10.ini; Linux rev 11750. wx3.0.4.
5. I've found this problem because ctrl-w didn't work.
8. This means that all commands are generated with code, so there would be explicit calls like commandManager.AddCommand(...). Current code relies on properly inspecting (introspecting) the contents of menus to find all the commands. This is less work in the beginning, but it seems unreliable to me.

It will be cool if someday we get something like this https://code.visualstudio.com/assets/docs/getstarted/tips-and-tricks/OpenCommandPalatte.gif (it can also be done with introspection the menus).
It makes it really easy to discover/use obscure features.

oBFusCATed:
Also:
9. alt-pgup/alt-pgdown doesn't work for me. They should be set to prev/next bookmark, but they don't work. :(

Pecan:
@ oBFusCATed

Would you try svn rev 11764 on your gentoo.
Please delete all <personality>.cbKeybinder20.conf files before testing.
(you might not have any because of a bug before rev:11741.)

I re-created the menu accelerator bug, fixed it, and tested on other Linux versions. User config'ed menu accelerators now work correctly on Mint and Ubuntu.
I will fix the memory leak after confirming that you have been successful on gentoo.


--- Quote from: oBFusCATed on June 29, 2019, 10:04:44 am ---2. ctrl-shift-. and ctrl-shift-t doesn't work on a fresh config. [snip] ...
5. I've found this problem because ctrl-w didn't work.
9. alt-pgup/alt-pgdown doesn't work for me. They should be set to prev/next bookmark, but they don't work. :(
But I see a single cbKeyBinder10.ini. Does this mean that it is common for all personalities?

--- End quote ---
Accelerators are now fixed. svn rev:11764 .
I believe that cbKeyBinder10.ini appeared without a personality prefix because you might have been using a cbKeyBinder prior to rev:11741 which corrected obtaining the location of .config/.codeblocks config directory.

Thanks for finding these bugs.

Navigation

[0] Message Index

[#] Next page

Go to full version