News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Cannot Debug and CB terminates randomly

Started by slashmais, September 26, 2015, 10:40:58 AM

Previous topic - Next topic

slashmais

On debian using nightly 10499

1. while editing source-files CB terminates at random times (with resultant edit-losses)

2. cannot debug, following saved from popup-backtrace:
ASSERT INFO:
/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type

BACKTRACE:
[1] wxCheckDynamicCast(wxObject*, wxClassInfo*)
[2] GdbCmd_InfoRegisters::ParseOutput(wxString const&)
[3] GDB_driver::ParseOutput(wxString const&)
[4] DebuggerGDB::OnGDBOutput(wxCommandEvent&)
[5] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[6] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[7] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[8] wxEvtHandler::TryHereOnly(wxEvent&)
[9] wxEvtHandler::ProcessEventLocally(wxEvent&)
[10] wxEvtHandler::ProcessEvent(wxEvent&)
[11] wxEvtHandler::ProcessPendingEvents()
[12] wxAppConsoleBase::ProcessPendingEvents()
[13] wxApp::DoIdle()
[14] g_main_context_dispatch
[15] g_main_loop_run
[16] gtk_main
[17] wxGUIEventLoop::DoRun()
[18] wxEventLoopBase::Run()
[19] wxAppConsoleBase::MainLoop()
[20] wxEntry(int&, wchar_t**)
[21] __libc_start_main


Would appreciate any inputs on fixing this.

ollydbg

Quote from: slashmais on September 26, 2015, 10:40:58 AM
On debian using nightly 10499

1. while editing source-files CB terminates at random times (with resultant edit-losses)

Can you disable the "Code Completion plugin", and see whether the random crash happens again? Also, if you got a crash stack track, please post it here, thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

oBFusCATed

This has nothing to do with CC.
It is a wx30 assertion because of mismatching format specifiers and types (size_t and %x in this case).

Looking at it....
(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!]

oBFusCATed

I've fixed this in rev10504. Please test and report if it is working.
Also, can someone on windows verify the rev10505 does what is supposed to do?
(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!]

slashmais

@ollydbg: disabled it and so far no crashes - will keep it disabled see what happens

re testing 10504: waiting for jens... (if he doesn't produce in the next day or two I'll dl the nightly svn & compile local)
(currently debugging the old way: printf is king)

Jenna

Quote from: slashmais on September 27, 2015, 08:51:32 AM
@ollydbg: disabled it and so far no crashes - will keep it disabled see what happens

re testing 10504: waiting for jens... (if he doesn't produce in the next day or two I'll dl the nightly svn & compile local)
(currently debugging the old way: printf is king)
I currently run a new build for Debian n my server.

slashmais

Can now debug - thx.

Still crashes at random times
last crash happened as I was doing copy-paste within same source-file.
(re-enabled CC - without it CB is useless)
Now disabling most of the plugins (default install enables a lot of them that I have no use for)
and will see what happens.

Enabled plugins:
  Autosave
  Code completion
  Compiler
  Debugger
  FileManager
  Files extension handler
  IncrementalSearch
  SmartIndentCpp
  Valgrind

Any of the above that I don't need for standard Cpp development?
Any of the disabled one's I should enable?

Will report back on outcome ...



oBFusCATed

Can you post backtraces from these crashes?
(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!]

slashmais

There are none. CB just disappears mid-edit: busy typing, then suddenly wallpaper...
Is there a way I can have CB keep a running log-to-file of calls?

oBFusCATed

Start codeblocks under gdb, when it crashes run the bt command or even 'thread apply all bt'.
Starting codeblocks under gdb can be done with gdb codeblocks.
Also for more detailed info you can install the dbg/debuginfo packages if they are available.
(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!]

slashmais

(running cb in gdb)

got following errors from cb:
1.
ASSERT INFO:
../src/common/wincmn.cpp(372): assert "id == wxID_ANY || (id >= 0 && id < 32767) || (id >= wxID_AUTO_LOWEST && id <= wxID_AUTO_HIGHEST)" failed in CreateBase(): invalid id value

