Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Help / Re: Codeblocks crash on startup
« Last post by m4rk0 on Yesterday at 03:05:28 pm »
This is a known problem, and was fixed soon after the 20.03 release (see this commit).

As a workaround you can disable the DoxyBlocks plugin.

Thanks! It finally works
2
Help / Re: Codeblocks crash on startup
« Last post by Miguel Gimenez on Yesterday at 11:41:18 am »
This is a known problem, and was fixed soon after the 20.03 release (see this commit).

As a workaround you can disable the DoxyBlocks plugin.
3
Help / Re: Smartsense issue with bitwise struct pointing to a HW address
« Last post by scopaev on Yesterday at 05:45:07 am »
Hi Tim, thanks for the reply.

CB 20.03
Code Completion 1.0 (Installed by default)
Windows 11

Does the CC have a way to add delimiters (looks like code completion is looking for "[ or ;"  after the variable name)?  In my case I would want to use a space " ".
How do I enable the new clang CC to see if it works?

Thanks for any guidance.
4
Help / Re: Smartsense issue with bitwise struct pointing to a HW address
« Last post by stahta01 on September 27, 2023, 11:52:50 pm »
Without the basic information you are not likely to get any help.

Code::Blocks version?

Which Code Completion (CC) are you using the old CC or the new clang CC?

What operating System (OS) are you using?

Note: I do not use CC; so, I cannot help anymore.

Tim S.
5
Help / Codeblocks crash on startup
« Last post by m4rk0 on September 27, 2023, 10:06:39 pm »
Hi, I'm running codeblocks in manjaro kde plasma. Everytime I launch i see a bug report windows  only for a moment. I have attached a screenshot.

