Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on April 14, 2015, 05:03:50 am

Title: warning message about resource version number incorrect
Post by: ollydbg on April 14, 2015, 05:03:50 am
I got a message below when I update to the latest r10217, 32bit gcc/wx2.8.12.
See the image below:
(http://imagizer.imageshack.us/v2/420x280q90/538/0ht8ZH.png)
Any ideas?
Title: Re: warning message about resource version number incorrect
Post by: MortenMacFly on April 14, 2015, 08:20:10 am
This happens if a XRC files does have a wrong or no version number. I'm afraid you've to disable the plugins step by step to see what causes the issue. The manager and resource XRC files should be in line. An XRC file w/o version number is actually invalid, thats why I added the version number to all. We still have plenty of invalid XRC files, btw... so it could also be another issue.

However, you shouldn't see this in release builds. Its only visible in debug builds. Could you verify this, please?
Title: Re: warning message about resource version number incorrect
Post by: ollydbg on April 18, 2015, 12:08:16 am
This happens if a XRC files does have a wrong or no version number. I'm afraid you've to disable the plugins step by step to see what causes the issue.
disable and enable it can't find the wrong xrc files. Instead, I set a breakpoint in bool Manager::LoadResource(const wxString& file), and check each zip file manually(the zip file name can be seen as the function argument) to see whether they have wrong xrc files.

Here are 5 wrong files I just caught:
Code
manager_resources.zip
    edit_keywords.xrc
    project_deps.xrc
    project_options.xrc
    virtualbuildtargetsdlg.xrc

codecompletion.zip
    goto_function_dlg.xrc



Title: Re: warning message about resource version number incorrect
Post by: ollydbg on October 04, 2015, 01:26:26 pm
FYI: Just set a breakpoint in the file:
Code
"wxXmlResource::DoLoadFile (this=0x58b2b88, filename=...) at D:\wx3\src\xrc\xmlres.cpp:772" 
can catch all such warnings.

Code
    if (m_version != version)
    {
        wxLogWarning("Resource files must have same version number.");
    }
Title: Re: warning message about resource version number incorrect
Post by: MortenMacFly on October 04, 2015, 04:47:53 pm
Code
    if (m_version != version)
    {
        wxLogWarning("Resource files must have same version number.");
    }
I should have fixed all those in SVN meanwhile. I also have a patch pending for wxSmith that it doesn't generate "wrong" XRC files. It happens as well with 3rd party plugins though where I cannot fix the code. For example: wxCrafter and cbInno.