save .EXR defaults to uncompressed, causes segfault #31609

Closed
opened 2012-05-27 00:51:50 +02:00 by jim ww smith · 13 comments

%%%it has taken me years to finally identify the source of this problem. this seems to apply to all current versions of blender, back as far as 2.49. on OSX and Linux, 32bit and 64bit.

when resaving an .EXR image from the image editor, it applies default values, without compression. blender does not reference the output settings in the render properties panel. when reopening the object file, blender will crash when attempting to load the image. i thought this was an error with the preview utility in the material texture panel, but it occurs whenever blender accesses the file.

process usually works as follows: bake a multiresolution sculpt to a subdivided mesh. save the image file as an 32bit .EXR so i can use the image for a displacement modifier. create a new texture slot for the image texture, use as input for displace modifier. if i 'save' the image at this point, it will apply the uncompressed defaults, causing blender to crash when it attempts to reload the image.

i can repair the damage by opening the image and resaving it using 'save as', and using a compression option. %%%

%%%it has taken me years to finally identify the source of this problem. this seems to apply to all current versions of blender, back as far as 2.49. on OSX and Linux, 32bit and 64bit. when resaving an .EXR image from the image editor, it applies default values, without compression. blender does not reference the output settings in the render properties panel. when reopening the object file, blender will crash when attempting to load the image. i thought this was an error with the preview utility in the material texture panel, but it occurs whenever blender accesses the file. process usually works as follows: bake a multiresolution sculpt to a subdivided mesh. save the image file as an 32bit .EXR so i can use the image for a displacement modifier. create a new texture slot for the image texture, use as input for displace modifier. if i 'save' the image at this point, it will apply the uncompressed defaults, causing blender to crash when it attempts to reload the image. i can repair the damage by opening the image and resaving it using 'save as', and using a compression option. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%correction. resaving the image with compression enabled does not solve the problem, and there is an issue with the preview generation, as i suspected. which leads me to suspect an issue with the handling of video memory?

having saved the image, then saved the file, then quit blender, i cannot reopen the file, without blender crashing. i can see that the image has been applied to the displacement modifier, but as the materials property window is loading the preview, it crashes. i renamed by image folder, so blender could not resolve the image paths, and the file loads. i collapsed the preview tab, saved the file, reloaded the startup file, renamed the image folder, then opened the file. it works fine, until i open the material texture preview tab.

so this appears to be two different, but related issues, one with the .EXR output defaults, and the other with the preview renderer in the texture materials window.%%%

%%%correction. resaving the image with compression enabled does not solve the problem, and there is an issue with the preview generation, as i suspected. which leads me to suspect an issue with the handling of video memory? having saved the image, then saved the file, then quit blender, i cannot reopen the file, without blender crashing. i can see that the image has been applied to the displacement modifier, but as the materials property window is loading the preview, it crashes. i renamed by image folder, so blender could not resolve the image paths, and the file loads. i collapsed the preview tab, saved the file, reloaded the startup file, renamed the image folder, then opened the file. it works fine, until i open the material texture preview tab. so this appears to be two different, but related issues, one with the .EXR output defaults, and the other with the preview renderer in the texture materials window.%%%

%%%I can not actually reproduce the crash here. Can you please be more specific in steps to reproduce the crash (shortest way of crashing blender is welcome :)