It only works when I type
Code
sudo codeblock
. This is the terminal when i type
Code
codeblocks
Code
codeblocks                                                                                     ✔ 
Starting Code::Blocks Release 20.03  rev 11997 Sep  1 2023, 17:04:20 - wx3.2.2 - gcc 13.2.1 (Linux, unicode) - 64 bit
Manager initialized
Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading menubar...
ThreadSearch: loaded
EditorTweaks: loaded
Cccc: loaded
CB_Koders: loaded
OpenFilesList: loaded
ToolsPlus: loaded
Debugger: loaded
Profiler: loaded
CodeSnippets: loaded
Valgrind: loaded
Autosave: loaded
Cscope: loaded
RegExTestbed: loaded
cbDragScroll: loaded
SpellChecker: loaded
SmartIndentLua: loaded
MouseSap: loaded
CodeCompletion: loaded
ProjectOptionsManipulator: loaded
DoxyBlocks: loaded
ScriptedWizard: loaded
NassiShneidermanPlugin: loaded
SymTab: loaded
CodeStat: loaded
BrowseTracker: loaded
wxSmithContribItems: loaded
Abbreviations: loaded
HeaderFixup: loaded
ClassWizard: loaded
SmartIndentCpp: loaded
HexEditor: loaded
wxSmithAui: loaded
EnvVars: loaded
Exporter: loaded
Compiler: loaded
IncrementalSearch: loaded
ProjectsImporter: loaded
EditorConfig: loaded
lib_finder: loaded
wxSmith: loaded
wxSmithMime: loaded
FilesExtensionHandler: loaded
ReopenEditor: loaded
HelpPlugin: loaded
OccurrencesHighlighting: loaded
CppCheck: loaded
rndgen: loaded
cbKeyBinder: loaded
ToDoList: loaded
AutoVersioning: loaded
copystrings: loaded
BYOGames: loaded
AStylePlugin: loaded
ThreadSearch plugin activated
Editor Tweaks plugin: Building menu
Editor Tweaks plugin: making the menu 15
Editor Tweaks plugin: Folding menu
EditorTweaks plugin activated
Cccc plugin activated
Koders query plugin activated
Open files list plugin activated
ToolsPlus plugin activated
Debugger plugin activated
Code profiler plugin activated
Code snippets plugin activated
Valgrind plugin activated
Autosave plugin activated
Cscope plugin activated
Regular expressions testbed plugin activated
DragScroll plugin activated
Loading image: '/usr/share/codeblocks/SpellChecker/16x16/disabled.png' succeeded!
SpellChecker plugin activated
SmartIndentLua plugin activated
MouseSap plugin activated
Code completion plugin activated
Project options manipulator plugin activated
DoxyBlocks plugin activated
Project wizard added for 'Empty project'
Project wizard added for 'Fortran application'
Project wizard added for 'Fortran library'
Project wizard added for 'Fortran DLL'
Project wizard added for 'Console application'
Project wizard added for 'D application'
Project wizard added for 'FLTK project'
Project wizard added for 'GLFW project'
Project wizard added for 'GLUT project'
Project wizard added for 'GTK+ project'
Project wizard added for 'Irrlicht project'
Project wizard added for 'Java application'
Project wizard added for 'Lightfeather project'
Project wizard added for 'Matlab project'
Project wizard added for 'OpenCV project'
Project wizard added for 'OpenGL project'
Project wizard added for 'Ogre project'
Project wizard added for 'Code::Blocks plugin'
Project wizard added for 'QT4 project'
Project wizard added for 'QT4 (shared) project'
Project wizard added for 'QT5 project'
Project wizard added for 'SDL project'
Project wizard added for 'SDL2 project'
Project wizard added for 'SFML project'
Project wizard added for 'Static library'
Project wizard added for 'Shared library'
Project wizard added for 'wxWidgets project'
Build-target wizard added for 'Console'
Build-target wizard added for 'Static library'
Build-target wizard added for 'wxWidgets'
Project wizard added for 'Arduino Project'
Project wizard added for 'ARM Project'
Project wizard added for 'AVR Project'
Project wizard added for 'MSP430 Project'
Project wizard added for 'TriCore Project'
Project wizard added for 'PowerPC Project'
Project wizard added for 'MCS51 Project'
File(s) wizard added for 'Empty file'
File(s) wizard added for 'C/C++ source'
File(s) wizard added for 'D source'
File(s) wizard added for 'C/C++ header'
File(s) wizard added for 'Fortran source'
File(s) wizard added for 'Java source'
Scripted wizard plugin activated
NassiShneidermanPlugin plugin activated
Symbol Table Plugin plugin activated
Code statistics plugin activated
BrowseTracker plugin activated
wxSmith - Contrib Items plugin activated
Abbreviations plugin activated
Header Fixup plugin activated
Class wizard plugin activated
SmartIndentCpp plugin activated
HexEditor plugin activated
wxSmith - Aui plugin activated
Environment variables plugin activated
Source Exporter plugin activated
Added compiler "GNU GCC Compiler"
Added compiler "Intel C/C++ Compiler"
Added compiler "GDC D Compiler"
Added compiler "GNU Fortran Compiler"
Added compiler "G95 Fortran Compiler"
Added compiler "GNU GCC Compiler for ARM"
Added compiler "Tiny C Compiler"
Added compiler "GNU GCC Compiler for TriCore (HighTec)"
Added compiler "GNU GCC Compiler for MSP430 (HighTec)"
Added compiler "GNU GCC Compiler for PowerPC EABI"
Added compiler "GNU GCC Compiler for AVR"
Added compiler "GNU GCC Compiler for Blackfin"
Added compiler "GNU GCC Compiler for Android"
Added compiler "GNU GCC Compiler for PowerPC (HighTec)"
Added compiler "Digital Mars D Compiler"
Added compiler "GNU GCC Compiler for ZPU"
Added compiler "*No Compiler*"
Added compiler "LLVM Clang Compiler"
Added compiler "GNU GCC Compiler for LM8"
Added compiler "Small Device C Compiler"
Added compiler "LLVM D Compiler"
Added compiler "GNU GCC Compiler for LM32"
Added compiler "PGI Fortran Compiler"
Compiler plugin activated
IncrementalSearch plugin activated
Foreign projects importer plugin activated
EditorConfig plugin for Code::Blocks plugin activated
zsh: segmentation fault (core dumped)  codeblocks

