Eevee : Crash or glitches with new "Filmic sRGB" color space #101969

Closed
opened 2022-10-21 08:54:40 +02:00 by ChameleonScales · 6 comments

System Information
Operating system: Linux-5.10.0-18-amd64-x86_64-with-glibc2.31 64 Bits
Graphics card: NVIDIA GeForce GTX 1660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.141.03

Blender Version
Tested broken versions:

  • 3.3.0 release
  • 3.3.1 release
  • 3.4.0 Alpha, branch: master, commit date: 2022-10-21 00:08, hash: ff8c0f062a
    Worked: never ("Filmic sRGB" was introduced in 3.3.0 )

Short description of error
When enabling Filmic sRGB in a material's image node, if the image is large enough, Eevee can't handle it and either glitches or makes Blender crash.

Exact steps for others to reproduce the error

From factory settings, startup file :

  • either add a plane or use the "Import Images as Planes" add-on to import this 43920x4919 white png (a photo with details would make the glitch more visible but obviously I wouldn''t upload a 50MB file. This one is 857 kB) : white.png
  • enable either Material Preview or Render view mode while staying in Eevee
  • in the Shader Editor, set the image node's Color Space to Filmic sRGB : either the image will be glitchy or Blender will crash. It depends on factors I couldn't figure out.

I'd recommend trying with a real photo you have by resizing it to be large enough.

