SVN 13598 windows 10 64 bits
Step to reproduce :
-- In settings\compiler dialogue choose a compiler with many personal configuration datas .(or at least one in compiler defines to check it)
-- click on "Rename" button to rename it with a new name .
-- close the dialogue with ok
-- save everything in codeblocks
-- close codeblocks
-- reopen codeblocks
-- reopen the settings\compiler dialogue
-- check your renamed compiler
-- all datas have been erased , the compiler is cleared .
Patch added
In compileroptionsdlg.cpp , i have changed some array indexes by pointers , its easyer to deal directly with pointers than with indexes on pointers array and requires less updates .That's why , i have made many changes in this file .
For precisions , this bug happens only on compilers that have been copied from original installed compilers in codeblocks .
eg "Copy of GNU GCC Compiler" . Renaming "Copy of GNU GCC Compiler" to "Copy of GNU GCC2 Compiler" will delete all its personal configuration datas .
compilergcc.patch introduces a new issue when renaming built-in compilers .
I made changes in CompilerOptionsDlg::OnEditCompilerClick .
This issue is fixed .
Last edit: homertp 2024-12-21
Safer test on default compiler in CompilerOptionsDlg::OnEditCompilerClick before removing it from CompilerFactory .
Small changes in CompilerOptionsDlg::OnEditCompilerClick .
compilergcc3.patch replaces compilergcc.patch .
Last edit: homertp 2024-12-21
Hi, thanks for the report.
I just run the steps in your first post, and it looks like the renamed compiler's setting is correct after I restart the C::B, see the image shot below.
What does this mean?
I need to copy twice?
First copy, restart C::B, second copy, restart C::B again?
I don't know the steps.
I just did this, and i don't see the data lost.
Steps are
- in compilers dialog copy a built in compiler eg "GNU GCC Compiler"
- now you have a compiler "Copy of GNU GCC Compiler"
- add custom defines to "Copy of GNU GCC Compiler"
- still in compilers dialog , rename "Copy of GNU GCC Compiler" to "Copy of GNU GCC CompilerR"
- save everything and close the configuration window
- close Codeblocks , and restart it
- reopen the compilers dialog , data configuration of "Copy of GNU GCC CompilerR" are lost
it still happens in codeblock 25.03 , it should be the same in SVN .
To simplify the steps are : copy then rename then restart C::B .
Last edit: homertp 2025-10-04
OK, I think I can reproduce this bug. Thanks.
I'm trying to read the v3 patch, it is a big patch, so it will take some time to understand and test.