This is the the .xml in tmp/codeblock
Code
<?xml version="1.0" encoding="UTF-8"?>
<report version="1.0" kind="exception">
  <system description="Linux 6.5.3-1-MANJARO x86_64"/>
  <modules>
    <module path="[heap]" address="0x5646465a4000" size="0x2bcd000"/>
    <module path="/SYSV00000000" address="0x7f2583800000" size="0x800000"/>
    <module path="/run/user/1000/dconf/user" address="0x7f25ab8b1000" size="0x1000"/>
    <module path="[stack]" address="0x7ffec3c27000" size="0x21000"/>
    <module path="[vdso]" address="0x7ffec3cac000" size="0x2000"/>
  </modules>
  <stack>
    <frame level="0" offset="0xa961c" address="0x564645ba261c" module="/usr/bin/codeblocks"/>
    <frame level="1" offset="0x1b5666" address="0x7f25aa1b5666" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="2" offset="0x3e710" address="0x7f25a983e710" module="/usr/lib/libc.so.6"/>
    <frame level="3" function="DoxyBlocks::OnUpdateUI(wxUpdateUIEvent&amp;)" offset="0x2b" address="0x7f2581d16b2b" module="/usr/lib/codeblocks/plugins/libDoxyBlocks.so"/>
    <frame level="4" function="wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&amp;, wxEvtHandler*, wxEvent&amp;)" offset="0x72" address="0x7f25aa18f402" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="5" function="wxEventHashTable::HandleEvent(wxEvent&amp;, wxEvtHandler*)" offset="0xec" address="0x7f25aa19073c" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="6" function="wxEvtHandler::TryHereOnly(wxEvent&amp;)" offset="0x4f" address="0x7f25aa191a4f" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="7" function="wxEvtHandler::DoTryChain(wxEvent&amp;)" offset="0x43" address="0x7f25aa18f5a3" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="8" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="0xda" address="0x7f25aa191bea" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="9" function="wxMenuBase::UpdateUI(wxEvtHandler*)" offset="0x19d" address="0x7f25aa83011d" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="10" offset="0x3dc7ff" address="0x7f25aa7dc7ff" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="11" function="wxFrameBase::OnInternalIdle()" offset="0xe" address="0x7f25aa7dc98e" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="12" function="wxWindowBase::SendIdleEvents(wxIdleEvent&amp;)" offset="0x17" address="0x7f25aa8839d7" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="13" function="wxFrame::SendIdleEvents(wxIdleEvent&amp;)" offset="0x1a" address="0x7f25aaa1e11a" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="14" function="wxAppBase::ProcessIdle()" offset="0x9e" address="0x7f25aa75f39e" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="15" function="wxApp::DoIdle()" offset="0x7f" address="0x7f25aa9a288f" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="16" offset="0x5a29c8" address="0x7f25aa9a29c8" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="17" offset="0x59f19" address="0x7f25a9f0df19" module="/usr/lib/libglib-2.0.so.0"/>
    <frame level="18" offset="0xb82b7" address="0x7f25a9f6c2b7" module="/usr/lib/libglib-2.0.so.0"/>
    <frame level="19" function="g_main_loop_run" offset="0x127" address="0x7f25a9f0eb47" module="/usr/lib/libglib-2.0.so.0"/>
    <frame level="20" function="gtk_main" offset="0x9f" address="0x7f25a91ecf6f" module="/usr/lib/libgtk-3.so.0"/>
    <frame level="21" function="wxGUIEventLoop::DoRun()" offset="0x26" address="0x7f25aa9b69d6" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="22" function="wxEventLoopBase::Run()" offset="0x32" address="0x7f25aa0d9562" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="23" function="wxAppTraits::RunLoopUntilChildExit(wxExecuteData&amp;, wxEventLoopBase&amp;)" offset="0x61" address="0x7f25aa1b6e21" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="24" function="wxGUIAppTraits::WaitForChild(wxExecuteData&amp;)" offset="0x6a" address="0x7f25aa9a00ba" module="/usr/lib/libwx_gtk3u_core-3.2.so.0"/>
    <frame level="25" function="wxExecute(char const* const*, int, wxProcess*, wxExecuteEnv const*)" offset="0x1446" address="0x7f25aa1bdb96" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="26" function="wxExecute(wxString const&amp;, int, wxProcess*, wxExecuteEnv const*)" offset="0x291" address="0x7f25aa1b04c1" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="27" offset="0x19880e" address="0x7f25aa19880e" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="28" function="PkgConfigManager::DetectLibraries(ResultMap&amp;)" offset="0xdb" address="0x7f2580ac8dbb" module="/usr/lib/codeblocks/plugins/liblib_finder.so"/>
    <frame level="29" function="lib_finder::OnAttach()" offset="0x3c" address="0x7f2580adb10c" module="/usr/lib/codeblocks/plugins/liblib_finder.so"/>
    <frame level="30" function="cbPlugin::Attach()" offset="0xa3" address="0x7f25ab39ee63" module="/usr/lib/libcodeblocks.so.0"/>
    <frame level="31" function="PluginManager::AttachPlugin(cbPlugin*, bool)" offset="0x35" address="0x7f25ab489845" module="/usr/lib/libcodeblocks.so.0"/>
    <frame level="32" function="PluginManager::LoadAllPlugins()" offset="0x472" address="0x7f25ab494a82" module="/usr/lib/libcodeblocks.so.0"/>
    <frame level="33" offset="0xf9831" address="0x564645bf2831" module="/usr/bin/codeblocks"/>
    <frame level="34" offset="0x1835fb" address="0x564645c7c5fb" module="/usr/bin/codeblocks"/>
    <frame level="35" offset="0xa7351" address="0x564645ba0351" module="/usr/bin/codeblocks"/>
    <frame level="36" function="wxEntry(int&amp;, wchar_t**)" offset="0x92" address="0x7f25aa116812" module="/usr/lib/libwx_baseu-3.2.so.0"/>
    <frame level="37" offset="0x8c8d7" address="0x564645b858d7" module="/usr/bin/codeblocks"/>
    <frame level="38" offset="0x27cd0" address="0x7f25a9827cd0" module="/usr/lib/libc.so.6"/>
    <frame level="39" function="__libc_start_main" offset="0x8a" address="0x7f25a9827d8a" module="/usr/lib/libc.so.6"/>
    <frame level="40" offset="0x9e655" address="0x564645b97655" module="/usr/bin/codeblocks"/>
  </stack>
