Author Topic: Error message on startup wx3.x  (Read 3583 times)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Error message on startup wx3.x
« 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Error message on startup wx3.x
« Reply #1 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.
(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!]