Skip to content

Issues on Linux #5

@iMrShadow

Description

@iMrShadow

I started testing the project on Linux. Some functions work correct - loading image from bytes, creating a new scratch image and some utility functions. However, the app crashes when Decompress2 and Convert2 are executed. There are possibly other functions that crash as well, but I can't really debug on this machine very effectively (i3-3110M 64-bit, 6GB RAM, Linux Mint 22 fresh installation). The code worked fine on Windows.

When Convert2 is used - the error code shows " Value does not fall within the expected range.".

uint format = (uint)(DirectXTex.IsSRGB(Metadata.Format) ? DXGIFormat.R8G8B8A8_UNORM_SRGB : DXGIFormat.R8G8B8A8_UNORM);

        ScratchImage destImage = DirectXTex.CreateScratchImage();

        HResult result;

        if (DirectXTex.IsCompressed(Metadata.Format))
        {
            result = DirectXTex.Decompress2(Image.GetImages(), Image.GetImageCount(), Image.GetMetadata(), format, destImage); // Immediate crash - no result

            Image.Release();
            Image = destImage;
        }
        else if (Metadata.Format != (uint)DXGIFormat.R8G8B8A8_UNORM_SRGB && Metadata.Format != (uint)DXGIFormat.R8G8B8A8_UNORM)
        {
            result = DirectXTex.Convert2(Image.GetImages(), Image.GetImageCount(), Image.GetMetadata(), format, TexFilterFlags.Default, 0.5f, destImage); // Error code when result.ThrowIf() is used - all values are 0, despite the initial values being different.

            Image.Release();
            Image = destImage;
        }
        else
        {
            result = 0;
            destImage.Release();
        }

I don't know if this is reproducible on other hardware.

Thanks

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions