MGCB editor fails with a parsing error in latest "develop"
SimonDarksideJ opened this issue · 5 comments
Prerequisites
- I have verified this issue is present in the
develop
branch - I have searched open and closed issues to ensure it has not already been reported.
MonoGame Version
3.8.1.617-develop
Which MonoGame platform are you using?
N/A
Operating System
Windows
Description
In the current develop
state, the MGCB tool fails to load a .mgcb
configuration due to a parsing error.
In the current 3.8.1 release, the following is supported/permitted
/processorParam:ColorKeyColor={R:0 G:0 B:0 A:0}
However, now only the following is supported:
/processorParam:ColorKeyColor=0,0,0,0
So something has changed which has broken the backwards compatibility
Steps to Reproduce
-
Create a new
.mgcb
content package using the release MGCB editor -
Add an FBX file to the content
-
Save and close the MGCB editor
-
Check the file contents and update the following:
/processorParam:ColorKeyColor=0,0,0,0
To
/processorParam:ColorKeyColor={R:0 G:0 B:0 A:0}
(Which is a previous XNA supported format, and also supported by the Release version of 3.8.1)
-
Re-open the
.mgcb
file and confirm it is working -
Close the
.mgcb
file and reopen using the latest Develop version of the MGCB editor (3.8.1.617-develop). -
Observe the file can no longer be opened.
Minimal Example Repo
No response
Expected Behavior
The format
/processorParam:ColorKeyColor={R:0 G:0 B:0 A:0}
Should be supported for XNA backwards compatibility
Resulting Behavior
MGCB editor fails to load
Files
No response
Actually, in further testing, the 3.8 mgcb editor also fails with the following error:
System.ArgumentException: Could not convert from string({R:0 G:0 B:0 A:0}) to Color, expected format is 'r,g,b,a'
But the error does not occur when the content project is opened, only saved.
So this is more of an XNA regression issue.
Likely an easy fix. Color parsing happens here:
If anyone wishes to take a look at fixing it.
Thanks for the added info @mrhelmut ! I made an attempt to fix it over in #8167 . I tested the Repro steps where I was able to see the error before and am not seeing it after through a few tests.
- Via debug it was failing before and works after.
- Before making the change I ran a full cake build and ran the Editor version there. It failed before, and then after adding the fix I re-did the cake build and it worked after running from the Artifacts release.
- Lastly I created a separate solution where I replicated the problem with 3.8.1.303 and after the fix I mapped the dotnet-tools entry dotnet-mgcb-editor-windows to the local version and the problem was resolved.
Hope this takes care of it! Let me know if there are any questions or concerns.
Fix looks good, although if possible, can we also have unit tests testing the both patterns @JakeLegendXIII ?
Fix looks good, although if possible, can we also have unit tests testing the both patterns @JakeLegendXIII ?
Absolutely! UnitTests have been added to the PR.