stride3d / stride3d/stride

Android Asset Compiler InvalidOperationException "Image size different than expected." GraphicsProfile.Level_10_0 and above doesn't compile.

Open
#1,600 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: GitHub

Version: git branch main

Platform(s): Android

Describe the bug
Asset compiler does not compile textures.
StrideTexLibrary.Export Throws InvalidOperationException and here.

To Reproduce
Steps to reproduce the behavior:

  1. Install an Android Sample code
  2. Add TextureAsset if there already isn't one
  3. Build to Android

Expected behavior
Build to succeed

Screenshots
AssetCompiler

Log and callstacks

1>EXEC : error 27,515s: [AssetCompiler] BuildStep Asset build steps [TextureAsset:'0001_metallic'] (1 items) failed.
1>EXEC : error 35,546s: [StrideTexLibrary] Image size different than expected.
1>EXEC : error 35,547s: [AssetCompiler] Exception in command [0001_ao] Stride.Assets.Textures.TextureConvertParameters: System.InvalidOperationException: Image size different than expected.
1>   at Stride.TextureConverter.TexLibraries.StrideTexLibrary.ExportToStride(TexImage image, StrideTextureLibraryData libraryData, ExportToStrideRequest request) in C:\repos\stride-tagcode\sources\tools\Stride.TextureConverter\Backend\TexLibraries\StrideTexLibrary.cs:line 367
1>   at Stride.TextureConverter.TexLibraries.StrideTexLibrary.Execute(TexImage image, IRequest request) in C:\repos\stride-tagcode\sources\tools\Stride.TextureConverter\Backend\TexLibraries\StrideTexLibrary.cs:line 111
1>   at Stride.TextureConverter.TextureTool.ExecuteRequest(TexImage image, IRequest request) in C:\repos\stride-tagcode\sources\tools\Stride.TextureConverter\Frontend\TextureTool.cs:line 1448
1>   at Stride.TextureConverter.TextureTool.ConvertToStrideImage(TexImage image) in C:\repos\stride-tagcode\sources\tools\Stride.TextureConverter\Frontend\TextureTool.cs:line 1021
1>   at Stride.Assets.Textures.TextureHelper.ImportStreamableTextureImage(ContentManager assetManager, TextureTool textureTool, TexImage texImage, ImportParameters convertParameters, CancellationToken cancellationToken, ICommandContext commandContext) in C:\repos\stride-tagcode\sources\engine\Stride.Assets\Textures\TextureHelper.cs:line 516
1>   at Stride.Assets.Textures.TextureAssetCompiler.TextureConvertCommand.Import(ICommandContext commandContext, TextureTool textureTool, TexImage texImage, ImportParameters convertParameters) in C:\repos\stride-tagcode\sources\engine\Stride.Assets\Textures\TextureAssetCompiler.cs:line 73
1>   at Stride.Assets.Textures.TextureAssetCompiler.TextureConvertCommand.DoCommandOverride(ICommandContext commandContext) in C:\repos\stride-tagcode\sources\engine\Stride.Assets\Textures\TextureAssetCompiler.cs:line 85
1>   at Stride.Core.BuildEngine.Command.DoCommand(ICommandContext commandContext) in C:\repos\stride-tagcode\sources\buildengine\Stride.Core.BuildEngine.Common\Command.cs:line 67
1>   at Stride.Core.BuildEngine.CommandBuildStep.StartCommand(IExecuteContext executeContext, ListStore`1 commandResultEntries, BuilderContext builderContext) in C:\repos\stride-tagcode\sources\buildengine\Stride.Core.BuildEngine.Common\CommandBuildStep.cs:line 304
1>EXEC : error 35,547s: [AssetCompiler] BuildStep [0001_ao] Stride.Assets.Textures.TextureConvertParameters failed.```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sources/tools/Stride.TextureConverter/Backend/TexLibraries/StrideTexLibrary.cs at the ExportToStride locations in the stack trace, then trace the request through TextureTool.cs and Stride.Assets/Textures/TextureHelper.cs. Reproduce by building an Android sample with a TextureAsset and compare the expected and produced image sizes. Done means the Android asset build succeeds without the InvalidOperationException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
build-system, computer-graphics, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.