Ticket #40 (closed defect)

Opened 8 years ago

Last modified 8 years ago

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)

Change History

Changed 8 years ago by vadz

This bug has been fixed in the current version of wxWindows,
please upgrade to it and reopen the bug report if the bug
doesn't disappear. Thank you.

Note: See TracTickets for help on using tickets.