-
Notifications
You must be signed in to change notification settings - Fork 151
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
Crashes when Batch importing textures. #330
Comments
The code that's having the exception is the mipmapping code trying to scale your image down to 0. However, there's a lot of checks to make sure the image you're importing can be mipmapped. Are you sure you don't actually have a 0x0 image you're importing? |
I exported all the textures and modified some of them again, seems to work now. I think one of my old textures was bugged when I saved it in Photoshop. |
It might just be taking a while. Encoding is definitely slower than decoding. The texture import/export doesn't have a progress bar, but it's probably a good idea to add one in a future update. |
I went to sleep to see if it was just slow, but it was still not responding when I woke up after 9 hours. (I've tried it many times.). Then I asked a friend of mine (who has a better CPU than mine) to try it, and he did it with 80 textures, but when he tried to import more than 100, the program froze too. |
I'll have to make a big bundle to test on, but 9 hours definitely isn't right. Is it at max cpu the whole time? How big are the textures you're trying to import? I don't think the code could get stuck in a loop after importing too many textures. |
Can you check what texture format they are? I can't reproduce this with DXT5 images. Ten 2048x2048 images import in one second on my computer with a slightly worse CPU than the one in your screenshot. |
What texture format are the textures? Not like png, but like RGBA32 or DXT5. Single selecting a texture and clicking plugins -> edit texture will show this. |
Oh sorry, all the textures are ASTC_RGB_8x8 |
I'm using the nightly version, but it still crashes every time I try to import multiple textures2d at once (all the texture names are correct).
LOG:
Plugin Batch import textures has crashed. Stacktrace:
System.InvalidOperationException: Target width 0 and height 0 must be greater than zero.
at SixLabors.ImageSharp.Processing.Processors.Transforms.ResizeHelper.ThrowInvalid(String message)
at SixLabors.ImageSharp.Processing.Processors.Transforms.ResizeHelper.CalculateTargetLocationAndBounds(Size sourceSize, ResizeOptions options)
at SixLabors.ImageSharp.Processing.Processors.Transforms.ResizeProcessor..ctor(ResizeOptions options, Size sourceSize)
at SixLabors.ImageSharp.Processing.ResizeExtensions.Resize(IImageProcessingContext source, ResizeOptions options)
at TexturePlugin.TextureEncoderDecoder.<>c__DisplayClass9_0.b__0(IImageProcessingContext i)
at TexturePlugin.TextureEncoderDecoder.Encode(Image
1 image, Int32 width, Int32 height, TextureFormat format, Int32 quality, Int32 mips) at TexturePlugin.TextureImportExport.Import(Image
1 image, TextureFormat format, Int32& width, Int32& height, Int32& mips, UInt32 platform, Byte[] platformBlob)at TexturePlugin.TextureImportExport.Import(String imagePath, TextureFormat format, Int32& width, Int32& height, Int32& mips, UInt32 platform, Byte[] platformBlob)
at TexturePlugin.ImportTextureOption.ImportTextures(Window win, List
1 batchInfos) at TexturePlugin.ImportTextureOption.ExecutePlugin(Window win, AssetWorkspace workspace, List
1 selection)at UABEAvalonia.PluginWindow.BtnOk_Click(Object sender, RoutedEventArgs e) in D:\a\UABEA\UABEA\UABEAvalonia\PluginWindow.axaml.cs:line 53
The text was updated successfully, but these errors were encountered: