Blender crashes when trying to do anything with specific type of transparent image. #45283

Closed
opened 2015-07-03 02:35:58 +02:00 by Patrick Boelens · 15 comments

System Information
Windows 7 (Bootcamp) SP1
NVIDIA GeForce 9400M - Driver version 9.18.13.2702

Blender Version
Broken: 2.74 and 2.75 official (000dfc0 and c6b042b respectively)

Short description of error
After loading a specific, fully transparent image into Blender it crashes whenever it needs to do anything related to or with it, with the single exception of the initial showing in the UV/Image Editor if it was loaded from there (alt+o). This includes creating thumbnails for texture selection and rendering an object with this texture applied.

Exact steps for others to reproduce the error

  • Load up the default scene
  • Select the default cube and go to the Textures tab, Material context
  • Set the default texture type to Image and load in the problematic image
  • Attempt to render the scene

Now with regards to the images attached. I'm running a batch process to create PNGs from DDSs based on certain channels. This is done using ImageMagick and its composite command, and may result in images in either Grayscale or RGB images. Most of them work fine, but creating a PNG from an "empty" channel seems to result in an image that Blender cannot handle.

Original.dds - The original DDS file I create the image from. works
DDS_Export.png - Created by opening the DDS in Gimp and exporting to a PNG. works
DDS_Combine.png - Created using an ImageMagick command- [x]. doesn't work
GS_PNG_from_start.png - Grayscale image also created using ImageMagick, which worked fine. Then used Gimp to empty all channels completely, and save over it. works

