Menu

#1508 Compiler plugin : renaming a compiler deletes all its personal configuration datas .

Undefined
open
nobody
Patch
2025-10-05
2024-12-18
homertp
No

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 .

1 Attachments

Discussion

  • homertp

    homertp - 2024-12-18

    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
  • homertp

    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
  • ollydbg

    ollydbg - 2025-10-04
    • labels: --> Compiler, compilergcc
     
  • ollydbg

    ollydbg - 2025-10-04

    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.

     
  • ollydbg

    ollydbg - 2025-10-04

    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 .

    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.

     
  • ollydbg

    ollydbg - 2025-10-04

    First copy, restart C::B, second copy, restart C::B again?

    I just did this, and i don't see the data lost.

     
  • homertp

    homertp - 2025-10-04

    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
  • ollydbg

    ollydbg - 2025-10-04

    OK, I think I can reproduce this bug. Thanks.

     
  • ollydbg

    ollydbg - 2025-10-05

    I'm trying to read the v3 patch, it is a big patch, so it will take some time to understand and test.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.