Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

New UserVarManager implementation

<< < (3/4) > >>

AndrewCot:
Do you have a branch somewhere with a enhanced/working version with the dlgAskGlobalUsrVar dialog wired up and working? I would like to test it with this in it as this the missing bit from the two patches. I have merged all of the changes and the updates to the previous patch from the test/global_user_var_to_prject/1 branch.

So far from an end user perspective it looks and feels like nothing has changed. Also from my look at the patch and merging the changes the code changes have impacted on very few files, which very good and I like it as this means that most devs will not notice any changes as no plugins had to change.

Overall it looks like a very good replacement for the existing code. I still need to do some more testing in the next week using it in the real world.

AndrewCot:
Another bug:On Linux Ubuntu 22.04 with wxWidget 3.0.5 UsrGlblMgrEditDialog::UpdateChoices() crashes with the following when I try to open the global variables dialog when you specify a new config file with no global variables defined with the following bt:


--- Code: ---In  ()
#2  0x0000555555777c9a in std::__detail::_Map_base<wxString, std::pair<wxString const, std::unordered_map<wxString, UserVariable, std::hash<wxString>, std::equal_to<wxString>, std::allocator<std::pair<wxString const, UserVariable> > > >, std::allocator<std::pair<wxString const, std::unordered_map<wxString, UserVariable, std::hash<wxString>, std::equal_to<wxString>, std::allocator<std::pair<wxString const, UserVariable> > > > >, std::__detail::_Select1st, std::equal_to<wxString>, std::hash<wxString>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>, true>::at (this=0x7fffffffd610, __k=...) at /usr/include/c++/11/bits/hashtable_policy.h:758
/usr/include/c++/11/bits/hashtable_policy.h:758:23678:beg:0x555555777c9a
At /usr/include/c++/11/bits/hashtable_policy.h:758
#2  0x0000555555777c9a in std::__detail::_Map_base<wxString, std::pair<wxString const, std::unordered_map<wxString, UserVariable, std::hash<wxString>, std::equal_to<wxString>, std::allocator<std::pair<wxString const, UserVariable> > > >, std::allocator<std::pair<wxString const, std::unordered_map<wxString, UserVariable, std::hash<wxString>, std::equal_to<wxString>, std::allocator<std::pair<wxString const, UserVariable> > > > >, std::__detail::_Select1st, std::equal_to<wxString>, std::hash<wxString>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>, true>::at (this=0x7fffffffd610, __k=...) at /usr/include/c++/11/bits/hashtable_policy.h:758
/usr/include/c++/11/bits/hashtable_policy.h:758:23678:beg:0x555555777c9a
At /mnt/d/Andrew_Development/Work_Installers/CodeBLocks_Private_Experimental_GCC/src/src/uservardlgs.cpp:527
#4  0x000055555576d318 in UsrGlblMgrEditDialog::UpdateChoices (this=0x7fffffffd170) at /mnt/d/Andrew_Development/Work_Installers/CodeBLocks_Private_Experimental_GCC/src/src/uservardlgs.cpp:527
/mnt/d/Andrew_Development/Work_Installers/CodeBLocks_Private_Experimental_GCC/src/src/uservardlgs.cpp:527:15867:beg:0x55555576d318
At /mnt/d/Andrew_Development/Work_Installers/CodeBLocks_Private_Experimental_GCC/src/src/uservardlgs.cpp:527
#4  0x000055555576d318 in UsrGlblMgrEditDialog::UpdateChoices (this=0x7fffffffd170) at /mnt/d/Andrew_Development/Work_Installers/CodeBLocks_Private_Experimental_GCC/src/src/uservardlgs.cpp:527
/mnt/d/Andrew_Development/Work_Installers/CodeBLocks_Private_Experimental_GCC/src/src/uservardlgs.cpp:527:15867:beg:0x55555576d318

--- End code ---
Line 527 is:

--- Code: --- vars.reserve(m_varMap.at(m_CurrentSetName).size());
--- End code ---

BlueHazzard:
Thank you for reporting. This should be fixed in the branch "test/global_user_var_to_project/1/rebase/before_default_var/1" on my github repo
this branch is the branch before introducing the default variables in the project file.
the branch "test/global_user_var_to_project/1/rebase/after_default_var/1" introduces the default variables in the project

AndrewCot:
Thanks for making the changes. I will grab the git update today or tomorrow and give it a go.

AndrewCot:
The uservardlgs.cpp file does not compile on the Mac without changing the includes to the following:

--- Code: ---#include <wx/dirdlg.h>
#include <wx/filedlg.h>
#include <wx/sizer.h>
#include <wx/stattext.h>

#include "uservardlgs.h"
#include "annoyingdialog.h"
#include "tinywxuni.h"
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version