41
Using Code::Blocks / Re: CB 25.02 - BrowseTracker crash on startup
« Last post by blauzahn on June 22, 2025, 10:29:25 am »Hi Pecan,
thank you for the effort.
With the last patch (svn13671 BrowseTracker Move ... ) I get a compile error when building on Linux with make. An include is missing:
When scrolling very briefly through the diff I noticed a function with a suspiciously empty if statement. It looks like unintentional semantics:
When I run CppCheck over the BrowseTracker cb-project, I get several warnings. E.g.:
or
Besides other warnings.
Since the topic-starter observed a crash, these should be fixed.
Have a nice day.
thank you for the effort.
With the last patch (svn13671 BrowseTracker Move ... ) I get a compile error when building on Linux with make. An include is missing:
Code
#include <logmanager.h>
When scrolling very briefly through the diff I noticed a function with a suspiciously empty if statement. It looks like unintentional semantics:
Code
void JumpTracker::OnLeftUp(wxMouseEvent& event) {
if (m_leftDown && (not m_isDragging)) {
// Pure click (no drag) occurred
}
m_leftDown = m_isDragging = false;
event.Skip();
}
When I run CppCheck over the BrowseTracker cb-project, I get several warnings. E.g.:
Quote
BrowseTrackerLayout.cpp:173:41: warning: Either the condition 'cursor' is redundant or there is possible null pointer dereference: cursor. [nullPointerRedundantCheck]
TiXmlElement* browsemarks = cursor->NextSiblingElement("BrowseMarks");
^
BrowseTrackerLayout.cpp:155:17: note: Assuming that condition 'cursor' is not redundant
if (cursor)
^
BrowseTrackerLayout.cpp:173:41: note: Null pointer dereference
TiXmlElement* browsemarks = cursor->NextSiblingElement("BrowseMarks");
^
or
Quote
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_pBrowseTracker' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
^
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_menuID' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
^
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_KeyDownCode' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
^
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_KeyDownMods' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
^
Besides other warnings.
Since the topic-starter observed a crash, these should be fixed.
Have a nice day.