Skip to content
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

A System.NullReferenceException was throwing when get a **gif** image using Image.FromFile() method #54475

Closed
Amy-Li03 opened this issue Jun 21, 2021 · 7 comments · Fixed by #54483
Assignees
Milestone

Comments

@Amy-Li03
Copy link

Amy-Li03 commented Jun 21, 2021

Description

A System.NullReferenceException was throwing when get a gif image using Image.FromFile() method.
CallStack.txt

Expected behavior:
The gif image should get using Image.FromFile() method correctly.

Minimal repro:

  1. Create a WinForms .NET core project targeting .NET 6.0
  2. Add following code to the structure method of Form1
    Image.FromFile(@"\\ServerName\Images\animated.gif");
    Below is the animated.gif file:
    animated
  3. Build and run the project

Configuration

.NET SDK 6.0.100-preview.7.21320.4

Regression?

Yes, this is a regression issue.

Other information

This issue doesn't repro when file was saved on a local path

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Drawing untriaged New issue has not been triaged by the area owner labels Jun 21, 2021
@ghost
Copy link

ghost commented Jun 21, 2021

Tagging subscribers to this area: @safern, @tarekgh
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

A System.NullReferenceException was throwing when get a gif image using Image.FromFile() method.
CallStack.txt

Expected behavior:
The gif image should get using Image.FromFile() method corectly.

Minimal repro:

  1. Create a WinForms .NET core project targeting .NET 6.0
  2. Add following code to the structure method of Form1
    Image.FromFile(@"\\ServerName\Images\animated.gif");
    animated
  3. Build and run the project

Configuration

.NET SDK 6.0.100-preview.7.21320.4

Regression?

Yes, this is a regression issue.

Other information

This issue doesn't repro when file was saved on a local path

Author: Amy-Li03
Assignees: -
Labels:

area-System.Drawing, untriaged

Milestone: -

@jkotas
Copy link
Member

jkotas commented Jun 21, 2021

Note: This issue doesn't repro when file was saved on a local path

cc @adamsitnik

@ghost
Copy link

ghost commented Jun 21, 2021

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

A System.NullReferenceException was throwing when get a gif image using Image.FromFile() method.
CallStack.txt

Expected behavior:
The gif image should get using Image.FromFile() method correctly.

Minimal repro:

  1. Create a WinForms .NET core project targeting .NET 6.0
  2. Add following code to the structure method of Form1
    Image.FromFile(@"\\ServerName\Images\animated.gif");
    Below is the animated.gif file:
    animated
  3. Build and run the project

Configuration

.NET SDK 6.0.100-preview.7.21320.4

Regression?

Yes, this is a regression issue.

Other information

This issue doesn't repro when file was saved on a local path

Author: Amy-Li03
Assignees: -
Labels:

area-System.Drawing, area-System.IO, untriaged

Milestone: -

@adamsitnik adamsitnik self-assigned this Jun 21, 2021
@adamsitnik adamsitnik added this to the 6.0.0 milestone Jun 21, 2021
@adamsitnik adamsitnik linked a pull request Jun 21, 2021 that will close this issue
@adamsitnik adamsitnik added bug and removed untriaged New issue has not been triaged by the area owner labels Jun 21, 2021
@adamsitnik
Copy link
Member

It's a bug that I've introduced in #53669. I've sent a fix in #54483

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 21, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 23, 2021
@safern
Copy link
Member

safern commented Jun 23, 2021

@adamsitnik since this was a regression, are you going to port this to Preview6 branch?

@adamsitnik
Copy link
Member

since this was a regression, are you going to port this to Preview6 branch?

We should definitely do that. Do we have some nice bot for that?

@Amy-Li03
Copy link
Author

This issue has been fixed on .NET SDK latest build 6.0.100-preview.7.21324.6

@ghost ghost locked as resolved and limited conversation to collaborators Jul 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants