Author Topic: Changing editor colors: assert "IsOk()" failed in Blue(): invalid colour  (Read 2258 times)

Offline fenugrec

  • Single posting newcomer
  • *
  • Posts: 4
Hi,
running 20.03 (packaged by my distro, arch linux).
Editor colors were weird so went into Settings-Editor-Syntax highlighting. See screenshot : the "active line" never gets highlighted with the shown yellow color.

If I press the 'D' button to reset the background color, I get an assertion failure in wxColour::Blue() , then Green(), then Red() !


Backtrace:
Code

ASSERT INFO:
./src/gtk/colour.cpp(207): assert "IsOk()" failed in Blue(): invalid colour

BACKTRACE:
[1] wxColour::Blue() const
[2] wxScintilla::SetCaretLineBackground(wxColour const&)
[3] EditorColourSet::Apply(wxString, cbStyledTextCtrl*, bool, bool)
[4] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[5] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
...

I tried deleting .config/codeblocks/default.conf ; same problem.

Sounded a bit like this old thread http://forums.codeblocks.org/index.php?topic=22607.0
but the proposed fix there isn't applicable, there's no
Code
null="true"
property anywhere.

Ideas ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: Changing editor colors: assert "IsOk()" failed in Blue(): invalid colour
« Reply #1 on: February 12, 2021, 06:23:41 pm »
I think, I've fixed this in trunk/master. Could you try a night build?
(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 fenugrec

  • Single posting newcomer
  • *
  • Posts: 4
Re: Changing editor colors: assert "IsOk()" failed in Blue(): invalid colour
« Reply #2 on: February 12, 2021, 08:12:56 pm »
Thanks for the fast reply. I just compiled from svn 12293 : same bug. (Didn't try a nightly, it's more convenient to compile from trunk)

Tried compiling with debugging symbols but -O2 was still being passed to gcc so it was mostly useless. Didn't mess around trying to override C/CXXflags...

For the record, these are the wxgtk versions  currently installed

local/wxgtk-common 3.0.5.1-2
local/wxgtk2 3.0.5.1-2
local/wxgtk3 3.0.5.1-2


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: Changing editor colors: assert "IsOk()" failed in Blue(): invalid colour
« Reply #3 on: February 13, 2021, 01:03:41 am »
Please the info from the about dialog.
(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 fenugrec

  • Single posting newcomer
  • *
  • Posts: 4
Re: Changing editor colors: assert "IsOk()" failed in Blue(): invalid colour
« Reply #4 on: February 13, 2021, 02:19:26 am »
It's identical to what I posted with 20.03 :

Code
ASSERT INFO:
./src/gtk/colour.cpp(207): assert "IsOk()" failed in Blue(): invalid colour

BACKTRACE:
[1] wxColour::Blue() const
[2] wxScintilla::SetCaretLineBackground(wxColour const&)
[3] EditorColourSet::Apply(wxString, cbStyledTextCtrl*, bool, bool)
[4] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[5] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[6] wxEvtHandler::TryHereOnly(wxEvent&)
[7] wxEvtHandler::ProcessEventLocally(wxEvent&)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] wxWindowBase::TryAfter(wxEvent&)
[10] wxWindowBase::TryAfter(wxEvent&)
[11] wxWindowBase::TryAfter(wxEvent&)
[12] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[13] g_closure_invoke
[14] g_signal_emit_valist
[15] g_signal_emit
[16] g_closure_invoke
[17] g_signal_emit_valist
[18] g_signal_emit
[19] g_closure_invoke
[20] g_signal_emit_valist
[21] g_signal_emit
[22] gtk_propagate_event
[23] gtk_main_do_event
[24] g_main_context_dispatch
[25] g_main_loop_run
[26] gtk_main
[27] wxGUIEventLoop::DoRun()
[28] wxEventLoopBase::Run()
[29] wxDialog::ShowModal()
[30] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[31] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[32] wxEvtHandler::TryHereOnly(wxEvent&)
[33] wxEvtHandler::DoTryChain(wxEvent&)
[34] wxEvtHandler::ProcessEvent(wxEvent&)
[35] wxWindowBase::TryAfter(wxEvent&)
[36] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[37] wxMenuBase::SendEvent(int, int)
[38] g_closure_invoke
[39] g_signal_emit_valist
[40] g_signal_emit
[41] gtk_widget_activate
[42] gtk_menu_shell_activate_item
[43] g_closure_invoke
[44] g_signal_emit_valist
[45] g_signal_emit
[46] gtk_propagate_event
[47] gtk_main_do_event
[48] g_main_context_dispatch
[49] g_main_loop_run
[50] gtk_main
[51] wxGUIEventLoop::DoRun()
[52] wxEventLoopBase::Run()
[53] wxAppConsoleBase::MainLoop()
[54] wxEntry(int&, wchar_t**)
[55] __libc_start_main

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: Changing editor colors: assert "IsOk()" failed in Blue(): invalid colour
« Reply #5 on: February 13, 2021, 10:39:56 am »
Please post the info in the about dialog (Help->About->Information), you have not provided it, yet!
(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 fenugrec

  • Single posting newcomer
  • *
  • Posts: 4
Re: Changing editor colors: assert "IsOk()" failed in Blue(): invalid colour
« Reply #6 on: February 13, 2021, 02:23:29 pm »
Please post the info in the about dialog (Help->About->Information), you have not provided it, yet!

Oops I misread !

Code
Name             : Code::Blocks
Version          : svn-r12293
SDK Version      : 2.6.0
Scintilla Version: 3.7.5
Author           : The Code::Blocks Team
E-mail           : [email protected]
Website          : http://www.codeblocks.org

wxWidgets Library (wxGTK port)
Version 3.0.5 (Unicode: wchar_t, debug level: 1),
compiled at Jan 11 2021 22:50:13

Runtime version of toolkit used is 2.24.
Compile-time GTK+ version is 2.24.33.