I'm fine with accepting that ImageMagick's output is somehow corrupted, but I find it suspicious that other progams (Gimp, Windows' default image viewer) can handle it just fine.

Please let me know if you need more infomation.

Cheers,
Patrick

  • convert {0} {1} -composite {2} -composite {3}

Original.dds

GS_PNG_from_start.png

DDS_Combine.png

DDS_Export.png

**System Information** Windows 7 (Bootcamp) SP1 NVIDIA GeForce 9400M - Driver version 9.18.13.2702 **Blender Version** Broken: 2.74 and 2.75 official (000dfc0 and c6b042b respectively) **Short description of error** After loading a specific, fully transparent image into Blender it crashes whenever it needs to do *anything* related to or with it, with the single exception of the initial showing in the UV/Image Editor if it was loaded from there (alt+o). This includes creating thumbnails for texture selection and rendering an object with this texture applied. **Exact steps for others to reproduce the error** - Load up the default scene - Select the default cube and go to the Textures tab, Material context - Set the default texture type to Image and load in the problematic image - Attempt to render the scene Now with regards to the images attached. I'm running a batch process to create PNGs from DDSs based on certain channels. This is done using ImageMagick and its `composite` command, and may result in images in either Grayscale or RGB images. Most of them work fine, but creating a PNG from an "empty" channel seems to result in an image that Blender cannot handle. **Original.dds** - The original DDS file I create the image from. *works* **DDS_Export.png** - Created by opening the DDS in Gimp and exporting to a PNG. *works* **DDS_Combine.png** - Created using an ImageMagick command- [x]. *doesn't work* **GS_PNG_from_start.png** - Grayscale image also created using ImageMagick, which worked fine. Then used Gimp to empty all channels completely, and save over it. *works* I'm fine with accepting that ImageMagick's output is somehow corrupted, but I find it suspicious that other progams (Gimp, Windows' default image viewer) can handle it just fine. Please let me know if you need more infomation. Cheers, Patrick - [x] `convert {0} {1} -composite {2} -composite {3}` [Original.dds](https://archive.blender.org/developer/F199841/Original.dds) ![GS_PNG_from_start.png](https://archive.blender.org/developer/F199842/GS_PNG_from_start.png) ![DDS_Combine.png](https://archive.blender.org/developer/F199843/DDS_Combine.png) ![DDS_Export.png](https://archive.blender.org/developer/F199844/DDS_Export.png)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @Senshi

Added subscriber: @Senshi

Added subscriber: @sindra1961

Added subscriber: @sindra1961

I think that it understands that you look in DDS_Combine.png by a binary editor.
Chunk 'tEXt' of text data is included in the file.
In the case of the file which saved the file again in Gimp, the chunk disappears.
Probably Blender may not load it definitely when there is the chunk.
TextBinary.PNG

I think that it understands that you look in DDS_Combine.png by a binary editor. Chunk 'tEXt' of text data is included in the file. In the case of the file which saved the file again in Gimp, the chunk disappears. Probably Blender may not load it definitely when there is the chunk. ![TextBinary.PNG](https://archive.blender.org/developer/F199861/TextBinary.PNG)

It does not crash even if I load DDS_Combine.png in 2.63 Blender, but is not displayed definitely.

Is PNG treated in OCIO?

It does not crash even if I load DDS_Combine.png in 2.63 Blender, but is not displayed definitely. Is PNG treated in OCIO?

The PNG has not gone through OCIO. I have a Blender script that calls ImageMagick commands using os.system(). The first path is the same for all images:

convert {0} -channel {1} -separate -fuzz 60% -transparent black -fill #FFFFFF -colorize 100% {2}

After that, some are later combined using the composite command as listed in my original post. Some of those work, some do not. I don't do any actual processing of the images inside Blender though.

I unfortunately don't know enough about (image) files to contribute anything meaningful on this. I can speculate that those chunks should be considered metadata and ignored by Blender, but I could be way off, so I won't. ;)

Thanks for looking into this!

EDIT RE not being displayed: considering it's a 100% transparent image, I'd say that might just be fine. ;) Here's another one that fails for me in 2.74+, now with some color (white):

DATA000.png

The PNG has not gone through OCIO. I have a Blender script that calls ImageMagick commands using `os.system()`. The first path is the same for all images: `convert {0} -channel {1} -separate -fuzz 60% -transparent black -fill #FFFFFF -colorize 100% {2}` After that, some are later combined using the `composite` command as listed in my original post. Some of those work, some do not. I don't do any actual processing of the images inside Blender though. I unfortunately don't know enough about (image) files to contribute anything meaningful on this. I can speculate that those chunks should be considered metadata and ignored by Blender, but I could be way off, so I won't. ;) Thanks for looking into this! EDIT RE not being displayed: considering it's a 100% transparent image, I'd say that might just be fine. ;) Here's another one that fails for me in 2.74+, now with some color (white): ![DATA000.png](https://archive.blender.org/developer/F199881/DATA000.png)

@Senshi:
The comment about OCIO I for devs only asked it.

An alternative plan:
I think that you can use it if you save it again in Gimp if you want to use the file made a combine.
Or I think that it is that you make it so that 'tEXt' chunk is not included in it.

'tEXt' chunk is included in the new file which you attached.

@Senshi: The comment about OCIO I for devs only asked it. An alternative plan: I think that you can use it if you save it again in Gimp if you want to use the file made a combine. Or I think that it is that you make it so that 'tEXt' chunk is not included in it. 'tEXt' chunk is included in the new file which you attached.

@Senshi:
I'm sorry, the chunk does not seem to have relations somehow or other.
I tried whether I downloaded ImageMagick and made a file, and blender crashed.
I was able to load even the file which 'tEXt' chunk was included in normally.

@Senshi: I'm sorry, the chunk does not seem to have relations somehow or other. I tried whether I downloaded ImageMagick and made a file, and blender crashed. I was able to load even the file which 'tEXt' chunk was included in normally.

I did not know whether it was the same as this problem, but confirmed the following phenomena.
But this thinks that it is not a problem of the Blender side.
When a different file of the image size used a converted file, blender crashed.
But this does not occur when -resize option is appointed by convert command.

in this case:
convert ori.png a1.png -composite r01.png
blender crashed.

in this case:
convert -resize 1024x1024 ori.png a1.png -composite r01.png
blender did not crash.

I did not know whether it was the same as this problem, but confirmed the following phenomena. But this thinks that it is not a problem of the Blender side. When a different file of the image size used a converted file, blender crashed. But this does not occur when -resize option is appointed by convert command. in this case: convert ori.png a1.png -composite r01.png blender crashed. in this case: convert -resize 1024x1024 ori.png a1.png -composite r01.png blender did not crash.

Added subscriber: @mont29

Added subscriber: @mont29

Our PNG reading code segfaults on this image yes… will investigate.

Our PNG reading code segfaults on this image yes… will investigate.
Bastien Montagne self-assigned this 2015-07-03 13:05:12 +02:00

@sindra1961 Thank you for helping test this. =) I think you may have gotten lucky with your -resize test though; it seems completely unpredictable and seemingly "random" on my end. So far, around 3 out of 100+ images fails with no apparent link between them, all created the same way.

@mont29 Apologies for sending you yet another bug so quickly.. =P But thanks for taking it up; good luck!

@sindra1961 Thank you for helping test this. =) I think you may have gotten lucky with your `-resize` test though; it seems completely unpredictable and seemingly "random" on my end. So far, around 3 out of 100+ images fails with no apparent link between them, all created the same way. @mont29 Apologies for sending you yet another bug so quickly.. =P But thanks for taking it up; good luck!

This issue was referenced by e42609db49

This issue was referenced by e42609db49b5ececb989167f5e1c14e5cff4ce4d

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Bastien, you are slowly becoming my favourite dev here. ;) Thanks for this quick fix!

Bastien, you are slowly becoming my favourite dev here. ;) Thanks for this quick fix!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#45283
No description provided.