Author Topic: cb trunk compiler plugin stopped working (antergos, wx 3.1.1 trunk)  (Read 4211 times)

Offline blauzahn

  • Almost regular
  • **
  • Posts: 156

starting cb hangs on my machines during startup and eats up memory.

I observed this across 3 machines consistently an reproducibly over
the last days. All are Antergos x86_64 GNU/Linux. I regularly build
wxwidgets and cb on Ubuntu 16.04, Antergos and (sometimes) on FreeBSD
and have used wx 3.1.1 trunk for several months now.
Setting wx trunk set back to 2 weeks did not fix this. Still not sure,
whether the root cause is in cb or wx.

On Ubuntu, this issue does not appear.

Code
$ codeblocks --safe-mode

works

deleting ~/.config/codeblocks and ~/.local/share/codeblocks did not help.

Has anybody seen this? I appreciate any hint. Did not find anything
with brief search in bug tracker or mailings on codeblocks.org and
wxwidgets.org. Will try to examine that myself later.

Thanks in advance.


gdb backtrace:

Code
$ gdb /usr/local/bin/codeblocks 
GNU gdb (GDB) 8.0.1

[...]

Reading symbols from /usr/local/bin/codeblocks...done.
(gdb) r
Starting program: /usr/local/bin/codeblocks
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Starting Code::Blocks svn build  rev 11278 Jan 24 2018, 09:30:22 - wx3.1.1 (Linux, unicode) - 64 bit
Initialize EditColourSet .....
[New Thread 0x7fffe9e45700 (LWP 114319)]
[New Thread 0x7fffe9644700 (LWP 114320)]
[New Thread 0x7fffe8e43700 (LWP 114321)]
Initialize EditColourSet: done.
Loading menubar...
[New Thread 0x7fffdbfff700 (LWP 114322)]
[New Thread 0x7fffdb7fe700 (LWP 114323)]
[New Thread 0x7fffdaffd700 (LWP 114324)]
cbKeyBinder: loaded
SmartIndentCpp: loaded

[...]

Abbreviations plugin activated
Project options manipulator plugin activated
Regular expressions testbed plugin activated
Added compiler "GNU GCC Compiler"
^C
Thread 1 "codeblocks" received signal SIGINT, Interrupt.
0x00007ffff19ea074 in __memcpy_ssse3 () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff19ea074 in __memcpy_ssse3 () at /usr/lib/libc.so.6
#1  0x00007ffff4f95198 in wxMBConv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) const ()
    at /usr/local/lib/libwx_baseu-3.1.so.1
#2  0x00007ffff4fccfe7 in wxTextInputStream::GetChar() () at /usr/local/lib/libwx_baseu-3.1.so.1
#3  0x00007ffff4fcd246 in wxTextInputStream::ReadLine() () at /usr/local/lib/libwx_baseu-3.1.so.1
#4  0x00007ffff506999a in ReadAll(wxInputStream*, wxArrayString&) () at /usr/local/lib/libwx_baseu-3.1.so.1
#5  0x00007ffff5069c30 in wxDoExecuteWithCapture(wxString const&, wxArrayString&, wxArrayString*, int, wxExecuteEnv const*) () at /usr/local/lib/libwx_baseu-3.1.so.1
#6  0x00007fffc12a06a3 in CompilerMINGW::SetVersionString() () at /usr/local/lib/codeblocks/plugins/libcompiler.so
#7  0x00007fffc129fa57 in CompilerMINGW::CompilerMINGW(wxString const&, wxString const&) ()
    at /usr/local/lib/codeblocks/plugins/libcompiler.so
#8  0x00007fffc127b4ab in CompilerGCC::DoRegisterCompilers() () at /usr/local/lib/codeblocks/plugins/libcompiler.so
#9  0x00007fffc128470f in CompilerGCC::OnAttach() () at /usr/local/lib/codeblocks/plugins/libcompiler.so
#10 0x00007ffff76ba603 in cbPlugin::Attach() () at /usr/local/lib/libcodeblocks.so.0
#11 0x00007ffff77baf65 in PluginManager::AttachPlugin(cbPlugin*, bool) () at /usr/local/lib/libcodeblocks.so.0
#12 0x00007ffff77be06e in PluginManager::LoadAllPlugins() () at /usr/local/lib/libcodeblocks.so.0
#13 0x0000555555673935 in MainFrame::ScanForPlugins() ()
#14 0x000055555567931c in MainFrame::MainFrame(wxWindow*) ()
#15 0x00005555555e54b0 in CodeBlocksApp::InitFrame() ()
#16 0x00005555555eaa53 in CodeBlocksApp::OnInit() ()
#17 0x00007ffff4f6ab62 in wxEntry(int&, wchar_t**) () at /usr/local/lib/libwx_baseu-3.1.so.1
#18 0x00005555555d1442 in main ()
(gdb) c
Continuing.
[Thread 0x7fffdaffd700 (LWP 114324) exited]
^C
Thread 1 "codeblocks" received signal SIGINT, Interrupt.
0x00007ffff4f94ed4 in wxMBConv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) const ()
   from /usr/local/lib/libwx_baseu-3.1.so.1