BACKTRACE:
[1] wxWindowBase::CreateBase(wxWindowBase*, int, wxPoint const&, wxSize const&, long, wxString const&)
[2] wxWindowBase::CreateBase(wxWindowBase*, int, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)
[3] wxWindow::Create(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&)
[4] wxControl::Create(wxWindow*, int, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)
[5] wxScintilla::Create(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&)
[6] wxScintilla::wxScintilla(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&)
[7] cbStyledTextCtrl::cbStyledTextCtrl(wxWindow*, int, wxPoint const&, wxSize const&, long)
[8] cbEditor::CreateEditor()
[9] cbEditor::DoInitializations(wxString const&, LoaderBase*)
[10] cbEditor::cbEditor(wxWindow*, wxString const&, EditorColourSet*)
[11] EditorManager::New(wxString const&)
[12] wxStringTokenizer::~wxStringTokenizer()
[13] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[14] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[15] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[16] wxEvtHandler::TryHereOnly(wxEvent&)
[17] wxEvtHandler::DoTryChain(wxEvent&)
[18] wxEvtHandler::ProcessEvent(wxEvent&)
[19] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[20] wxMenuBase::SendEvent(int, int)
[21] g_closure_invoke
[22] g_signal_emit_valist
[23] g_signal_emit
[24] gtk_widget_activate
[25] gtk_menu_shell_activate_item
[26] g_closure_invoke
[27] g_signal_emit_valist
[28] g_signal_emit
[29] gtk_propagate_event
[30] gtk_main_do_event
[31] g_main_context_dispatch
[32] g_main_context_iteration
[33] gtk_main_iteration
[34] wxWindow::DoPopupMenu(wxMenu*, int, int)
[35] wxWindowBase::PopupMenu(wxMenu*, int, int)
[36] wxStringTokenizer::~wxStringTokenizer()
[37] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[38] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[39] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[40] wxEvtHandler::TryHereOnly(wxEvent&)
[41] wxEvtHandler::DoTryChain(wxEvent&)
[42] wxEvtHandler::ProcessEvent(wxEvent&)
[43] wxWindowBase::TryAfter(wxEvent&)
[44] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[45] wxToolBarBase::OnLeftClick(int, bool)
[46] g_signal_emit_valist
[47] g_signal_emit_by_name
[48] g_signal_emit_valist
[49] g_signal_emit
[50] g_signal_emit_valist
[51] g_signal_emit
[52] g_closure_invoke
[53] g_signal_emit_valist
[54] g_signal_emit
[55] gtk_propagate_event
[56] gtk_main_do_event
[57] g_main_context_dispatch
[58] g_main_loop_run
[59] gtk_main
[60] wxGUIEventLoop::DoRun()
[61] wxEventLoopBase::Run()
[62] wxAppConsoleBase::MainLoop()
[63] wxEntry(int&, wchar_t**)
[64] __libc_start_main


2.
ASSERT INFO:
../src/aui/auibook.cpp(2239): assert "idx != (-1)" failed in SetSelectionToWindow(): invalid notebook page

BACKTRACE:
[1] wxAuiNotebook::SetSelectionToWindow(wxWindow*)
[2] wxAuiNotebook::RemovePage(unsigned long)
[3] cbAuiNotebook::RemovePage(unsigned long)
[4] wxAuiNotebook::DeletePage(unsigned long)
[5] cbAuiNotebook::DeletePage(unsigned long)
[6] EditorManager::Close(EditorBase*, bool)
[7] EditorManager::OnPageClose(wxAuiNotebookEvent&)
[8] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[9] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[10] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[11] wxEvtHandler::TryHereOnly(wxEvent&)
[12] wxEvtHandler::DoTryChain(wxEvent&)
[13] wxEvtHandler::ProcessEvent(wxEvent&)
[14] wxWindowBase::TryAfter(wxEvent&)
[15] wxAuiNotebook::OnTabButton(wxAuiNotebookEvent&)
[16] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[17] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[18] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[19] wxEvtHandler::TryHereOnly(wxEvent&)
[20] wxEvtHandler::DoTryChain(wxEvent&)
[21] wxEvtHandler::ProcessEvent(wxEvent&)
[22] wxWindowBase::TryAfter(wxEvent&)
[23] wxAuiTabCtrl::OnLeftUp(wxMouseEvent&)
[24] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[25] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[26] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[27] wxEvtHandler::TryHereOnly(wxEvent&)
[28] wxEvtHandler::ProcessEventLocally(wxEvent&)
[29] wxEvtHandler::ProcessEvent(wxEvent&)
[30] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[31] g_closure_invoke
[32] g_signal_emit_valist
[33] g_signal_emit
[34] gtk_propagate_event
[35] gtk_main_do_event
[36] g_main_context_dispatch
[37] g_main_loop_run
[38] gtk_main
[39] wxGUIEventLoop::DoRun()
[40] wxEventLoopBase::Run()
[41] wxAppConsoleBase::MainLoop()
[42] wxEntry(int&, wchar_t**)
[43] __libc_start_main


