Menu

#1085 Codeblocks svn 12306 hangs, GTK colour errors

Undefined
fixed
Bug_Report
2021-05-06
2021-03-25
No

Not sure this is actually a bug, but here goes. Codeblocks hangs when compiling. Around 3 days ago I downloaded and built svn 12306 on a Linux Mint / XFCE system, which is completely up to date.
When Codeblocks is started with --debug-log, and a project is loaded (into the tree), an endless cycle of errors appears and the program hangs. Here's one ...

Call stack:
[01] wxColour::Red() const                   
[02] CCTree::CalculateCrc32(CCTreeItem*, Crc32&) const
[03] CCTree::GetCrc32() const                
[04] ClassBrowserBuilderThread::FillGUITree(bool)
[05] ClassBrowserBuilderThread::BuildTree()  
[06] ClassBrowserBuilderThread::Entry()      
[07] wxThread::CallEntry()                   
[08] 0x7f358d2956c8
[09] 0x7f358bd186db
[10] clone                                   
../src/gtk/colour.cpp(197): assert ""IsOk()"" failed in Green(): invalid colour [in thread 7f357bf52700]

Unsurprisingly, they appear in cycles of three. Needless the say, the compilation problem is a red herring.

Apologies if this is not a bug.

Discussion

1 2 > >> (Page 1 of 2)
  • Teodor Petrov

    Teodor Petrov - 2021-03-25

    Can this be reproduced on a simple project? Can you share your Help -> About -> Information?

     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    Sorry. Didn't really understand your first question. The behaviour is persistent and renders CB unusable. About info follows ...

    Name                   : Code::Blocks
    Version                : svn-r12306
    SDK Version            : 2.6.0
    Scintilla Version      : 3.7.5
    Author                 : The Code::Blocks Team
    E-mail                 : info@codeblocks.org
    Website                : http://www.codeblocks.org
    Scaling factor         : 1.000000
    Detected scaling factor: 1.114583
    Display PPI            : 107x107
    Display count          : 1
    Display 0              : XY=[0,0]; Size=[1280,800]; Primary
    
    wxWidgets Library (wxGTK port)
    Version 3.1.4 (Unicode: wchar_t, debug level: 1),
    compiled at Mar 19 2021 17:06:06
    
    Runtime version of toolkit used is 3.22.
    Compile-time GTK+ version is 3.22.30.
    
     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    Forgot to mention I'm on Linux Mint 19.3 Tricia. Just upgraded, and I think CB started misbehaving at that time too.

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    I'm asking if this problem can be reproduced with a simple sample/hello world project. Can it? Or does it require some specific project?

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    Does it happen if you disable the symbol browser in the settings?
    Have you used the same version in the old OS? What was the old OS?

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26
    • labels: recurring gtk colour error --> gtk3, SymbolBrowser
     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    OK, I can reproduce this with a simple project.

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    Probably this is related to [#1031]

    @Miguel Gimenez do you have any idea what is going on?

     

    Related

    Tickets: #1031

  • Miguel Gimenez

    Miguel Gimenez - 2021-03-26

    The color used for a tree item is invalid, I will look where this colour comes from and also make CalculateCrc32() inmune to an invalid colour,

     
  • Miguel Gimenez

    Miguel Gimenez - 2021-03-26

    The colour isn't used at all, I can ditch it completely or initialize it with wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT)

     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    Not that I know very much about the codebase here, but surely the latter would be safer. More future-proof??? Many thanks to both of you for your time and effort BTW.

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    Ditch it. Remove as much code as possible. :)

     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    There's always that. This is my first time here, so may I ask how long it might take for the changes to result in a new svn?

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    It will be fixed when it is fixed. We're non-profit/non-fulltime, so we cannot provide any guarantees/ETAs or similar.
    If you don't use the symbol browser you could temporarily disable it.

     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    Sorry to appear impatient. I'm not. I've already tried disabling the symbols browser, but it has no effect.

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    You see the colour asserts even if the symbol browser is disabled? Or CB hangs without the asserts?

     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    I see the colour asserts even if the symbol browser is disabled. I imagine CB hangs because of those asserts.

     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    Again I am not familiar with the code base, but when I looked last night, it seemed to me that the colour is being used to build a tree. Surely there's more than one tree in the manager pane.

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    Are you using packages? Can you attach a debugger and post a backtrace from all threads (thread apply all bt in gdb)?

     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    Packages? Sorry, don't understand. I built the program from source. Attach a debugger? Er, maybe. I'll look into it.

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    You can build packages even if you're building from source.
    gdb /usb/bin/codeblocks and then run the apply command when it hangs (probably you'll need to press ctrl-c)

     
  • Miguel Gimenez

    Miguel Gimenez - 2021-03-26

    It can't be ditched, looks like "Find references" does not work when the symbol is used in the include file, i.e. this code inside class' definition is not found:

    void SetItemTextColour(CCTreeItem* item, const wxColour& col) {if (item) item->m_colour = col;}
    

    This patch initializes m_colour properly and checks for validity before accessing it.

     
  • Teodor Petrov

    Teodor Petrov - 2021-03-26

    @Stephen Wilson Can you try the patch and tell us if the hang is gone?

     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    Working on it ...

     
  • Stephen Wilson

    Stephen Wilson - 2021-03-26

    That seems to have done the trick. Many thanks.

     
1 2 > >> (Page 1 of 2)

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.