Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Error message on startup wx3.x

(1/1)

BlueHazzard:
Hi,
I get the attached error messages on codeblocks startup.

The loading code from sdk/manager.cpp:

--- Code: ---try
    {
        size_t len = f.Length();
        buf = new char[len];
        f.Read(buf, len);
        {
            wxMemoryFSHandler::AddFile(file, buf, len);
        }
        if ( !wxXmlResource::Get()->Load(memoryFile) )
            Get()->GetLogManager()->LogError(_("Manager failed to load XRC resource '") + resourceFile + _("'."));
        delete[] buf;
        return true;
    }
    catch (...)
    {
        delete[] buf;
        Get()->GetLogManager()->LogError(_("Manager hardly failed to load XRC resource '") + resourceFile + _("'."));
        return false;
    }
}

--- End code ---

The reason is, because this zip files don't contain any xrc files.

I can think of two ways to fix this
1) Check if there are any xrc files in the resource archive, if so load them with wxXmlResource::Get()->Load(memoryFile), if not ignore them...
2) Add dummy xrc files to the archives...

solution 1) would be better....

any ideas?
greetings

oBFusCATed:
I started to work on this, but it required many changes.
The simplest fix is to not load the zip file at all for the plugins where there is nothing in the archive.

Navigation

[0] Message Index

Go to full version