Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
CodeBlock crashes in Linux
tigerbeard:
For some time I keep seeing C::B crahes in Linux. Today I could now narrow it down to be quite reproducable on my system (I checked one PC and Laptop). I am using Build SVN12487 on Ubuntu 18.04LTS, gcc 7.4.0.
Here is the procedure to reproduce it:
Preparation:
1. Create a new Console Prokject with the default GCC.
2. Change the code to the following and save the project
--- Code: ---class CTest
{
void foo();
int nBar;
};
void CTest::foo() {
}
main()
{
return 0;
}
--- End code ---
1. Open the project. Select the Symbol Browser Tab and open CTest. It should show the function and the member variable
2. change: void CTest::foo() -> int CTest::foo()
3. Ctrl-S to save.
4. Double click on the symbol browser tree on "foo()" or "nBar"
I observed one of the following behaviours
a) ASSERT Window. The Backtrace includes "OnTreeDoubleClick". After the Assert windows I always get a crash with a few more clicks to various symbol tree items
b) crash
c) C:B hangs, so I have to kill the process.
I tried the same in the Windows version. There is no problem. I noted, that after saving the file in windows the tree is modified, this is missing in Linux. It seems that I can avoid the problem by re-parsing the tree every time.
Can someone please verify that on another system?
AndrewCot:
I followed the process as best I could and I did not get any crash. I would first suggest updating your C::B to the latest nightly build and try it.
My testing was done on the following:
XUbuntui 20.04 (updated yesterday)
C::B Nightly SVN-r12535 using wxWidgets 3.0.5
C::B help->about->information shows:
Name : Code::Blocks
Version : svn-r12535
SDK Version : 2.16.0
Scintilla Version : 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : http://www.codeblocks.org
OS : Linux 5.14.11-051411-generic x86_64
Scaling factor : 1.000000
Detected scaling factor: 0.989583
Display PPI : 96x95
Display count : 1
Display 0 : XY=[0,0]; Size=[1920,975]; Primary
wxWidgets Library (wxGTK port)
Version 3.0.5 (Unicode: wchar_t, debug level: 1),
Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.20.
tigerbeard:
Thanks for testing.
Great new news that it seems to be a local item here.
Seems like I have an older Linux version 4.15.0 and also an older GTK 2.24.32 and runtime toolkit 2.24.
I will check the same build you are using.
Miguel Gimenez:
--- Quote ---I noted, that after saving the file in windows the tree is modified, this is missing in Linux.
--- End quote ---
That is selectable, look for Update parser when typing (on save otherwise) in Settings -> Editor -> Code Completion. Checking the option will increase CPU consumption, though.
tigerbeard:
I compiled the 12535, current nightly. Same behavior. I tested both checked and unchecked at "Update parser when typing (on save otherwise)" in Settings -> Editor -> Code Completion.
Could that be to GTK2? For compiling I used the system repository dependencies, i.e.
--- Code: --- sudo apt install libwxgtk3.0-dev libboost-system-dev fakeroot debhelper cdbs libgtk2.0-dev libgamin-dev libboost-dev libhunspell-dev
--- End code ---
and then
--- Code: ---./bootstrap
./debian/setup_control.sh
dpkg-buildpackage -us -uc
--- End code ---
The resulting debfiles I installed with
--- Code: ---dpkg -i *.deb
--- End code ---
Here is the system Info.
Name : Code::Blocks
Version : svn-r12535
SDK Version : 2.16.0
Scintilla Version : 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : http://www.codeblocks.org
OS : Linux 4.15.0-159-generic x86_64
Scaling factor : 1,000000
Detected scaling factor: 0,989583
Display PPI : 96x95
Display count : 1
Display 0 : XY=[0,0]; Size=[1920,1080]; Primary
wxWidgets Library (wxGTK port)
Version 3.0.4 (Unicode: wchar_t, debug level: 1),
Runtime version of toolkit used is 2.24.
Compile-time GTK+ version is 2.24.32.
Navigation
[0] Message Index
[#] Next page
Go to full version