**System Information** Operating system: Linux-5.10.0-18-amd64-x86_64-with-glibc2.31 64 Bits Graphics card: NVIDIA GeForce GTX 1660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.141.03 **Blender Version** Tested broken versions: - 3.3.0 release - 3.3.1 release - 3.4.0 Alpha, branch: master, commit date: 2022-10-21 00:08, hash: `ff8c0f062a` Worked: never ("Filmic sRGB" [was introduced in 3.3.0 ](https://wiki.blender.org/wiki/Reference/Release_Notes/3.3/Cycles#Changes)) **Short description of error** When enabling Filmic sRGB in a material's image node, if the image is large enough, Eevee can't handle it and either glitches or makes Blender crash. **Exact steps for others to reproduce the error** From factory settings, startup file : - either add a plane or use the "Import Images as Planes" add-on to import this 43920x4919 white png (a photo with details would make the glitch more visible but obviously I wouldn''t upload a 50MB file. This one is 857 kB) : ![white.png](https://archive.blender.org/developer/F13734164/white.png) - enable either Material Preview or Render view mode while staying in Eevee - in the Shader Editor, set the image node's Color Space to Filmic sRGB : either the image will be glitchy or Blender will crash. It depends on factors I couldn't figure out. I'd recommend trying with a real photo you have by resizing it to be large enough.

Added subscriber: @ChameleonScales

Added subscriber: @ChameleonScales

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

I can confirm the crash.
It happens in glTextureSubImage2D.
It seems to be a memory issue, but since the other color spaces work, it's possible that the problem is something else.

 	[External Code]	
>	blender.exe!blender::gpu::GLTexture::update_sub_direct_state_access(int mip, int * offset, int * extent, unsigned int format, unsigned int type, const void * data) Line 233	C++

 	blender.exe!blender::gpu::GLTexture::update_sub(int mip, int * offset, int * extent, eGPUDataFormat type, const void * data) Line 261	C++
 	blender.exe!blender::gpu::Texture::update(eGPUDataFormat format, const void * data) Line 212	C++
 	blender.exe!GPU_texture_update(GPUTexture * tex, eGPUDataFormat data_format, const void * data) Line 473	C++
 	blender.exe!IMB_create_gpu_texture(const unsigned char * name, ImBuf * ibuf, bool use_high_bitdepth, bool use_premult) Line 352	C
 	blender.exe!image_get_gpu_texture(Image * ima, ImageUser * iuser, ImBuf * ibuf, eGPUTextureTarget textarget) Line 418	C++
 	blender.exe!BKE_image_get_gpu_texture(Image * image, ImageUser * iuser, ImBuf * ibuf) Line 451	C++
 	blender.exe!DRW_shgroup_add_material_resources(DRWShadingGroup * grp, GPUMaterial * material) Line 1824	C++
 	blender.exe!material_shadow(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Material * ma, bool is_hair, EeveeMaterialCache * emc) Line 524	C
 	blender.exe!material_transparent(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Material * ma) Line 694	C
 	blender.exe!eevee_material_cache_get(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Object * ob, int slot, bool is_hair) Line 769	C
 	blender.exe!EEVEE_materials_cache_populate(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Object * ob, bool * cast_shadow) Line 826	C
 	blender.exe!EEVEE_cache_populate(void * vedata, Object * ob) Line 114	C
 	blender.exe!drw_engines_cache_populate(Object * ob) Line 1078	C
 	blender.exe!DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * region, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1729	C
 	blender.exe!DRW_draw_view(const bContext * C) Line 1634	C
 	blender.exe!view3d_draw_view(const bContext * C, ARegion * region) Line 1552	C++
 	blender.exe!view3d_main_region_draw(const bContext * C, ARegion * region) Line 1587	C++
 	blender.exe!ED_region_do_draw(bContext * C, ARegion * region) Line 551	C
 	blender.exe!wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 945	C
 	blender.exe!wm_draw_window(bContext * C, wmWindow * win) Line 1114	C
 	blender.exe!wm_draw_update(bContext * C) Line 1372	C
 	blender.exe!WM_main(bContext * C) Line 647	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 579	C
 	[External Code]	

Also adding the #render_cycles team, as it involves Color Management.

I can confirm the crash. It happens in `glTextureSubImage2D`. It seems to be a memory issue, but since the other color spaces work, it's possible that the problem is something else. ``` [External Code] > blender.exe!blender::gpu::GLTexture::update_sub_direct_state_access(int mip, int * offset, int * extent, unsigned int format, unsigned int type, const void * data) Line 233 C++ blender.exe!blender::gpu::GLTexture::update_sub(int mip, int * offset, int * extent, eGPUDataFormat type, const void * data) Line 261 C++ blender.exe!blender::gpu::Texture::update(eGPUDataFormat format, const void * data) Line 212 C++ blender.exe!GPU_texture_update(GPUTexture * tex, eGPUDataFormat data_format, const void * data) Line 473 C++ blender.exe!IMB_create_gpu_texture(const unsigned char * name, ImBuf * ibuf, bool use_high_bitdepth, bool use_premult) Line 352 C blender.exe!image_get_gpu_texture(Image * ima, ImageUser * iuser, ImBuf * ibuf, eGPUTextureTarget textarget) Line 418 C++ blender.exe!BKE_image_get_gpu_texture(Image * image, ImageUser * iuser, ImBuf * ibuf) Line 451 C++ blender.exe!DRW_shgroup_add_material_resources(DRWShadingGroup * grp, GPUMaterial * material) Line 1824 C++ blender.exe!material_shadow(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Material * ma, bool is_hair, EeveeMaterialCache * emc) Line 524 C blender.exe!material_transparent(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Material * ma) Line 694 C blender.exe!eevee_material_cache_get(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Object * ob, int slot, bool is_hair) Line 769 C blender.exe!EEVEE_materials_cache_populate(EEVEE_Data * vedata, EEVEE_ViewLayerData * sldata, Object * ob, bool * cast_shadow) Line 826 C blender.exe!EEVEE_cache_populate(void * vedata, Object * ob) Line 114 C blender.exe!drw_engines_cache_populate(Object * ob) Line 1078 C blender.exe!DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * region, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1729 C blender.exe!DRW_draw_view(const bContext * C) Line 1634 C blender.exe!view3d_draw_view(const bContext * C, ARegion * region) Line 1552 C++ blender.exe!view3d_main_region_draw(const bContext * C, ARegion * region) Line 1587 C++ blender.exe!ED_region_do_draw(bContext * C, ARegion * region) Line 551 C blender.exe!wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 945 C blender.exe!wm_draw_window(bContext * C, wmWindow * win) Line 1114 C blender.exe!wm_draw_update(bContext * C) Line 1372 C blender.exe!WM_main(bContext * C) Line 647 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 579 C [External Code] ``` Also adding the #render_cycles team, as it involves `Color Management`.
Lukas Stockner self-assigned this 2022-10-22 02:50:34 +02:00

This issue was referenced by ea571ddc29

This issue was referenced by ea571ddc29e4e7be441a9b58bef50190a4a35c04
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' 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
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#101969
No description provided.