Author Topic: wxWidgets Debug Alert - assertion failed  (Read 13147 times)

Offline Zeus_

  • Single posting newcomer
  • *
  • Posts: 4
wxWidgets Debug Alert - assertion failed
« on: April 29, 2020, 12:07:20 pm »
So, I recently installed CB 20.03. Prior to this, I was using CB 17.12. I usually don't close IDE applications (VS, CB, etc) that take a lot of time to startup. Yesterday, however, I had to restart my laptop (and hence, close the application) for some updates (Windows :p). After restart, I tried using CB 20.03 again and I've been getting this error message:

Code
..\..\wx\font.h(282): assert "numWeight > 0" failed in GetWeightClosestToNumericValue().

I have no clue as to what this means. I then tried using CB 17.12 and this error still continued to happen. Just 15 mins ago, I uninstalled and reinstalled to see if it fixes the issue but nope, I'm getting the same error. There's two options: Stop, Continue. Stop kills the program startup while Continuing gives the same error message again and again until it finally starts up. However, even when it does startup, the fonts and styles are all messed up and everything looks creepy. I have not tried changing any settings remotely related to font in the past and to only setting I've meddled with is that of the compiler installation directory and debugger settings and I don't know what could be causing this issue. Perhaps, someone who's faced this and has been able to fix the issue can help me out. If any more information is required and I haven't made myself clear, feel free to ask.

Offline Zeus_

  • Single posting newcomer
  • *
  • Posts: 4
Re: wxWidgets Debug Alert - assertion failed
« Reply #1 on: April 29, 2020, 12:28:12 pm »
I happened to fix the assertion issue. I don't know if it's an actual fix or not. I selected the "Continue" option until the program startup (as the assertion message keeps repeating until then). I then followed this: CB > Settings > Editor. Among the options related to font, I marked the "Reset zoom of all editors to default, if leaving dialog" which was previously disabled. I don't understand completely what it means but well, on restarting CB again, the assertion messages stopped :)

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: wxWidgets Debug Alert - assertion failed
« Reply #2 on: April 29, 2020, 02:18:09 pm »
This is a well known problem, you can find multiple posts about this here. There is a bug in the used wxWigets version which causes a failure to parse certain font size values resulting in font size 0. Apparently you had some zoom factor applied that produced a font size value affected by the bug and resetting zoom changed the font size to a not affected value.

Offline Zeus_

  • Single posting newcomer
  • *
  • Posts: 4
Re: wxWidgets Debug Alert - assertion failed
« Reply #3 on: April 29, 2020, 06:51:30 pm »
Thanks for the reply! I believe that's what caused the problem. I did indeed have some zoom applied last night, before my restart, while I was working on some code.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxWidgets Debug Alert - assertion failed
« Reply #4 on: April 29, 2020, 07:24:29 pm »
The zoom in the editor is separate. This is a bug happening when the font size is changed in Settings -> Editor.
(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 Utkarsh

  • Single posting newcomer
  • *
  • Posts: 2
Re: wxWidgets Debug Alert - assertion failed
« Reply #5 on: August 10, 2020, 06:18:12 am »
I am facing same issue after changing my font size and also applied method suggested by you but couldn't solve the issue.Can you please explain in detail to resolve this issue