Author Topic: V 20.03 startup fails w/debugging assertion failure if not running as admin  (Read 1299 times)

Offline caonen8425

  • Single posting newcomer
  • *
  • Posts: 4
Running C::B on Windows 7 Pro 64

Just installed v20.03 a few days ago.  About day 2 into using it, startup began failing with a 'debugging check...assertion failure' in GetWeightClosestToNumericValue(). Screen snippet attached (hopefully).  I never quit out of C::B with the debugger running. Admittedly, during the time period this failure began, I was still tweaking the toolchain and search directory settings, so that is certainly suspect. But I fail to understand how ensuring the use of 64-bit tools, libs, et al would throw a debugger check assertion at startup when the debugger is not even running.

If I start C::B with 'run as administrator', the error does NOT occur.

In all other respects, to-date, v20.03 has been solid for me.

I've never before needed to run C::B with admin privileges, and it seems insane to do so unless needed by the specific app under development.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12819
    • Travis build status
What happens if you click continue?

This is supposedly a known problem in wx which we should have fixed.
@Killerbot have you applied the patch for the font issue to our version of wx?
(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 killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5251
which specific path are you talking about ?
I will compare with the patches I have carried out, somewhere described in the forum, but also in a log file in my windows partition.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12819
    • Travis build status
The one related to the fonts or fontinfo. There was some rounding problem. Ollydbg reported it and it was fixed.
(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 stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Attached patch file. I am using to patch wx3.1.3.

Quote

Date: Thu, 16 Jan 2020 00:07:06 +0100
Subject: Allow parsing all fractional sizes in wxFont descriptions

Tim S.
« Last Edit: April 14, 2020, 12:28:06 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline caonen8425

  • Single posting newcomer
  • *
  • Posts: 4
Obfuscated,

Sorry for the delay in responding.  Hitting 'continue' results in a repetition of the same assertion failure.  I see that a patch has been offered.  I have never before applied a patch...I will check this out. 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Obfuscated,

Sorry for the delay in responding.  Hitting 'continue' results in a repetition of the same assertion failure.  I see that a patch has been offered.  I have never before applied a patch...I will check this out.

My patch had to do with fonts; I have no idea if it will help the debugging issue.

Edit: oBFusCATed suggested it would.
Edit2: You also need or should apply the other wxWidgets changes done by Killerbot.
And, use the same build/make options. This should result in wxWidgets DLL that could be replacing the current one. Note: The same GCC Compiler is needed to avoid have to rebuild Code::Blocks.

Tim S.
 
« Last Edit: April 16, 2020, 06:10:57 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline caonen8425

  • Single posting newcomer
  • *
  • Posts: 4
This is my first experience with C::B patches, and I see it is in source form.
 
I am not currently set up to build C::B components from source. Before I go down that road to apply a patch, I'd like more certainty this patch will fix my specific problem. If there is more documentation I can provide to verify this, please advise. Secondly, where do I find a list (and access) to any pre/co-req patches that must be applied with this patch.  And, finally, since I've never applied a patch, is there some 'how to' documentation for applying patches (haven't found any yet)?.

And then, none of this discussion explains (to me) why this debugging assertion failure vanishes when I run C::B as Administrator.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12819
    • Travis build status
Because the administrator has a different config file probably.
Can you find the default.conf in AppData/Codeblocks and open it in text editor and search for something like
Code: [Select]
<FONT>
<str>
<![CDATA[Fira Code Light 9]]>
</str>
</FONT>

What is the value you're using?
(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 sodev

  • Regular
  • ***
  • Posts: 403
I am pretty sure this is the fontsize bug of wxWidgets, the easiest way to fix it is to simply edit the configuration file and choose another font size that doesn't cause the rounding error. However depending on the chosen value, editing codeblocks settings through its dialogs might change the value again to something that causes the error.

The bug is not in CodeBlocks but wxWidgets, you need to update that library. Instead of applying that patch i would simply build a recent snapshot of master instead.

About fixing the issue by launching CodeBlocks as admin, most probably your regular user account doesn't have admin rights so launching as admin does not simply upgrade your rights through UAC but switches to another account and on that one you have your own configuration file that uses other settings that don't trigger that bug.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12819
    • Travis build status
The bug is not in CodeBlocks but wxWidgets, you need to update that library. Instead of applying that patch i would simply build a recent snapshot of master instead.
I would advice against this practice, especially if one is to keep using the same codeblocks.exe without a rebuild.
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12819
    • Travis build status
@killerbot: Do you have the patch from this post http://forums.codeblocks.org/index.php/topic,23801.msg162332.html#msg162332 applied to the shipped version of wx?
(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 caonen8425

  • Single posting newcomer
  • *
  • Posts: 4
Obfuscated,

I see one straightforward difference (10 v 10.2) between the admin and user font settings.
Changing the user setting from '10.2' to '10' resolved the start up assertion failure. 

admin:
      <FONT>
         <str>
            <![CDATA[1;10;-17;0;0;0;400;0;0;0;1;0;0;2;48;Courier New]]>
         </str>
      </FONT>

user:
      <FONT>
         <str>
            <![CDATA[1;10.2;-17;0;0;0;400;0;0;0;1;0;0;2;48;Courier New]]>
         </str>
      </FONT>

Thanks much.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
I built the DLL with the font patch it can be found https://github.com/stahta01/stahta01.github.io/blob/master/wxWidgets/wxmsw313u_gcc_cb.dll

Build command used
Code: [Select]
mingw32-make -f makefile.gcc VENDOR=cb CXXFLAGS+="-std=c++11" MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release

Edit: I built this code https://github.com/stahta01/wxwidgets_master_fork/commits/wxwidgets3.1.3_git
Note: I had to run this command before building.
Code: [Select]
rm -f include/wx/msw/setup.h
Edit: Built using the Compiler packaged with CB 20.03 64 bit.

Tim S.
« Last Edit: April 17, 2020, 12:45:03 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org