Menu

#774 Crash / Segmentation Fault when bulk-disabling Plugins

Undefined
fixed
None
Bug_Report
2018-12-15
2018-12-13
Adam
No

Steps to reproduce:
Fetch Code::Blocks from SVN and build it using CodeBlocks_wx30-unix.workspace, then run sh update30
* I used the stable version of codeblocks (17.12) from my distro's repo to perform this build, and set -Og -g into "base" to ensure I get debug symbols. Build took a while first time, but ccache helps subsequent rebuilds.
Clear my ~/.config/codeblocks and ~/.local/share/codeblocks folders and run run.shfrom my build tree'sdevel30 folder.
* Go into the Plugin manager, select a whole bunch (the more the better), and choose "Disable".
* You may need to "thrash" this, by repeatedly enabling and disabling the selection a handful of times.

Expected behaviour:
* Plugins get disabled, application continues to run and work normally

Actual behaviour:
* After some number of plugins are disabled (not constant, and not caused by a specific plugin), Code::Blocks undergoes a segmentation fault. I got a backtrace via coredumpctl gdb and attached it as backtrace-30.txt.

Further notes
The issue doesn't occur in my repo's version of 17.12, nor if I build 17.12 myself (fetching that release from SVN and following the same steps as above, with wx30).
The issue occurs in svn trunk also when using the wx28 build, and I've attached a backtrace of this at backtrace-28.txt.
* I used Code::Blocks to build mainly because I couldn't work out how to get the ./configure + make approach working, but that's a separate issue.

System: Arch Linux x86_64, GCC 8.2.x, wxgtk 3.0.4

If anyone has further questions about my build process, my setup, or about the issue itself, please don't hesitate to ask. In the meantime, I have another bug I'm also going to report here, after which I will attempt to bisect to find when things broke.

2 Attachments

Discussion

  • Adam

    Adam - 2018-12-13

    Unfortunately I forgot about newlines between my section headers, so the formatting is screwed up. The first bullet point list should start a new point at "Clear". Some bullet point were "side points". I'll be more diligent with the Preview feature in future.

    Also, I neglected to mention it, but the current svn commit at time of writing is r11521.

     

    Last edit: Adam 2018-12-13
  • bluehazzard

    bluehazzard - 2018-12-14

    Quick debugging: The crash happens in wxAuiManager::Update()
    It tries to update deleted windows.
    I think this boils down from for example in

    void ToDoList::OnRelease(cb_unused bool appShutDown)
    

    an undock event is fired, and probably later processed. When the window is already destroyed...

    seems to be a deeper bug... Lot of rework?

     
  • Adam

    Adam - 2018-12-14

    Bisection is taking forever on my current setup, with a lot of intereference from previously compiled objects (and cleaning them obviously means it takes forever), but so far it seems that this behaviour was introduced between r11455 and r11521.

     
  • Adam

    Adam - 2018-12-14

    The end result of my bisect is that r11474 is the responsible commit for this crash.

    https://sourceforge.net/p/codeblocks/code/11474/

    • openfilelist: Fix memory leak when unloading the plugin

    The docs for SetImageList explicitly state that the user is responsiblefor deleting the image list object.

    All tested commits before this one (up to 17.12 stable) do not exhibit the bug on my system. This commit and all tested ones after it do.

    I added another backtrace.

     

    Last edit: Adam 2018-12-14
  • Teodor Petrov

    Teodor Petrov - 2018-12-15
    • status: open --> fixed
    • assigned_to: Teodor Petrov
     
  • Adam

    Adam - 2018-12-15

    There is in fact another issue with ThreadSearch, essentially identical to this, but more consistently reproducible. I think obfuscated is looking at it already, though, so I suspect a new report probably isn't necessary.

    Specifically in ThreadSearchViewManagerMessagesNotebook::RemoveViewFromManager() (), which is called by OnRelease().

     

    Last edit: Adam 2018-12-15

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.