Blender 2.8 eevee crashes when I try to increase shadow cube size and hit render #55888

Closed
opened 2018-07-10 14:14:30 +02:00 by Monsour Leyco · 12 comments

System Information
Machine: Lenovo g40-60
OS: Windows 10 Single Language
Graphics: AMD Radeon R5 M230 / Intel(R) HD Graphics 5500
CPU: Intel(R) Core(TM) i7-5500U CPU @2.40GHz
Ram: 8GB

Blender Version
Branch: blender2.8
Hash: 1112f49
Date: 2018-07-09 22:47

Short description of error
Render engine: Eevee
Whenever I try to increase the Cube Size on the Shadow Panel higher than 512px and hit the Rendered Preview or Render Image blender crashes.

Exact steps for others to reproduce the error

  1. Open Blender
  2. Select Render Tab
  3. Open the Shadows Panel
  4. Click the dropdown for the Cube Size
  5. Choose a value higher than 512px
  6. Hit render/render preview
**System Information** Machine: Lenovo g40-60 OS: Windows 10 Single Language Graphics: AMD Radeon R5 M230 / Intel(R) HD Graphics 5500 CPU: Intel(R) Core(TM) i7-5500U CPU @2.40GHz Ram: 8GB **Blender Version** Branch: blender2.8 Hash: 1112f49 Date: 2018-07-09 22:47 **Short description of error** Render engine: Eevee Whenever I try to increase the Cube Size on the Shadow Panel higher than 512px and hit the Rendered Preview or Render Image blender crashes. **Exact steps for others to reproduce the error** 1. Open Blender 2. Select Render Tab 3. Open the Shadows Panel 4. Click the dropdown for the Cube Size 5. Choose a value higher than 512px 6. Hit render/render preview
Author

Added subscriber: @monsourleyco

Added subscriber: @monsourleyco

#56076 was marked as duplicate of this issue

#56076 was marked as duplicate of this issue

Added subscriber: @brecht

Added subscriber: @brecht
Clément Foucault was assigned by Brecht Van Lommel 2018-07-10 18:11:38 +02:00

Confirmed on AMD RX Vega on Windows, GTX 1080 on Linux works fine.

Console shows:

GPUTexture: texture alloc failed. Not enough Video Memory. Error      : EXCEPTION_ACCESS_VIOLATION

It would be nice to not crash when running out of memory, but also probably it shouldn't be happening in the first place for such a simple change.

Confirmed on AMD RX Vega on Windows, GTX 1080 on Linux works fine. Console shows: ``` GPUTexture: texture alloc failed. Not enough Video Memory. Error : EXCEPTION_ACCESS_VIOLATION ``` It would be nice to not crash when running out of memory, but also probably it shouldn't be happening in the first place for such a simple change.

Added subscriber: @Snowpz

Added subscriber: @Snowpz

Added subscriber: @s12a

Added subscriber: @s12a

Added subscriber: @Radicant

Added subscriber: @Radicant

So a follow up to my investigation: The use of GL_PROXY_TEXTURE2D/3D must be buggy on the AMD driver on windows. So I'm tempted to remove the check entirely, or blacklist it for this driver.

Why is it buggy? Because any texture 2D array of size > 2048 in width & height (and 1 layer) is considered invalid even if it is actually supported (removing the check without any crash or error).

The proxy texture mechanism seems to be very old and not widely used.

This check does not even prevent Out Of Memory issue it just states that the OGL implementation can support this texture.

@brecht opengl can only run out of memory if both VRAM and RAM is full (because of virtual memory blabla). The only thing that can make a texture bug is when there is not enough device memory to have all the current drawcall's textures resident (in the VRAM). And this is out of our hand because it's the drivers responsability.

So a follow up to my investigation: The use of GL_PROXY_TEXTURE2D/3D must be buggy on the AMD driver on windows. So I'm tempted to remove the check entirely, or blacklist it for this driver. Why is it buggy? Because any texture 2D array of size > 2048 in width & height (and 1 layer) is considered invalid even if it is actually supported (removing the check without any crash or error). The proxy texture mechanism seems to be very old and not widely used. This check does not even prevent Out Of Memory issue it just states that the OGL implementation can support this texture. @brecht opengl can only run out of memory if both VRAM and RAM is full (because of virtual memory blabla). The only thing that can make a texture bug is when there is not enough device memory to have all the current drawcall's textures resident (in the VRAM). And this is out of our hand because it's the drivers responsability.

Just remove the proxy checks I think, I agree it's not useful as a way to avoid out of memory errors.

We could keep the rescaling if the resolution exceeds GL_MAX_TEXTURE_SIZE, GL_MAX_3D_TEXTURE_SIZE, GL_MAX_CUBE_MAP_TEXTURE_SIZE perhaps.

Just remove the proxy checks I think, I agree it's not useful as a way to avoid out of memory errors. We could keep the rescaling if the resolution exceeds GL_MAX_TEXTURE_SIZE, GL_MAX_3D_TEXTURE_SIZE, GL_MAX_CUBE_MAP_TEXTURE_SIZE perhaps.

Actually I think I found why this happen.

The driver must treat GL_PROXY_TEXTURE_2D_ARRAY as a GL_PROXY_TEXTURE_3D and apply the same limitation to it, so width, height and depth are checked against GL_MAX_3D_TEXTURE_SIZE.
But following the spec width and height should be checked against GL_MAX_TEXTURE_SIZE which is given to be much larger.

I'll commit a general fix.

Actually I think I found why this happen. The driver must treat GL_PROXY_TEXTURE_2D_ARRAY as a GL_PROXY_TEXTURE_3D and apply the same limitation to it, so width, height and depth are checked against GL_MAX_3D_TEXTURE_SIZE. But following the spec width and height should be checked against GL_MAX_TEXTURE_SIZE which is given to be much larger. I'll commit a general fix.

This issue was referenced by 141e94f87f

This issue was referenced by 141e94f87ff29452ed8df82b4c25d8d134a34dad

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
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
6 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#55888
No description provided.