Crash when enabling eevee viewport shading #72231

Closed
opened 2019-12-06 13:44:18 +01:00 by Gergő · 15 comments

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.41

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: f1aa4d18d4

Short description of error
When I click on viewport shading in my .blend file, while using the eevee render engine, blender crashes every time.

Exact steps for others to reproduce the error
Open the attached .blend file and click on viewport shading.
eevee_crash.blend

**System Information** Operating system: Windows-10-10.0.18362 64 Bits Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.41 **Blender Version** Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: `f1aa4d18d4` **Short description of error** When I click on viewport shading in my .blend file, while using the eevee render engine, blender crashes every time. **Exact steps for others to reproduce the error** Open the attached .blend file and click on viewport shading. [eevee_crash.blend](https://archive.blender.org/developer/F8193455/eevee_crash.blend)
Author

Added subscriber: @UsernamGeri

Added subscriber: @UsernamGeri

Added subscriber: @rjg

Added subscriber: @rjg

On a test system with an older GPU I'm getting an allocation error (not enough memory) in DRW_texture_create_2d_array when trying to create a texture with the following arguments:

w = 4098
h = 4098
format = GPU_DEPTH_COMPONENT16
flags = DRW_TEX_FILTER | DRW_TEX_COMPARE
*fpixel = NULL

The crash is caused by tex being freed in that situation and the code tries to dereference a NULL pointer. If you're experiencing the same problem, there should be an error message printed to the console.

Please open Blender's directory and double click on the blender_debug_log.cmd file. This will open up Blender in debug mode and create logs file. Proceed by loading the project file and switch to rendered mode in order to make Blender crash. Once Blender is closed the Windows Explorer will open and show you two files. Upload them here by using the upload button.

2019_12_04_upload_icon_developer_blender_org.png

Stacktrace:

GPU_texture_bind(GPUTexture * tex, int number) (/home/x/01_data/02_git/blender-git/blender/source/blender/gpu/intern/gpu_texture.c:1557)
drw_texture_set_parameters(GPUTexture * tex, DRWTextureFlag flags) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager_texture.c:64)
DRW_texture_create_2d_array(int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float * fpixels) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager_texture.c:101)
EEVEE_shadows_update(EEVEE_ViewLayerData * sldata, EEVEE_Data * vedata) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/engines/eevee/eevee_shadows.c:285)
EEVEE_lights_cache_finish(EEVEE_ViewLayerData * sldata, EEVEE_Data * vedata) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/engines/eevee/eevee_lights.c:219)
eevee_cache_finish(void * vedata) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/engines/eevee/eevee_engine.c:159)
drw_engines_cache_finish() (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager.c:1168)
DRW_draw_render_loop_ex(struct Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * ar, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager.c:1575)
DRW_draw_view(const bContext * C) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager.c:1485)
view3d_draw_view(const bContext * C, ARegion * ar) (/home/x/01_data/02_git/blender-git/blender/source/blender/editors/space_view3d/view3d_draw.c:1532)
view3d_main_region_draw(const bContext * C, ARegion * ar) (/home/x/01_data/02_git/blender-git/blender/source/blender/editors/space_view3d/view3d_draw.c:1556)
ED_region_do_draw(bContext * C, ARegion * ar) (/home/x/01_data/02_git/blender-git/blender/source/blender/editors/screen/area.c:534)
wm_draw_window_offscreen(bContext * C, wmWindow * win, _Bool stereo) (/home/x/01_data/02_git/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:627)
wm_draw_window(bContext * C, wmWindow * win) (/home/x/01_data/02_git/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:763)
wm_draw_update(bContext * C) (/home/x/01_data/02_git/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:945)
WM_main(bContext * C) (/home/x/01_data/02_git/blender-git/blender/source/blender/windowmanager/intern/wm.c:423)
main(int argc, const char ** argv) (/home/x/01_data/02_git/blender-git/blender/source/creator/creator.c:496)
On a test system with an older GPU I'm getting an allocation error (not enough memory) in `DRW_texture_create_2d_array` when trying to create a texture with the following arguments: ``` w = 4098 h = 4098 format = GPU_DEPTH_COMPONENT16 flags = DRW_TEX_FILTER | DRW_TEX_COMPARE *fpixel = NULL ``` The crash is caused by `tex` being freed in that situation and the code tries to dereference a NULL pointer. If you're experiencing the same problem, there should be an error message printed to the console. Please open Blender's directory and double click on the `blender_debug_log.cmd` file. This will open up Blender in debug mode and create logs file. Proceed by loading the project file and switch to rendered mode in order to make Blender crash. Once Blender is closed the Windows Explorer will open and show you two files. Upload them here by using the upload button. ![2019_12_04_upload_icon_developer_blender_org.png](https://archive.blender.org/developer/F8190038/2019_12_04_upload_icon_developer_blender_org.png) Stacktrace: ``` GPU_texture_bind(GPUTexture * tex, int number) (/home/x/01_data/02_git/blender-git/blender/source/blender/gpu/intern/gpu_texture.c:1557) drw_texture_set_parameters(GPUTexture * tex, DRWTextureFlag flags) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager_texture.c:64) DRW_texture_create_2d_array(int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float * fpixels) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager_texture.c:101) EEVEE_shadows_update(EEVEE_ViewLayerData * sldata, EEVEE_Data * vedata) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/engines/eevee/eevee_shadows.c:285) EEVEE_lights_cache_finish(EEVEE_ViewLayerData * sldata, EEVEE_Data * vedata) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/engines/eevee/eevee_lights.c:219) eevee_cache_finish(void * vedata) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/engines/eevee/eevee_engine.c:159) drw_engines_cache_finish() (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager.c:1168) DRW_draw_render_loop_ex(struct Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * ar, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager.c:1575) DRW_draw_view(const bContext * C) (/home/x/01_data/02_git/blender-git/blender/source/blender/draw/intern/draw_manager.c:1485) view3d_draw_view(const bContext * C, ARegion * ar) (/home/x/01_data/02_git/blender-git/blender/source/blender/editors/space_view3d/view3d_draw.c:1532) view3d_main_region_draw(const bContext * C, ARegion * ar) (/home/x/01_data/02_git/blender-git/blender/source/blender/editors/space_view3d/view3d_draw.c:1556) ED_region_do_draw(bContext * C, ARegion * ar) (/home/x/01_data/02_git/blender-git/blender/source/blender/editors/screen/area.c:534) wm_draw_window_offscreen(bContext * C, wmWindow * win, _Bool stereo) (/home/x/01_data/02_git/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:627) wm_draw_window(bContext * C, wmWindow * win) (/home/x/01_data/02_git/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:763) wm_draw_update(bContext * C) (/home/x/01_data/02_git/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:945) WM_main(bContext * C) (/home/x/01_data/02_git/blender-git/blender/source/blender/windowmanager/intern/wm.c:423) main(int argc, const char ** argv) (/home/x/01_data/02_git/blender-git/blender/source/creator/creator.c:496) ```
Author
[blender_system_info.txt](https://archive.blender.org/developer/F8201884/blender_system_info.txt) [blender_debug_output.txt](https://archive.blender.org/developer/F8201883/blender_debug_output.txt)

Can you please run blender_debug_gpu.cmd as well and repeat the steps of loading the project file and switching to rendered mode? Thank you!

Can you please run `blender_debug_gpu.cmd` as well and repeat the steps of loading the project file and switching to rendered mode? Thank you!
Author
Sure! Here: [blender_debug_output.txt](https://archive.blender.org/developer/F8204761/blender_debug_output.txt) [blender_system_info.txt](https://archive.blender.org/developer/F8204760/blender_system_info.txt)

It seems that my first comment was incorrect regarding the possible cause, the log files don't match that case. I can't reproduce your crash with 2.81 or 2.81a on Windows 10 with more powerful hardware.

It seems that my first comment was incorrect regarding the possible cause, the log files don't match that case. I can't reproduce your crash with 2.81 or 2.81a on Windows 10 with more powerful hardware.

In order to narrow down the possible cause, we'd like you to try the following steps:

  • Check if you're still experiencing the crash with the most recent experimental build
  • With your current Blender version:
    • Try to turn off Eevee features (AO, Bloom) and check if that stops it from crashing
    • Scale down your entire scene, reduce the clipping values (which are currently very high) and check if the crash still occurs.
    • Go through each object in the scene, delete one object, save the project to a new file and after check if it still crashes. If the crash is tied to a particular object, let us know and then try to remove modifiers and materials to check if any of these cause the crash.
In order to narrow down the possible cause, we'd like you to try the following steps: - Check if you're still experiencing the crash with the most recent [experimental build ](https://builder.blender.org/download/) - With your current Blender version: - Try to turn off Eevee features (AO, Bloom) and check if that stops it from crashing - Scale down your entire scene, reduce the clipping values (which are currently very high) and check if the crash still occurs. - Go through each object in the scene, delete one object, save the project to a new file and after check if it still crashes. If the crash is tied to a particular object, let us know and then try to remove modifiers and materials to check if any of these cause the crash.
Author

I checked out all of these and here's what I found:
With the latest version it still crashes, however scaling down the entire scene considerably and reducing clipping values did help. I also narrowed down what eevee setting could cause crashing and I think it's the shadow cube size. Setting it to the highest value of 4096px causes crashing.

I checked out all of these and here's what I found: With the latest version it still crashes, however scaling down the entire scene considerably and reducing clipping values did help. I also narrowed down what eevee setting could cause crashing and I think it's the shadow cube size. Setting it to the highest value of 4096px causes crashing.

Did the scaling and reduced clipping already avoid the crash or was that only accomplished by lowering the shadow cube size?

Did the scaling and reduced clipping already avoid the crash or was that only accomplished by lowering the shadow cube size?
Author

Scaling the scene way down and reducing clipping did in itself help preventing the crash, even with 4096px shadow cube size.

Scaling the scene way down and reducing clipping did in itself help preventing the crash, even with 4096px shadow cube size.

Thank you for helping investigate this! In general large ranges of clipping values should be avoided since this causes floating point precision problems.

I've informed other developers about this issue and they will have another look.

Thank you for helping investigate this! In general large ranges of clipping values should be avoided since this causes floating point precision problems. I've informed other developers about this issue and they will have another look.

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Clément Foucault self-assigned this 2020-07-02 00:17:26 +02:00

Added subscriber: @FORTNITE_BLENDER

Added subscriber: @FORTNITE_BLENDER

What is the solution of the error

What is the solution of the error
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#72231
No description provided.