Menu

#791 Compiler flags not shown

Undefined
open
nobody
Bug_Report
2019-01-30
2019-01-22
No

Using Windows 10 64 bits, wx312 32 bits and GCC 7.2.0. The compiler flags are not shown, either in the Settings->Compiler window or in the Project->Build options window. I have attached a screen capture.

Using Windows 10 32 bits or Windows 7 64 bits there is no problem.

I'm trying to debug this, but the flow is a little obscure for me. The compiler flags are loaded when C::B starts, but when CompilerOptionsDlg is constructed the options container is empty.

In line 350 from compileroptionsdlg.cpp

        m_Options = CompilerFactory::GetCompiler(compilerIdx)->GetOptions();

m_Options.GetCount() returns 0.

A similar error happened with another container (the splash screen cleared an unrelated container), so I think it is a memory corruption issue.

1 Attachments

Discussion

  • bluehazzard

    bluehazzard - 2019-01-22

    I too encounter this from time to time.
    The last time it happened to me was when the compiler flags xml file was corrupt. I did not make a backup of the corrupt file so i could not debug it...

     
  • Miguel Gimenez

    Miguel Gimenez - 2019-01-22

    I copied the output31 folder from the non-working W10-64 to W10-32 and it worked OK, so file corruption is strange.

    I tried also deleting default.conf, it didn't help.

     
  • Teodor Petrov

    Teodor Petrov - 2019-01-23

    The compiler flags aren't stored in default.conf they are in a seprate xml file/s. Search the folder where your default.conf is.

     
    • Miguel Gimenez

      Miguel Gimenez - 2019-01-24

      I know they are under share/Codeblocks/compilers, in fact they are loaded correctly when C::B starts. If I copy the output31 folder to a clean computer the options show correctly.

      I deleted defalt.conf just in case, was a quick test,

       
  • Miguel Gimenez

    Miguel Gimenez - 2019-01-29

    Teodor was right, I was looking at the xml below codeblocks.exe and needed to look under the data folder. I didn't know there were xml files there, in fact my other computers don't have them, but it was the culprit. I moved it and all is fine now.

    I attach it for forensic purpose. Please close the ticket.

     
  • bluehazzard

    bluehazzard - 2019-01-29

    Is this the corrupt xml file, or was no file there?

     
    • Miguel Gimenez

      Miguel Gimenez - 2019-01-29

      This is the file that was in Roaming/CodeBlocks/share/codeblocks/compilers, I don't know if it is corrupt, but removing it made the options appear again. This file is not present in my other computers, and I don't know how it arrived there.

      It lacks Option entries, but I don't know if this is normal behaviour.

       
  • Teodor Petrov

    Teodor Petrov - 2019-01-30

    I've hit the same problem on my testing install. Not sure how this happened, but it is something that we need to fix. So I think I'll leave this open until we know the culprit...

    Probably we should inspect the code which generates these xml files and then we'll have some idea how to reproduce this reliably. But at the moment I don't have time to do it. If someone is interested I'll be happy to hear the results of the investigation.

     

Log in to post a comment.