3. (got this one 6 times and then cb crashed)
ASSERT INFO:
../src/common/menucmn.cpp(260): assert "(itemid >= 0 && itemid < SHRT_MAX) || (itemid >= wxID_AUTO_LOWEST && itemid <= wxID_AUTO_HIGHEST)" failed in wxMenuItemBase(): invalid itemid value

BACKTRACE:
[1] wxMenuItemBase::wxMenuItemBase(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)
[2] wxMenuItem::wxMenuItem(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)
[3] wxMenuItemBase::New(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)
[4] wxStringTokenizer::~wxStringTokenizer()
[5] wxStringTokenizer::~wxStringTokenizer()
[6] wxStringTokenizer::~wxStringTokenizer()
[7] wxStringTokenizer::~wxStringTokenizer()
[8] Manager::ProcessEvent(CodeBlocksEvent&)
[9] cbPlugin::Attach()
[10] PluginManager::AttachPlugin(cbPlugin*, bool)
[11] PluginsConfigurationDlg::OnToggle(wxCommandEvent&)
[12] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[13] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[14] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[15] wxEvtHandler::TryHereOnly(wxEvent&)
[16] wxEvtHandler::ProcessEventLocally(wxEvent&)
[17] wxEvtHandler::ProcessEvent(wxEvent&)
[18] wxWindowBase::TryAfter(wxEvent&)
[19] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[20] g_signal_emit_valist
[21] g_signal_emit
[22] g_signal_emit_valist
[23] g_signal_emit
[24] g_closure_invoke
[25] g_signal_emit_valist
[26] g_signal_emit
[27] gtk_propagate_event
[28] gtk_main_do_event
[29] g_main_context_dispatch
[30] g_main_loop_run
[31] gtk_main
[32] wxGUIEventLoop::DoRun()
[33] wxEventLoopBase::Run()
[34] wxDialog::ShowModal()
[35] PluginManager::Configure()
[36] wxStringTokenizer::~wxStringTokenizer()
[37] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[38] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[39] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[40] wxEvtHandler::TryHereOnly(wxEvent&)
[41] wxEvtHandler::DoTryChain(wxEvent&)
[42] wxEvtHandler::ProcessEvent(wxEvent&)
[43] wxWindowBase::TryAfter(wxEvent&)
[44] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[45] wxMenuBase::SendEvent(int, int)
[46] g_closure_invoke
[47] g_signal_emit_valist
[48] g_signal_emit
[49] gtk_widget_activate
[50] gtk_menu_shell_activate_item
[51] g_closure_invoke
[52] g_signal_emit_valist
[53] g_signal_emit
[54] gtk_propagate_event
[55] gtk_main_do_event
[56] g_main_context_dispatch
[57] g_main_loop_run
[58] gtk_main
[59] wxGUIEventLoop::DoRun()
[60] wxEventLoopBase::Run()
[61] wxAppConsoleBase::MainLoop()
[62] wxEntry(int&, wchar_t**)
[63] __libc_start_main


after crash in gdb:
(gdb) bt
#0  0x00007ffff258179b in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
#1  0x00007ffff4c2a32d in ?? () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
Cannot access memory at address 0x7fffffff83c8
(gdb)


oBFusCATed

Wow.
Can you please install the dbg package, this will make the backtraces (at least in gdb) more meaning full?
Or even better post detailed steps how to reproduce every problem.
(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!]

slashmais

will have to make time for it - hopefully this weekend

slashmais


raynebc