User forums > General (but related to Code::Blocks)
wxWidgets 3.1.5
Miguel Gimenez:
Can you check the attached patch?
The code in that function is very strange, why use
--- Code: ---m_path=wxString(m_fe->GetFullPath(ti).c_str());
--- End code ---
instead of just
--- Code: ---m_path=m_fe->GetFullPath(ti);
--- End code ---
?
EDIT: around line 1260 there is an almost identical code snippet, you can still get an assert from it later.
oBFusCATed:
Probably to break ref counting implementations and force an actual copy.
p.s. Is this code running on the main thread?
p.p.s. Please use wxString() instead of wxEmptyString.
Miguel Gimenez:
FileExplorerUpdater::Update() and VCSFileLoader::Update() are called (or should be called) from the main thread and they start the threads:
--- Code: --- void Update(const wxTreeItemId &ti); //call on main thread to do the background magic
void Update(const wxString &op, const wxString &source_path, const wxString &destination_path, const wxString &comp_commit); //call on main thread to do the background magic
--- End code ---
gd_on:
With this patch, as it is, no more assert message (until the next one :( ). Thanks.
wxWidgets team say that there are other possible incompatibilities in version 3.1.5. I don't know if C::B is impacted.
--- Quote ---Comment (by vadz):
I'm not sure where exactly is the code calling `GetString(-1)`, but it
should be fixed and not just hidden by disabling the asserts.
Note that this change was documented in the incompatible changes section
of the change log file:
{{{
- wxChoice::GetString() now consistently asserts when passed an invalid
index.
}}}
--
Ticket URL: <https://trac.wxwidgets.org/ticket/19096#comment:4>
--- End quote ---
Why do you say wxEmptyString should be avoided ?
Miguel Gimenez:
I have just created ticket 1079 with a patch.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version