Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on Today at 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.
2
Plugins development / Re: Code completion using LSP and clangd
« Last post by ollydbg on Today at 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
3
Help / Re: Smartsense issue with bitwise struct pointing to a HW address
« Last post by scopaev on Today at 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.
4
Using Code::Blocks / Re: release vs debug version
« Last post by stahta01 on Today at 10:56:52 am »
Turn up the warnings and look for un-initialized variables esp. pointers.

Tim S.

5
Using Code::Blocks / Re: release vs debug version
« Last post by Miguel Gimenez on Today at 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".
7
Using Code::Blocks / release vs debug version
« Last post by maxcy on Today at 03:40:26 am »
 :) I have no idea how to go about searching for an answer to my compiler problem!!! I have a fairly large writing a compiler project, I have the code all finished, so it's time to compile it. I did just that for a release version as well as a debugger version. When I run the degub code version all is well!  When I try to run the release version the program comes to an abrupt exit!  Same code, different compiler run time results.  I have no idea what to do to troubleshoot this!
maxcy
8
Using Code::Blocks / Re: compiler args and flags
« Last post by maxcy on Today at 03:26:29 am »
Rather embarrassing! I put the -x compiler parameter after the first argument and all was well! :o
9
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on Yesterday at 05:41:33 pm »
@ollydbg

Note the code below: has only two calls to Append(...)
The first has a definition that defaults type=-1, and the second, when called, has a hard coded type=-1 (platWX.cpp line:2571) set by SetList() before the calling Append().

So it appears that an additional call has been added to your code that sets type to something other than -1 before calling the first Append(...) which calls the second Append().

Maybe that will help find it.
10
Help / Smartsense issue with bitwise struct pointing to a HW address
« Last post by scopaev on Yesterday at 05:02:07 pm »
Hi folks,
I was hoping someone could guide me in the direction of a solution.

When I assign hardware register addresses through a struct, CB is not sensing the new structure.  See example below.

Example:
  typedef struct FooStruct
  {
    uint8
      B0: 1,
      B1: 1,
      B2: 1,
      B3: 1,
      B4: 1,
      B5: 1,
      B6: 1,
      B7: 1;
  } foo_bits_t;
 
  foo_bits_t Var1;
  Var1.                                                                          // POPUP shows up with B0-B7  :D!                 

  foo_bits_t Var2 __attribute__((address(0x123)));
  Var2.                                                                          // NO POPUP  :(

 The extra stuff "__attribute__((address(0x123)))" seems to be causing issues with smartsense (I think that is what CB calls the awesome popup?).
Pages: [1] 2 3 4 5 6 ... 10