News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Error message on startup wx3.x

Started by BlueHazzard, October 10, 2016, 05:51:04 PM

Previous topic - Next topic

BlueHazzard

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

The loading code from sdk/manager.cpp:

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

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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]