</report>


Thanks
6
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on September 27, 2023, 06:10:35 pm »
Oh, thanks for the help. I looked at my local commits, and this is the only change I made to PlatWX.cpp, which I try to enable the font smooth. I don't have other changes to scintilla related code.

Code
diff --git a/src/sdk/wxscintilla/src/PlatWX.cpp b/src/sdk/wxscintilla/src/PlatWX.cpp
index 247b558c..66d64375 100644
--- a/src/sdk/wxscintilla/src/PlatWX.cpp
+++ b/src/sdk/wxscintilla/src/PlatWX.cpp
@@ -198,7 +198,30 @@ void Font::Create(const FontParameters &fp) {
         false,
         sci2wx(fp.faceName),
         encoding);
+
+#ifdef __WXMSW__
+    // enable the smooth font on Windows by default
+    // font rendering issue when using C::B under windows remote desktop
+    // https://forums.codeblocks.org/index.php/topic,25146.msg171484.html#msg171484
+
+    wxString nativeDesc = font.GetNativeFontInfoDesc();
+    int index = 0;
+    for (size_t pos = 0, start = 0; pos <= nativeDesc.length(); )
+    {
+        pos = nativeDesc.find(";", start);
+        index++;
+        if (index == 14) // the index 14 for wx 3.2.1
+        {
+            // enable the cleartype option of the font
+            nativeDesc.replace(start, pos - start, "5");
+            bool result = font.SetNativeFontInfo(nativeDesc);
+            break;
+        }
+        start = pos+1;
+    }
+#endif // __WXMSW__
     wxFontWithAscent* newFont = new wxFontWithAscent(font);
