Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: BlueHazzard on October 10, 2016, 05:51:04 pm

Title: Error message on startup wx3.x
Post by: BlueHazzard on October 10, 2016, 05:51:04 pm
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;
    }
}

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
Title: Re: Error message on startup wx3.x
Post by: oBFusCATed on October 10, 2016, 08:54:08 pm
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.