Imagesharp: Some (28) tests are failing on master branch

Created on 26 Nov 2020  路  8Comments  路  Source: SixLabors/ImageSharp

Prerequisites

  • [x] I have written a descriptive issue title
  • [x] I have verified that I am running the latest version of ImageSharp
  • [x] I have verified if the problem exist in both DEBUG and RELEASE mode
  • [x] I have searched open and closed issues to ensure it has not already been reported

Description

On a clean master branch, running all tests from VS 2019, I end up with 28 failing tests (see image below):
image

System Configuration

  • ImageSharp version: latest master commit
  • Environment (Operating system, version and so on): Win 10 (Version 10.0.18363 Build 18363)
needs triage

Most helpful comment

What鈥檚 the stack trace of the AccessViolationException. I鈥檝e seen that one pop up a few times during CI and it鈥檚 always Magick.NET

yes the AccessViolationException is related to MagickReferenceDecoder and it only happens with net472 as far as i can tell. It only happens sporadic and not always.

Also its this image: Jpg\issues\Issue695-Invalid-EOI.jpg

All 8 comments

thanks for reporting this. I see the reason for the bitmap tests failing: Its a DebugGuard which ensures the Spans are the same length when converting to Bgra32. This is sometimes not the case during quantization where it can happen that the source is smaller then the destination. I will fix that.

Just FYI there seem to be also an AccessViolationException and a OutOfMemoryException, I don't know if they relates to the spans issues.

Is it a 32bit run? OOM-s are not extraordinary if so.

AccessViolationException is a serious concern, what test is that? Is it sporadic or deterministic?

What鈥檚 the stack trace of the AccessViolationException. I鈥檝e seen that one pop up a few times during CI and it鈥檚 always Magick.NET

What鈥檚 the stack trace of the AccessViolationException. I鈥檝e seen that one pop up a few times during CI and it鈥檚 always Magick.NET

yes the AccessViolationException is related to MagickReferenceDecoder and it only happens with net472 as far as i can tell. It only happens sporadic and not always.

Also its this image: Jpg\issues\Issue695-Invalid-EOI.jpg

It's sporadic, I will put the stacktrace next time I face it.

Regarding the OOM, they appear with Any CPU, x86 and x64 but it's also something quite sporadic. Here is the stacktrace:

  Message: 
    System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown.
  Stack Trace: 
    DefaultArrayPool`1.Rent(Int32 minimumLength)
    ArrayPoolMemoryAllocator.Allocate[T](Int32 length, AllocationOptions options) line 140
    WuQuantizer`1.ctor(Configuration configuration, QuantizerOptions options) line 94
    WuQuantizer.CreatePixelSpecificQuantizer[TPixel](Configuration configuration, QuantizerOptions options) line 45
    WuQuantizer.CreatePixelSpecificQuantizer[TPixel](Configuration configuration) line 40
    PngEncoderOptionsHelpers.CreateQuantizedFrame[TPixel](PngEncoderOptions options, Image`1 image) line 83
    PngEncoderCore.CreateQuantizedImage[TPixel](Image`1 image, Image`1 clonedImage) line 233
    PngEncoderCore.Encode[TPixel](Image`1 image, Stream stream, CancellationToken cancellationToken) line 153
    ImageEncoderUtilities.Encode[TPixel](IImageEncoderInternals encoder, Image`1 image, Stream stream) line 59
    PngEncoder.Encode[TPixel](Image`1 image, Stream stream) line 65
    EncodeVisitor.Visit[TPixel](Image`1 image) line 183
    Image`1.Accept(IImageVisitor visitor) line 290
    AdvancedImageExtensions.AcceptVisitor(Image source, IImageVisitor visitor) line 71
    Image.Save(Stream stream, IImageEncoder encoder) line 99
    PngEncoderTests.IgnoreMetadata_WillExcludeAllAncillaryChunks() line 173

1443 fixed most of the failures. The rest is tracked by #1386 and #1461.

Thank you @antonfirsov

Was this page helpful?
0 / 5 - 0 ratings