+
     fid = newFont;
 
 #ifdef HAVE_DIRECTWRITE_TECHNOLOGY

@ollydbg
After many hours, I cannot re-create the error.

Then the only action left is to run both CodeBlocks and clangd_client in "-g" mode in order to catch the assert/crash.

Just copy the devel32_64 versions of them to your release folder after running update32_64.bat.

When the assert happens, click continue and you should get a .RPT with all the line numbers in the backtrace.
7
Plugins development / Re: Code completion using LSP and clangd
« Last post by ollydbg on September 27, 2023, 04:54:19 pm »
Oh, thanks for the help. I looked at my local commits, and this is the only change I made to PlatWX.cpp, which I try to enable the font smooth. I don't have other changes to scintilla related code.

Code
diff --git a/src/sdk/wxscintilla/src/PlatWX.cpp b/src/sdk/wxscintilla/src/PlatWX.cpp
index 247b558c..66d64375 100644
--- a/src/sdk/wxscintilla/src/PlatWX.cpp
+++ b/src/sdk/wxscintilla/src/PlatWX.cpp
@@ -198,7 +198,30 @@ void Font::Create(const FontParameters &fp) {
         false,
         sci2wx(fp.faceName),
         encoding);
+
+#ifdef __WXMSW__
+    // enable the smooth font on Windows by default
+    // font rendering issue when using C::B under windows remote desktop
+    // https://forums.codeblocks.org/index.php/topic,25146.msg171484.html#msg171484
+
+    wxString nativeDesc = font.GetNativeFontInfoDesc();
+    int index = 0;
+    for (size_t pos = 0, start = 0; pos <= nativeDesc.length(); )
+    {
+        pos = nativeDesc.find(";", start);
+        index++;
+        if (index == 14) // the index 14 for wx 3.2.1
+        {
+            // enable the cleartype option of the font
+            nativeDesc.replace(start, pos - start, "5");
+            bool result = font.SetNativeFontInfo(nativeDesc);
+            break;
+        }
+        start = pos+1;
+    }
+#endif // __WXMSW__
     wxFontWithAscent* newFont = new wxFontWithAscent(font);
+
     fid = newFont;
 
 #ifdef HAVE_DIRECTWRITE_TECHNOLOGY
8
Help / Re: Smartsense issue with bitwise struct pointing to a HW address
« Last post by scopaev on September 27, 2023, 03:59:47 pm »
I found another variance that is interesting.

foo_bits_t Var3[1] __attribute__((address(0x123)));
  Var3.                                                                              Works

So a plain variable confuses it, but an array is OK.
9
Using Code::Blocks / Re: release vs debug version
« Last post by stahta01 on September 27, 2023, 10:56:52 am »
Turn up the warnings and look for un-initialized variables esp. pointers.

Tim S.

10
Using Code::Blocks / Re: release vs debug version
« Last post by Miguel Gimenez on September 27, 2023, 10:01:05 am »
Differences among release and debug binaries are optimizations and memory layout, if the release is crashing I would look for a memory corruption. Also exception processing may be different.

You can locate the exit point using intermediate check points, like printing "Phase 1 start" in the console (or a log file) and later "Phase 1 end".
Pages: [1] 2 3 4 5 6 ... 10