(gdb) bt
#0  0x00007ffff4f94ed4 in wxMBConv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) const ()
    at /usr/local/lib/libwx_baseu-3.1.so.1
#1  0x00007ffff4fccfe7 in wxTextInputStream::GetChar() () at /usr/local/lib/libwx_baseu-3.1.so.1
#2  0x00007ffff4fcd246 in wxTextInputStream::ReadLine() () at /usr/local/lib/libwx_baseu-3.1.so.1
#3  0x00007ffff506999a in ReadAll(wxInputStream*, wxArrayString&) () at /usr/local/lib/libwx_baseu-3.1.so.1
#4  0x00007ffff5069c30 in wxDoExecuteWithCapture(wxString const&, wxArrayString&, wxArrayString*, int, wxExecuteEnv const*) () at /usr/local/lib/libwx_baseu-3.1.so.1
#5  0x00007fffc12a06a3 in CompilerMINGW::SetVersionString() () at /usr/local/lib/codeblocks/plugins/libcompiler.so
#6  0x00007fffc129fa57 in CompilerMINGW::CompilerMINGW(wxString const&, wxString const&) ()
    at /usr/local/lib/codeblocks/plugins/libcompiler.so
#7  0x00007fffc127b4ab in CompilerGCC::DoRegisterCompilers() () at /usr/local/lib/codeblocks/plugins/libcompiler.so
#8  0x00007fffc128470f in CompilerGCC::OnAttach() () at /usr/local/lib/codeblocks/plugins/libcompiler.so
#9  0x00007ffff76ba603 in cbPlugin::Attach() () at /usr/local/lib/libcodeblocks.so.0
#10 0x00007ffff77baf65 in PluginManager::AttachPlugin(cbPlugin*, bool) () at /usr/local/lib/libcodeblocks.so.0
#11 0x00007ffff77be06e in PluginManager::LoadAllPlugins() () at /usr/local/lib/libcodeblocks.so.0
#12 0x0000555555673935 in MainFrame::ScanForPlugins() ()
#13 0x000055555567931c in MainFrame::MainFrame(wxWindow*) ()
#14 0x00005555555e54b0 in CodeBlocksApp::InitFrame() ()
#15 0x00005555555eaa53 in CodeBlocksApp::OnInit() ()
#16 0x00007ffff4f6ab62 in wxEntry(int&, wchar_t**) () at /usr/local/lib/libwx_baseu-3.1.so.1
#17 0x00005555555d1442 in main ()
(gdb)
#0  0x00007ffff4f94ed4 in wxMBConv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) const ()
    at /usr/local/lib/libwx_baseu-3.1.so.1
#1  0x00007ffff4fccfe7 in wxTextInputStream::GetChar() () at /usr/local/lib/libwx_baseu-3.1.so.1
#2  0x00007ffff4fcd246 in wxTextInputStream::ReadLine() () at /usr/local/lib/libwx_baseu-3.1.so.1
#3  0x00007ffff506999a in ReadAll(wxInputStream*, wxArrayString&) () at /usr/local/lib/libwx_baseu-3.1.so.1
#4  0x00007ffff5069c30 in wxDoExecuteWithCapture(wxString const&, wxArrayString&, wxArrayString*, int, wxExecuteEnv const*) () at /usr/local/lib/libwx_baseu-3.1.so.1
#5  0x00007fffc12a06a3 in CompilerMINGW::SetVersionString() () at /usr/local/lib/codeblocks/plugins/libcompiler.so
#6  0x00007fffc129fa57 in CompilerMINGW::CompilerMINGW(wxString const&, wxString const&) ()
    at /usr/local/lib/codeblocks/plugins/libcompiler.so