Having sample .blend file which crashes blender would also help here (do not forget to add textures, as you told they're critical to reproduce the crash). Also please attach system-info.txt generated by Help -> System Info operator.%%%

%%%I can not actually reproduce the crash here. Can you please be more specific in steps to reproduce the crash (shortest way of crashing blender is welcome :) Having sample .blend file which crashes blender would also help here (do not forget to add textures, as you told they're critical to reproduce the crash). Also please attach system-info.txt generated by Help -> System Info operator.%%%
Author

%%%okay, i managed to reproduce it in a simple test file, but i have found some new bugs with my current build, which will have to be a different bug report.

the process is as described before, create a mesh, add multi-res modifier, sculpt details. create new mesh from original mesh, delete multi-res form the new object, add subdivision modifier, create UV map, create image for displacement texture, save as .EXR with ZIP compression. select multi-res object, select sub-div object, bake displacement. save image. ( i used a 4K image, which is 17.9 MB when compressed ) now i create a material texture for the displace image, create a displace modifier for the sub-div object using the displace material texture as input.

( i am now getting a strange offset, which seems to be related to the image premultiply feature. this is the other bug report i will have to follow up on. )

if i save the image texture again, i have to 'save as' and apply the original settings, or it will save with system defaults, which creates a file size of 256.1 MB. when i reopen the file, blender will crash as the material texture preview attempts to load. it will also crash if i reload the image using the reload button in the image editor, or material palette.%%%

%%%okay, i managed to reproduce it in a simple test file, but i have found some new bugs with my current build, which will have to be a different bug report. the process is as described before, create a mesh, add multi-res modifier, sculpt details. create new mesh from original mesh, delete multi-res form the new object, add subdivision modifier, create UV map, create image for displacement texture, save as .EXR with ZIP compression. select multi-res object, select sub-div object, bake displacement. save image. ( i used a 4K image, which is 17.9 MB when compressed ) now i create a material texture for the displace image, create a displace modifier for the sub-div object using the displace material texture as input. ( i am now getting a strange offset, which seems to be related to the image premultiply feature. this is the other bug report i will have to follow up on. ) if i save the image texture again, i have to 'save as' and apply the original settings, or it will save with system defaults, which creates a file size of 256.1 MB. when i reopen the file, blender will crash as the material texture preview attempts to load. it will also crash if i reload the image using the reload button in the image editor, or material palette.%%%

%%%It isn't the premultiply feature. It is the color management that sadly affects bump/displacement maps. You draw 0.5 (r=g=b=0.5) and you get 0.24 for displacement.

I reported this nearly a year ago http://projects.blender.org/tracker/?func=detail&atid=498&aid=28193&group_id=9

The color profiles are now correct (most recent versions). Now you get the same after saving and loading, but nothing changed regarding this distortion, which still makes bumpmaps unusable or impossible to draw by hand (at least if you have no calculator in your head, to know that 0.5 is 0.24, 0.0 is 0.0 and 1.0 is 1.0).%%%

%%%It isn't the premultiply feature. It is the color management that sadly affects bump/displacement maps. You draw 0.5 (r=g=b=0.5) and you get 0.24 for displacement. I reported this nearly a year ago http://projects.blender.org/tracker/?func=detail&atid=498&aid=28193&group_id=9 The color profiles are now correct (most recent versions). Now you get the same after saving and loading, but nothing changed regarding this distortion, which still makes bumpmaps unusable or impossible to draw by hand (at least if you have no calculator in your head, to know that 0.5 is 0.24, 0.0 is 0.0 and 1.0 is 1.0).%%%

%%%PS: I request a "color management OFF" button for the image editor.%%%

%%%PS: I request a "color management OFF" button for the image editor.%%%

%%%Still can't reproduce the crash and got some more questions:

  • As i understand crash happens when you're using non-zipped exr image. Would blender crash if you'll setup completely new scene using that non-zipped file for displacement?
  • Are you using official builds from blender.org or you're using builds from graphiall?
  • Can you provide system-info.txt generated by Help -> System Info operator?
  • Does it happen on your particular computer or you can reproduce crash on other computer as well?%%%
%%%Still can't reproduce the crash and got some more questions: - As i understand crash happens when you're using non-zipped exr image. Would blender crash if you'll setup completely new scene using that non-zipped file for displacement? - Are you using official builds from blender.org or you're using builds from graphiall? - Can you provide system-info.txt generated by Help -> System Info operator? - Does it happen on your particular computer or you can reproduce crash on other computer as well?%%%
Author

%%%i understand your frustration. reproducing the error has been the thing keeping me from making a bug report for so long.

  • no, i can open the unzipped .EXR in blender. that is how i have been fixing the problem. i can open the offending image, save it with compression, and if i am lucky, i can reopen the object file, and clean any offending bits. usually i rebuild the materials.
  • yes, i have had this problem on all official builds since 2.49. currently i switch between the stable build, and the SVN builds from http://ppa.launchpad.net/cheleb/blender-svn/ubuntu
  • i have generated a current sys-info.txt, see attached. ( oh. there is already one there. i will add an updated one, if that helps. )
  • it has been happening on various computers, running various platforms. mac osx 10.4 and 10.6, ubuntu 64bit 9.10, 10.4, 10.10, 11.04, 11.10, and 12.04.

i did consider that this may be related to the colour conversion issues, but the problem predates those fixes. the consistent factor seems to be the texture preview. i am not sure where it grabs that image information, whether it is from the video memory, or reading off the disk. perhaps it is a simple file path, or permissions issue? i also considered that it may be an old image flag, leftover from an earlier version? i often reuse old models, updating them as i progress. %%%

%%%i understand your frustration. reproducing the error has been the thing keeping me from making a bug report for so long. - no, i can open the unzipped .EXR in blender. that is how i have been fixing the problem. i can open the offending image, save it with compression, and if i am lucky, i can reopen the object file, and clean any offending bits. usually i rebuild the materials. - yes, i have had this problem on all official builds since 2.49. currently i switch between the stable build, and the SVN builds from http://ppa.launchpad.net/cheleb/blender-svn/ubuntu - i have generated a current sys-info.txt, see attached. ( oh. there is already one there. i will add an updated one, if that helps. ) - it has been happening on various computers, running various platforms. mac osx 10.4 and 10.6, ubuntu 64bit 9.10, 10.4, 10.10, 11.04, 11.10, and 12.04. i did consider that this may be related to the colour conversion issues, but the problem predates those fixes. the consistent factor seems to be the texture preview. i am not sure where it grabs that image information, whether it is from the video memory, or reading off the disk. perhaps it is a simple file path, or permissions issue? i also considered that it may be an old image flag, leftover from an earlier version? i often reuse old models, updating them as i progress. %%%
Author

%%%i think i have a better test sample. the .EXR problem may have been a mislead. i have taken one piece out of a file i am currently having trouble with, to try and isolate the problem. ( the complete file is large, and somewhat sensitive to the client, as the book is not being promoted yet. these are just some of the wing feathers, without the full figure, or armature. )

to reproduce the error, select 'coverts minor' in the outliner, then select 'material' in the properties window. the panel appears briefly, then crashes.

i am beginning to suspect the image format, and compression issue may not be the issue directly, but a contributing factor. but this is not just an issue with upgrading an old model, as this particular part is a new addition to the model.

also, i am getting this error in the terminal when i load the file:
Error, region type missing in - name:"Clip", id:20

i am not sure if that is a new error message. reporting has been minimal, as the terminal crashes with blender. i have no other method to log the messages from blender.%%%

%%%i think i have a better test sample. the .EXR problem may have been a mislead. i have taken one piece out of a file i am currently having trouble with, to try and isolate the problem. ( the complete file is large, and somewhat sensitive to the client, as the book is not being promoted yet. these are just some of the wing feathers, without the full figure, or armature. ) to reproduce the error, select 'coverts minor' in the outliner, then select 'material' in the properties window. the panel appears briefly, then crashes. i am beginning to suspect the image format, and compression issue may not be the issue directly, but a contributing factor. but this is not just an issue with upgrading an old model, as this particular part is a new addition to the model. also, i am getting this error in the terminal when i load the file: Error, region type missing in - name:"Clip", id:20 i am not sure if that is a new error message. reporting has been minimal, as the terminal crashes with blender. i have no other method to log the messages from blender.%%%
Author

%%%i may be getting closer.

using the same file, if i select 'textures' and turn off the check marks for all of the textures, i can open the preview pane, and it all works. i can turn on any of the other image textures, and it is still stable. if i turn on the 's_disp' image texture, it will crash when drawing the preview. and this is a small .EXR not a large uncompressed file. ( too small for what i am doing with it, but i had to reduce it, to try and make it stable enough to work on. ) so i think i may have isolated the error. maybe. sort of.

i will test it on my mac, to see if it is any more stable there. ( BTW i am using the latest stable release version, 2.63a, on ubuntu 10.10 64bit, 8GB ram, GeForce GTX 550 Ti 2GB )%%%

%%%i may be getting closer. using the same file, if i select 'textures' and turn off the check marks for all of the textures, i can open the preview pane, and it all works. i can turn on any of the other image textures, and it is still stable. if i turn on the 's_disp' image texture, it will crash when drawing the preview. and this is a small .EXR not a large uncompressed file. ( too small for what i am doing with it, but i had to reduce it, to try and make it stable enough to work on. ) so i think i may have isolated the error. maybe. sort of. i will test it on my mac, to see if it is any more stable there. ( BTW i am using the latest stable release version, 2.63a, on ubuntu 10.10 64bit, 8GB ram, GeForce GTX 550 Ti 2GB )%%%
Author

%%%confirmed. same results on my mac. although, if i click on the 's_disp' image texture, even when it is unchecked, and the preview palette is open, it may crash. but if i open the the image texture in an image window first, it loads fine, and i can then select the texture channel, without having it crash. which suggests the image viewer grabs the actual data, and the preview loads the data from some internal cache? without the cache data, it crashes? perhaps? %%%

%%%confirmed. same results on my mac. although, if i click on the 's_disp' image texture, even when it is unchecked, and the preview palette is open, it may crash. but if i open the the image texture in an image window first, it loads fine, and i can then select the texture channel, without having it crash. which suggests the image viewer grabs the actual data, and the preview loads the data from some internal cache? without the cache data, it crashes? perhaps? %%%
Member

%%%Should be fixed in r49232. Thanks for reporting.%%%

%%%Should be fixed in r49232. Thanks for reporting.%%%
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
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#31609
No description provided.