EEVEE Viewport Shading crash (3.2.0 Alpha) #97545

Closed
opened 2022-04-22 13:01:29 +02:00 by Peter Green · 28 comments

System Information
Operating system: WIN10
Graphics card: Intel HD 4600

Blender Version
Broken: blender-3.2.0-alpha+daily.179100c02126

Short description of error
System crashes when switching to EEVEE Viewport Shading.

Exact steps for others to reproduce the error
Launch Blender, accept the splash screen, click on the Viewport Shading icon, system crashes.

blender_system_info.txt
blender_debug_output.txt

**System Information** Operating system: WIN10 Graphics card: Intel HD 4600 **Blender Version** Broken: blender-3.2.0-alpha+daily.179100c02126 **Short description of error** System crashes when switching to EEVEE Viewport Shading. **Exact steps for others to reproduce the error** Launch Blender, accept the splash screen, click on the Viewport Shading icon, system crashes. [blender_system_info.txt](https://archive.blender.org/developer/F13015815/blender_system_info.txt) [blender_debug_output.txt](https://archive.blender.org/developer/F13015813/blender_debug_output.txt)
Author

Added subscriber: @snibber

Added subscriber: @snibber

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

No crash here with 048c769774 and a Radeon RX 5500 XT.

Are you on the latest GPU drivers?

No crash here with 048c769774 and a Radeon RX 5500 XT. Are you on the latest GPU drivers?
Author

...latest GPU drivers?

GPU? I wish. I believe I am using the latest drivers for my graphics "card", which alas is only the onboard Intel chip. I do perform regular Windows updates, so I don't think the driver version is to blame, and Blender 3.1.2 is fine, and doesn't crash.

Edit: I installed the Intel Support assistant, which told me my graphics driver was out of date. Long story, short, I installed the new driver. The crash still happens.

>...latest GPU drivers? GPU? I wish. I *believe* I am using the latest drivers for my graphics "card", which alas is only the onboard Intel chip. I do perform regular Windows updates, so I don't think the driver version is to blame, and Blender 3.1.2 is fine, and doesn't crash. Edit: I installed the Intel Support assistant, which told me my graphics driver was out of date. Long story, short, I installed the new driver. The crash still happens.
Member

Added subscribers: @Jason-Fielder, @fclem, @lichtwerk

Added subscribers: @Jason-Fielder, @fclem, @lichtwerk
Member

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

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

The Haswell HD 4600 is on the lower end of the spectrum, but should not crash.
From the log:

ERROR (gpu.shader): GPU_material_compile VertShader: 
      | 
   20 | /* Texture format tokens -- Type explictness required by other Graphics APIs. */
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^
      | Error: '' :  illegal character (") (0x22)
      | Error: '' :  illegal character (") (0x22)

cant really make sense of the error message, maybe something wrong with {7c9e128bbf}?
@fclem, @Jason-Fielder : does this ring a bell?

The Haswell HD 4600 is on the lower end of the spectrum, but should not crash. From the log: ``` ERROR (gpu.shader): GPU_material_compile VertShader: | 20 | /* Texture format tokens -- Type explictness required by other Graphics APIs. */ | ^ | Error: '' : illegal character (") (0x22) | Error: '' : illegal character (") (0x22) ``` cant really make sense of the error message, maybe something wrong with {7c9e128bbf}? @fclem, @Jason-Fielder : does this ring a bell?
Member

Added subscriber: @Michael-Parkin-White-Apple

Added subscriber: @Michael-Parkin-White-Apple
Member
@Michael-Parkin-White-Apple

The main change with this PR was the inclusion of source/blender/gpu/shaders/opengl/glsl_shader_defines.glsl as a common header file to support cross-API functionality translation.

Few possibilities that could be occurring:

  • Could insertion of the GLSL shader defines file into the patch be causing symbols to be inserted in-line in a way which throws off the intel compiler?
  /* GLSL Backend Lib. */
  STR_CONCAT(patch, slen, datatoc_glsl_shader_defines_glsl);
  • Or possible problem with windows-compatible line-endings/ascii symbols within the file? Running the file through an ASCII scanner reveals all line endings are CR-LF, all indents are with spaces, and there appear to be no other unexpected characters.

  • The compile error seems to focus in on the comment /* Texture format tokens -- Type explictness required by other Graphics APIs. */ Is there something about this which the compiler does not like? Perhaps the --?

  • Given the report here only states that this happens for EEVEE shaders, could the macro's themselves such as #define depth2D sampler2D be causing a problem?

One key difference between platforms could be whether the existing defines in the GLSL shader patch glsl_patch_default_get(..) are affected differently by the injection of the patch. As Intel HD 4600, in this case, may have differing GPU HW feature availability vs the tested macOS platforms and AMD/NVidia platforms.

The main change with this PR was the inclusion of `source/blender/gpu/shaders/opengl/glsl_shader_defines.glsl` as a common header file to support cross-API functionality translation. Few possibilities that could be occurring: - Could insertion of the GLSL shader defines file into the patch be causing symbols to be inserted in-line in a way which throws off the intel compiler? ``` /* GLSL Backend Lib. */ STR_CONCAT(patch, slen, datatoc_glsl_shader_defines_glsl); ``` - Or possible problem with windows-compatible line-endings/ascii symbols within the file? Running the file through an ASCII scanner reveals all line endings are CR-LF, all indents are with spaces, and there appear to be no other unexpected characters. - The compile error seems to focus in on the comment `/* Texture format tokens -- Type explictness required by other Graphics APIs. */` Is there something about this which the compiler does not like? Perhaps the `--`? - Given the report here only states that this happens for EEVEE shaders, could the macro's themselves such as `#define depth2D sampler2D` be causing a problem? One key difference between platforms could be whether the existing defines in the GLSL shader patch `glsl_patch_default_get(..)` are affected differently by the injection of the patch. As Intel HD 4600, in this case, may have differing GPU HW feature availability vs the tested macOS platforms and AMD/NVidia platforms.
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123

Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'

Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'

We internally diagnosed an issue with fa3bd17ae8 which resembles this one. This has been fixed by 478eb3a0e6 but I would like to know if this is the same issue or not.

We internally diagnosed an issue with fa3bd17ae8 which resembles this one. This has been fixed by 478eb3a0e6 but I would like to know if this is the same issue or not.
Author

I'm not sure if this is useful information, but the latest version (blender-3.2.0-alpha+daily.12217714c717) crashes in the same way, but beforethe splash screen appears.

ERROR (gpu.shader): overlay_background VertShader: 
      | 
    8 | #extension GL_ARB_texture_cube_map_array : enable
      |                                                                         ^
      | Error: '' :  illegal character (") (0x22)
      | Error: '' :  illegal character (") (0x22)
      | 
I'm not sure if this is useful information, but the latest version (blender-3.2.0-alpha+daily.12217714c717) crashes in the same way, but **before**the splash screen appears. ``` ERROR (gpu.shader): overlay_background VertShader: | 8 | #extension GL_ARB_texture_cube_map_array : enable | ^ | Error: '' : illegal character (") (0x22) | Error: '' : illegal character (") (0x22) | ```

@snibber this is indeed a useful information.

I have the feeling it is caused by #error preprocessor directive which is followed by a string. I added these to ease the development process.

I'll remove them for release builds.

@snibber this is indeed a useful information. I have the feeling it is caused by `#error` preprocessor directive which is followed by a string. I added these to ease the development process. I'll remove them for release builds.

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

This issue was referenced by aa34706aac

This issue was referenced by aa34706aacdab45847d7c0e3987b1de4ff0b8760

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Clément Foucault self-assigned this 2022-05-01 22:43:52 +02:00
Author

"For the avoidance of doubt", should this latest commit have made it into the 3.2.0 Beta which is now available (blender-3.2.0-beta+daily.62ef1c08af9a)? I've tried this, and the error is still there. (I was a software engineer for several decades, but I'm too lazy to delve into git and get my head round the branching structure of the Blender project.)

"For the avoidance of doubt", should this latest commit have made it into the 3.2.0 Beta which is now available (blender-3.2.0-beta+daily.62ef1c08af9a)? I've tried this, and the error is still there. (I was a software engineer for several decades, but I'm too lazy to delve into git and get my head round the branching structure of the Blender project.)

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

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

The branching was done a day later, so the commit is part of Blender 3.2. As the error is still there guess this needs to be re-opened.

The branching was done a day later, so the commit is part of Blender 3.2. As the error is still there guess this needs to be re-opened.
Author

Sorry to be the bearer of bad news. I've been on the receiving end of many a bug report.

Sorry to be the bearer of bad news. I've been on the receiving end of many a bug report.
Author

I ran blender_debug_gpu.cmd to see if that would shed any light on this issue. It provided slightlymore information (a few INFO and WARN lines), so I attach the debug output here for completeness.

blender_debug_output.txt

I also cloned the repo and dipped my toe into the waters - successfully building a new blender.exe...which crashes in exactly the same way! I guess that's something. But that's as far as my progress along the Blender development learning curve will currently allow me to go. I hope somebody will be able to get to the bottom of this one - I suspect it's a corner-case, and will only affect people with low-end graphics hardware, but I don't want my Blender journey to stop at 3.1.2.

I ran blender_debug_gpu.cmd to see if that would shed any light on this issue. It provided *slightly*more information (a few INFO and WARN lines), so I attach the debug output here for completeness. [blender_debug_output.txt](https://archive.blender.org/developer/F13060555/blender_debug_output.txt) I also cloned the repo and dipped my toe into the waters - successfully building a new blender.exe...which crashes in exactly the same way! I guess that's something. But that's as far as my progress along the Blender development learning curve will currently allow me to go. I hope somebody will be able to get to the bottom of this one - I suspect it's a corner-case, and will only affect people with low-end graphics hardware, but I don't want my Blender journey to stop at 3.1.2.

I think this is now caused by the C include directives that are in shared headers like in overlay_shader_shared.h. I'll write a patch that will replace all " char with something else for the drivers that needs this. At least we see progress! Thanks @snibber for the blender_debug_output.txt this was really helpful.

I think this is now caused by the C include directives that are in shared headers like in `overlay_shader_shared.h`. I'll write a patch that will replace all `"` char with something else for the drivers that needs this. At least we see progress! Thanks @snibber for the `blender_debug_output.txt` this was really helpful.

This issue was referenced by a4c2060b91

This issue was referenced by a4c2060b91467987c930e4dd77a6673acd072ced

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

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

I've tried the latest 3.2.0 build (a4c2060b91) , and it's a mixed picture. Blender starts OK, I accept the splash screen, but when I then click the Viewport Shading icon, it crashes (log attached).

blender_debug_output.txt

The headlines from this log:

ERROR (gpu.shader): GPU_material_compile VertShader: 
      | 
   17 | #define DFDX_SIGN 1.0
      |                                                                                                                                                                             ^
      | Error: 'assign' : l-value required 
      | Error: 'Error' : constant value cannot be passed for 'inout' parameters. 
      | 
      | #define DFDX_SIGN 1.0
      |                                                                                                                                                                              ^
      | Error: 'assign' : l-value required 
      | Error: 'Error' : constant value cannot be passed for 'inout' parameters. 

UPDATE
The very latest build (11aa237858) works! Merci beaucoup.

I've tried the latest 3.2.0 build (a4c2060b9146) , and it's a mixed picture. Blender starts OK, I accept the splash screen, but when I then click the Viewport Shading icon, it crashes (log attached). [blender_debug_output.txt](https://archive.blender.org/developer/F13064407/blender_debug_output.txt) The headlines from this log: ``` ERROR (gpu.shader): GPU_material_compile VertShader: | 17 | #define DFDX_SIGN 1.0 | ^ | Error: 'assign' : l-value required | Error: 'Error' : constant value cannot be passed for 'inout' parameters. | | #define DFDX_SIGN 1.0 | ^ | Error: 'assign' : l-value required | Error: 'Error' : constant value cannot be passed for 'inout' parameters. ``` **UPDATE** The very latest build (11aa237858d4) works! Merci beaucoup.

Yes this last error was in fact #97545 which has already been solved.

Yes this last error was in fact #97545 which has already been solved.
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
8 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#97545
No description provided.