#7  0x00007fffc127b4ab in CompilerGCC::DoRegisterCompilers() () at /usr/local/lib/codeblocks/plugins/libcompiler.so
#8  0x00007fffc128470f in CompilerGCC::OnAttach() () at /usr/local/lib/codeblocks/plugins/libcompiler.so
#9  0x00007ffff76ba603 in cbPlugin::Attach() () at /usr/local/lib/libcodeblocks.so.0
#10 0x00007ffff77baf65 in PluginManager::AttachPlugin(cbPlugin*, bool) () at /usr/local/lib/libcodeblocks.so.0
#11 0x00007ffff77be06e in PluginManager::LoadAllPlugins() () at /usr/local/lib/libcodeblocks.so.0
#12 0x0000555555673935 in MainFrame::ScanForPlugins() ()
#13 0x000055555567931c in MainFrame::MainFrame(wxWindow*) ()
#14 0x00005555555e54b0 in CodeBlocksApp::InitFrame() ()
#15 0x00005555555eaa53 in CodeBlocksApp::OnInit() ()
#16 0x00007ffff4f6ab62 in wxEntry(int&, wchar_t**) () at /usr/local/lib/libwx_baseu-3.1.so.1
#17 0x00005555555d1442 in main ()
(gdb)


wxwidgets was build from current vanilla trunk with

Code
(cd build && ../trunk/configure --with-cxx=14)


Code
Configured wxWidgets 3.1.1 for `x86_64-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support for GTK+ printing libnotify
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no

No other wxwidgets version is or has been installed on this fresh OS installation.


cb was build as usual via Makefile (excerpt):

Code
PREFIX=/usr/local

bootstrap:
(cd trunk && ACLOCAL_FLAGS="-I `wx-config --prefix`/share/aclocal" ./bootstrap)

config:
mkdir -p build
(cd build && ../trunk/configure --prefix=/usr/local --with-contrib-plugins=all,-NassiShneiderman)

install:
-@if [ -d $(PREFIX)/share/codeblocks ]; then rm -rf $(PREFIX)/share/codeblocks; fi
-@if [ -d $(PREFIX)/lib/codeblocks ]; then rm -rf $(PREFIX)/lib/codeblocks; fi
(cd $(BUILDDIR) && $(MAKE) install)
mkdir -p $(PREFIX)/share/codeblocks/locale/de_DE
install -m 644 de_codeblocks.mo $(PREFIX)/share/codeblocks/locale/de_DE/de_codeblocks.mo

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: cb trunk compiler plugin stopped working (antergos, wx 3.1.1 trunk)
« Reply #1 on: January 24, 2018, 11:34:48 am »
Are you sure you don't have file from older installations?
Using /usr/local as prefix is bad, because there is no way to do a reliable cleanup.
It is better to use a prefix where cb will be installed alone. I use ~/software/cb for example. Same is true for wxwidgets as well.
And finally on ubuntu it is best to build packages, it is a lot less hassle (execute one command to build the packages and another to install them).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline blauzahn

  • Almost regular
  • **
  • Posts: 156
Re: cb trunk compiler plugin stopped working (antergos, wx 3.1.1 trunk)
« Reply #2 on: January 24, 2018, 12:12:01 pm »
yes, there are no files from an old installation. I saw this immediately after the first installation of OS, wx and cb.
Yet, I will recheck that now after I tried recompilations a few times.

On ubuntu I use checkinstall to install wxwidgets. This helps to clean up. So far, it worked sufficiently well.
By default, it builds and installs the deb package in one command instead of two, though. Agreed,
building safely at arms length and only then install is better.

For cb, I usually move the 2 directories where cb installs things completely away. before I install
the new stuff. That worked for me for years. Files in /usr/bin is another story.

Nevertheless, , I will try your alternative ~/software/cb when I find the time.
Did you create a symlink to the codeblocks binary or expand the path? I personally do not like the latter very much.

Thank you obfuscated!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: cb trunk compiler plugin stopped working (antergos, wx 3.1.1 trunk)
« Reply #3 on: January 24, 2018, 08:57:01 pm »
Nevertheless, , I will try your alternative ~/software/cb when I find the time.
Make sure to pass the full path, because some tools choke on ~.

Did you create a symlink to the codeblocks binary or expand the path? I personally do not like the latter very much.
What do you mean by this? If I'm adding a symlink in /usr/local/bin or something similar?
No, I use this cb only for testing. The one I'm using regularly is installed from a package!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline blauzahn

  • Almost regular
  • **
  • Posts: 156
Re: cb trunk compiler plugin stopped working (antergos, wx 3.1.1 trunk)
« Reply #4 on: January 25, 2018, 10:01:24 pm »
Quote
Make sure to pass the full path, because some tools choke on ~.
Will do.

Quote
What do you mean by this? If I'm adding a symlink in /usr/local/bin or something similar?
No, I use this cb only for testing. The one I'm using regularly is installed from a package!
Ah, I see. Yes, that makes sense.

Thank you.