-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Godot crashes when importing 1x1 pixel JPEG image using YCbCr and 2x2 sampling factor #42363
Godot crashes when importing 1x1 pixel JPEG image using YCbCr and 2x2 sampling factor #42363
Comments
I can't reproduce this on Godot 3.2.3 with JPEGs generated by ImageMagick (
My minimal reproduction project: small_jpeg_import_crash.zip
|
I can reproduce this with JPEGs generated by ImageMagick if I set the colorspace to YCbCr and use a sampling factor of 2x2:
This produces the same backtrace as the MRP. |
This is happening to me also, while trying to import a .dae file with a 1x2 texture. |
hello, Any help regarding this Is Appreciated. |
If you can reproduce the crash, use a debugger to get a stacktrace, which will show you which files are involved. There's a hint in #42363 (comment):
You can then search which files include this file:
(But again a stacktrace would show you that the crash in |
So, I checked the code above value Then, I tried to read the function in which this whole thing is implemented and found out that it is now i am really stuck on what to do next because i don't see anything wrong in the implementation. If i am missing something. I'm Happy to learn it. |
without this check when an 1 x 1 or 1 x X or X x 1 using sub-sampling. the half_image_size would be -1 which would result in a crash on future steps. Fixed : godotengine/godot#42363 Caused by this Bug.
This make sure that (1x1) , (1 x X) and (X , 1) pixel images using sub-sampling will get correct half_image_size i.e NON-NEGATIVE. fix : godotengine#42363
Godot version:
Godot 3.2.3
OS/device including version:
Issue description:
I was following an answer on the Godot forum about making a coloured rectangle, and using Microsoft Paint, I made a white 1x1 pixel JPEG image and placed it in my project's
.\Images\
directory. When I opened Godot to rescan for assets, Godot crashed as it was importing.\Images\Background.jpg
.Steps to reproduce:
res://
and create a folder calledScenes
.File -> Preferences
.File -> Save As... -> JPEG image
.Images
.Background.jpeg
orBackground.jpg
.Background.jpeg
.Minimal reproduction project:
I've added the original project.
ForEx Simulator.zip
The text was updated successfully, but these errors were encountered: