Ticket #40 (closed defect)
assertion in wxFileConfig when deleting group
| Reported by: | anonymous | Owned by: | vadz |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Version: | ||
| Keywords: | Cc: | vadz | |
| Blocked By: | Patch: | no | |
| Blocking: |
Description
Bug#: 107
Product: .wxWindows
Version: 2.2.0
Platform: All
OS/Version: Linux - RedHat
Status: ASSIGNED
Resolution:
Severity: normal
Priority: P2
Component: common
AssignedTo: vadim@…
ReportedBy: vaclav@…
URL:
Summary: assertion in wxFileConfig when deleting group
If the file managed by wxFileConfig does not exist yet (i.e.
it is being created) and you call wxFileConfig::DeleteGroup on
previously created group, it results in assertion failure in
fileconf.cpp, line 1295.
The code bellow demonstrates it (note this is for wxGTK where
wxFileConfig is default, but the problem is not wxGTK-specific):
#include <wx/wx.h>
#include <wx/config.h>
class MA : public wxApp
{
public:
virtual bool OnInit()
{
// note that underlying dotfile must not exist!
wxConfigBase *c = wxConfigBase::Get();
c->Write("group/record", "value");
c->DeleteGroup("group"); // assert
}
};
IMPLEMENT_APP(MA)
