-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.0.100-preview.6.21308.9] PixiEditor stopped working when saving, System.ArgumentException: Parameter is not valid #53991
Comments
Tagging subscribers to this area: @safern, @tarekgh Issue DetailsApplication Name: PixiEditor Verify Scenarios:
Source Code & App check at : https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1340936 Minimal Repro steps: This is 5.0 app, but we are running it on 6.0, machine only have 6.0 installed, and DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2, so it runs on 6.0 1)Copy App to machine Note : If we make changes in the pixi, error Not Repro. Expected Result: App should continue working Actual Result: App has stopped working window displayed, app shutdown Event Viewer Log
Findings : Error is coming from this package : For minimal app repro : This code will work on .net5 but throws exception on .net6
Exception : Unhandled exception. System.ArgumentException: Parameter is not valid.
When we update PixiEditor.Parser to latest(1.1.2.1), we also get an error on .net6, we think these errors are related, but PixiEditor has dependency 1.0.1.1 Error on latest PixiEditor.Parser(1.1.2.1) : Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'arr')
@dotnet-actwx-bot @dotnet/compat
|
I started looking into this and nothing changed on The interop call to GDI that is failing is:
GDI is returning an invalid parameter because the stride in that case is 0. I think this error is somewhere either on the JIT or the runtime, as after debugging, this line of code should not be hit: https://github.com/PixiEditor/PixiParser/blob/3b21a5c079de60a37d5baff0b488fff002765e45/src/PixiParser/Parser/PixiParser.Serialize.cs#L67 because the only layer on the document, it's height and width is 0, so it should continue here: https://github.com/PixiEditor/PixiParser/blob/3b21a5c079de60a37d5baff0b488fff002765e45/src/PixiParser/Parser/PixiParser.Serialize.cs#L64 So since these are 0, and the code is not going inside the if: if (layer.Width * layer.Height == 0)
{
writer.Write(0);
continue;
} the stride when creating the bitmap (which is calculated with So this code should never be called in this case as it is the case in Preview5, that is why in Preview5 this error doesn't happen cause we never get to the @jkotas who can help look at this issue? |
This looks like a dup of issue fixed by #53806. Does it repro on live main? |
Yeah, with main it doesn't repro. Thanks for pointing it out @jkotas. I will close the issue as I no longer reproed it with main. |
Yes, the C# code seems to be doing multiplication and there was problem with |
Verified it and fixed on build dotnet-sdk-6.0.100-preview.7.21320.2 |
Application Name: PixiEditor
OS: Windows 10 RS5
CPU: X64
.NET Build Number: 6.0.100-preview.6.21308.9
Verify Scenarios:
Source Code & App check at : https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1340936
Minimal Repro steps:
This is 5.0 app, but we are running it on 6.0, machine only have 6.0 installed, and DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2, so it runs on 6.0
1)Copy App to machine
2) Run PixiEditor.exe
3) Click New
4) We can leave Width-Height as default, click OK
5)click File, Save
6)input file name, click Save
Note : If we make changes in the pixi, error Not Repro.
Expected Result:
App should continue working
Actual Result:
App has stopped working window displayed, app shutdown
Event Viewer Log
Findings :
Error is coming from this package :
For minimal app repro :
This code will work on .net5 but throws exception on .net6
<PackageReference Include="PixiEditor.Parser" Version="1.0.1.1" />
SerializableDocument document = PixiParser.Deserialize("./pixiFile.pixi");
PixiParser.Serialize(document, "./pixiFile.pixi"); //error here
Exception :
When we update PixiEditor.Parser to latest(1.1.2.1), we also get an error on .net6, we think these errors are related, but PixiEditor has dependency 1.0.1.1
Error on latest PixiEditor.Parser(1.1.2.1) :
@dotnet-actwx-bot @dotnet/compat
The text was updated successfully, but these errors were encountered: