Regression: Blender 3.5.0 crashes when going to Edit Mode with a Curve selected #106432

Closed
opened 2023-04-01 15:49:07 +02:00 by MIrko-Paganoni · 6 comments

System Information
Operating system: Linux-5.19.0-38-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: Mesa Intel(R) HD Graphics 3000 (SNB GT2) Intel 3.3 (Core Profile) Mesa 22.2.5

Blender Version
Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash: 1be25cfff18b
Worked: (newest version of Blender that worked as expected)

Short description of error
Hello ! I use Ubuntu 22.04.2 LTS and Blender 3.5.0. I run xmonad through startx. Previously I used Blender 3.4, and all fine. With 3.5.0, each time I enter Edit Mode to edit a curve (every kind of curve), Blender chrashes.

Exact steps for others to reproduce the error
I open blender. I add object curve, every kind, as for example nurbs, path..
I enter Edit Mode with the curve selected.
Blender chrashes, and on the terminal I read:

ERROR (gpu.shader): overlay_edit_curve_handle GeomShader: 
      | 
 1334 |   if (!showCurveHandles && (color_id < 5)) {
      |                             ^
      | overlay_edit_curve_handle_geom.glsl:29:29: Error: could not implicitly convert operands to relational operator
      | overlay_edit_curve_handle_geom.glsl:29:29: Error: RHS of `&&' must be scalar boolean
      | 
 1345 |   if ((curveHandleDisplay != CURVE_HANDLE_ALL) && (!handle_selected)) {
      |        ^
      | overlay_edit_curve_handle_geom.glsl:40:8: Error: operands of `!=' must have the same type
      | 
 1348 |     if ((!is_u_segment) && (color_id <= 4)) {
      |                           ^
      | overlay_edit_curve_handle_geom.glsl:43:27: Error: could not implicitly convert operands to relational operator
      | overlay_edit_curve_handle_geom.glsl:43:27: Error: RHS of `&&' must be scalar boolean
      | 
 1357 |   if (color_id == 0) {
      |       ^
      | overlay_edit_curve_handle_geom.glsl:52:7: Error: operands of `==' must have the same type
      | 
 1360 |   else if (color_id == 1) {
      |            ^
      | overlay_edit_curve_handle_geom.glsl:55:12: Error: operands of `==' must have the same type
      | 
 1363 |   else if (color_id == 2) {
      |            ^
      | overlay_edit_curve_handle_geom.glsl:58:12: Error: operands of `==' must have the same type
      | 
 1366 |   else if (color_id == 3) {
      |            ^
      | overlay_edit_curve_handle_geom.glsl:61:12: Error: operands of `==' must have the same type
      | 
 1369 |   else if (color_id == 4) {
      |            ^
      | overlay_edit_curve_handle_geom.glsl:64:12: Error: operands of `==' must have the same type
      | 
 1373 |     bool is_selected = (((vert[1].flag & vert[0].flag) & VERT_SELECTED) != 0);
      |                       ^
      | overlay_edit_curve_handle_geom.glsl:68:23: Error: operands of `!=' must have the same type
      | 
 1374 |     bool is_u_segment = (((vert[1].flag ^ vert[0].flag) & EVEN_U_BIT) != 0);
      |                        ^
      | overlay_edit_curve_handle_geom.glsl:69:24: Error: operands of `!=' must have the same type
      | 
 1383 |   vec4 outer_color = (is_active_nurb != 0) ?
      |                       ^
      | overlay_edit_curve_handle_geom.glsl:78:23: Error: operands of `!=' must have the same type

Writing: /tmp/msg_mesh.crash.txt
user error (Error in function getWindowAttributes)
user error (Error in function getWindowAttributes)
user error (Error in function getWindowAttributes)
user error (Error in function getWindowAttributes)
Segmentation fault (core dumped)
Read prefs: /home/mirko/.config/blender/3.5/config/userpref.blend
user error (Error in function getWindowAttributes)

**System Information** Operating system: Linux-5.19.0-38-generic-x86_64-with-glibc2.35 64 Bits Graphics card: Mesa Intel(R) HD Graphics 3000 (SNB GT2) Intel 3.3 (Core Profile) Mesa 22.2.5 **Blender Version** Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash: `1be25cfff18b` Worked: (newest version of Blender that worked as expected) **Short description of error** Hello ! I use Ubuntu 22.04.2 LTS and Blender 3.5.0. I run xmonad through startx. Previously I used Blender 3.4, and all fine. With 3.5.0, each time I enter Edit Mode to edit a curve (every kind of curve), Blender chrashes. **Exact steps for others to reproduce the error** I open blender. I add object curve, every kind, as for example nurbs, path.. I enter Edit Mode with the curve selected. Blender chrashes, and on the terminal I read: ``` ERROR (gpu.shader): overlay_edit_curve_handle GeomShader: | 1334 | if (!showCurveHandles && (color_id < 5)) { | ^ | overlay_edit_curve_handle_geom.glsl:29:29: Error: could not implicitly convert operands to relational operator | overlay_edit_curve_handle_geom.glsl:29:29: Error: RHS of `&&' must be scalar boolean | 1345 | if ((curveHandleDisplay != CURVE_HANDLE_ALL) && (!handle_selected)) { | ^ | overlay_edit_curve_handle_geom.glsl:40:8: Error: operands of `!=' must have the same type | 1348 | if ((!is_u_segment) && (color_id <= 4)) { | ^ | overlay_edit_curve_handle_geom.glsl:43:27: Error: could not implicitly convert operands to relational operator | overlay_edit_curve_handle_geom.glsl:43:27: Error: RHS of `&&' must be scalar boolean | 1357 | if (color_id == 0) { | ^ | overlay_edit_curve_handle_geom.glsl:52:7: Error: operands of `==' must have the same type | 1360 | else if (color_id == 1) { | ^ | overlay_edit_curve_handle_geom.glsl:55:12: Error: operands of `==' must have the same type | 1363 | else if (color_id == 2) { | ^ | overlay_edit_curve_handle_geom.glsl:58:12: Error: operands of `==' must have the same type | 1366 | else if (color_id == 3) { | ^ | overlay_edit_curve_handle_geom.glsl:61:12: Error: operands of `==' must have the same type | 1369 | else if (color_id == 4) { | ^ | overlay_edit_curve_handle_geom.glsl:64:12: Error: operands of `==' must have the same type | 1373 | bool is_selected = (((vert[1].flag & vert[0].flag) & VERT_SELECTED) != 0); | ^ | overlay_edit_curve_handle_geom.glsl:68:23: Error: operands of `!=' must have the same type | 1374 | bool is_u_segment = (((vert[1].flag ^ vert[0].flag) & EVEN_U_BIT) != 0); | ^ | overlay_edit_curve_handle_geom.glsl:69:24: Error: operands of `!=' must have the same type | 1383 | vec4 outer_color = (is_active_nurb != 0) ? | ^ | overlay_edit_curve_handle_geom.glsl:78:23: Error: operands of `!=' must have the same type Writing: /tmp/msg_mesh.crash.txt user error (Error in function getWindowAttributes) user error (Error in function getWindowAttributes) user error (Error in function getWindowAttributes) user error (Error in function getWindowAttributes) Segmentation fault (core dumped) Read prefs: /home/mirko/.config/blender/3.5/config/userpref.blend user error (Error in function getWindowAttributes) ```
MIrko-Paganoni added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-04-01 15:49:07 +02:00
Member

Can you run glxinfo | grep OpenGL and attach the output of it?

It seems that from your graphics report, your hardware/mesa layer only supports OpenGL 3.3 and starting from Blender 3.5 it requires at least OpenGL 4.3. This might explain why there are shader errors, this could result in invalid shaders and lead to crash.

Can you run `glxinfo | grep OpenGL` and attach the output of it? It seems that from your graphics report, your hardware/mesa layer only supports OpenGL 3.3 and starting from Blender 3.5 it requires at least OpenGL 4.3. This might explain why there are shader errors, this could result in invalid shaders and lead to crash.
YimingWu added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-04-02 07:54:55 +02:00
Author

The following is the output of 'sudo glxinfo | grep OpenGL'.
If the problem is related to OpenGL version, than I can update my OpenGL or use an oldest version of Blender.

mirko@mirko-HP-Pavilion-dv6-Notebook-PC:~$ sudo glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 3000 (SNB GT2)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.2.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.2.5
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 22.2.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
mirko@mirko-HP-Pavilion-dv6-Notebook-PC:~$

The following is the output of 'sudo glxinfo | grep OpenGL'. If the problem is related to OpenGL version, than I can update my OpenGL or use an oldest version of Blender. mirko@mirko-HP-Pavilion-dv6-Notebook-PC:~$ sudo glxinfo | grep OpenGL OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) HD Graphics 3000 (SNB GT2) OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.2.5 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.2.5 OpenGL shading language version string: 3.30 OpenGL context flags: (none) OpenGL profile mask: compatibility profile OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.0 Mesa 22.2.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00 OpenGL ES profile extensions: mirko@mirko-HP-Pavilion-dv6-Notebook-PC:~$
Member

Yepp, seems like you are running it on an old graphics hardware that doesn't support OpenGL 4.3 (Your report shows only 3.3).

Poke @fclem ... I'm not sure if it's possible or worth the effort to have these more "basic" shaders compile on older hardware like this one, I'm guessing likely not because it would involve the how the back-end is set up...

Yepp, seems like you are running it on an old graphics hardware that doesn't support OpenGL 4.3 (Your report shows only 3.3). Poke @fclem ... I'm not sure if it's possible or worth the effort to have these more "basic" shaders compile on older hardware like this one, I'm guessing likely not because it would involve the how the back-end is set up...

@ChengduLittleA This error Error: operands of ==' must have the same type` is just an implementation dependent behavior. It isn't clearly stated in the standard. It is clearly stated in the GLSL codestyle that implicit integer type conversion is not to be relied upon. So it is a valid bug with simple fix.

Note that we still only require Opengl 3.3 until Blender 4.0.

@ChengduLittleA This error `Error: operands of `==' must have the same type` is just an implementation dependent behavior. It isn't clearly stated in the standard. It is clearly stated in the [GLSL codestyle](https://wiki.blender.org/wiki/Style_Guide/GLSL#Driver_Differences) that implicit integer type conversion is not to be relied upon. So it is a valid bug with simple fix. Note that we still only require Opengl 3.3 until Blender 4.0.
Clément Foucault added
Status
Confirmed
and removed
Status
Needs Information from User
labels 2023-04-03 10:06:43 +02:00
Clément Foucault added
Priority
High
and removed
Priority
Normal
labels 2023-04-03 10:07:47 +02:00
Member

@fclem : when confirming, please make sure we also have the appropriate Module label set.

@fclem : when confirming, please make sure we also have the appropriate Module label set.
Philipp Oeser added the
Module
EEVEE & Viewport
label 2023-04-03 10:28:03 +02:00
Philipp Oeser changed title from Blender 3.5.0 crashes when going to Edit Mode with a Curve selected to Regression: Blender 3.5.0 crashes when going to Edit Mode with a Curve selected 2023-04-03 10:28:15 +02:00
Jeroen Bakker added this to the 3.5 milestone 2023-04-11 09:24:21 +02:00
Jeroen Bakker added this to the EEVEE & Viewport project 2023-04-11 09:24:25 +02:00
Jeroen Bakker self-assigned this 2023-04-11 09:24:35 +02:00
Member

Although this is a crash and @fclem mentions that this needs to be fixed it seems to only occur on platforms that we don't support. For this I am lowering the priority.

Although all compares should be done by casting to the same type it can make the code look very weird:

Current GLSL

if (!showCurveHandles && (color_id < 5)) {

Incorrect conversion is between color_id/uint and 5/int. But the error message complains about bool && ... to be of incorrect type. Possible the fix would be:

if (!showCurveHandles && (color_id < 5u)) {

But we are not able to validate that this fixes the issue on those legacy drivers as we don't have access to them.

For now lowering the prio.

Although this is a crash and @fclem mentions that this needs to be fixed it seems to only occur on platforms that we don't support. For this I am lowering the priority. Although all compares should be done by casting to the same type it can make the code look very weird: Current GLSL ``` if (!showCurveHandles && (color_id < 5)) { ``` Incorrect conversion is between `color_id/uint` and `5/int`. But the error message complains about `bool && ...` to be of incorrect type. Possible the fix would be: ``` if (!showCurveHandles && (color_id < 5u)) { ``` But we are not able to validate that this fixes the issue on those legacy drivers as we don't have access to them. For now lowering the prio.
Jeroen Bakker added
Priority
Normal
and removed
Priority
High
labels 2023-04-11 10:00:47 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-04-11 13:46:50 +02:00
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 Assignees
5 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#106432
No description provided.