Regression: Gpencil: crash on material color and other properties change #100850

Closed
opened 2022-09-06 09:43:43 +02:00 by Aleš Jelovčan · 9 comments

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce MX330/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.92

Blender Version
Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-09-06 06:31, hash: 3ebf6a7f38
Worked: some 10-20 commits back

Caused by cd49fee741

Short description of error
When changing any material property, blender crashes

Exact steps for others to reproduce the error

  • Open new file in 2d mode
  • Go to materials, change color on stroke or fill

Attaching log file
blender.crash.txt

**System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce MX330/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.92 **Blender Version** Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-09-06 06:31, hash: `3ebf6a7f38` Worked: some 10-20 commits back Caused by cd49fee741 **Short description of error** When changing any material property, blender crashes **Exact steps for others to reproduce the error** - Open new file in 2d mode - Go to materials, change color on stroke or fill Attaching log file [blender.crash.txt](https://archive.blender.org/developer/F13462440/blender.crash.txt)

Added subscriber: @frogstomp-4

Added subscriber: @frogstomp-4
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm, will check

Can confirm, will check
Member

Added subscriber: @mont29

Added subscriber: @mont29
Member

Seems to be caused by cd49fee741

bmain from EEVEE_shader_default_world_nodetree is NULL

4  _BLI_assert_abort                   BLI_assert.c        46   0x1c1d8834 
5  BKE_libblock_alloc                  lib_id.c            1106 0xa4854b   
6  ntreeAddTree_do                     node.cc             2575 0xd2b386   
7  ntreeAddTree                        node.cc             2597 0xd2b708   
8  EEVEE_shader_default_world_nodetree eevee_shaders.c     1305 0x4378477  
9  eevee_material_get_ex               eevee_shaders.c     1463 0x43797d0  
10 EEVEE_material_get                  eevee_shaders.c     1489 0x4379c1c  
11 EEVEE_lightprobes_cache_init        eevee_lightprobes.c 301  0x4311546  
12 EEVEE_render_cache_init             eevee_render.c      170  0x435dc0f  
13 eevee_render_to_image               eevee_engine.c      535  0x42edf2d  
14 DRW_render_to_image                 draw_manager.c      2010 0x428d0c7  
15 engine_render_view_layer            engine.cc           945  0xa6bd87c  
16 RE_engine_render                    engine.cc           1073 0xa6bfd99  
17 RE_PreviewRender                    pipeline.cc         2406 0xa6fc779  
18 shader_preview_render               render_preview.cc   1194 0xed2d8a7  
19 shader_preview_startjob             render_preview.cc   1234 0xed2e0b6  
20 icon_preview_startjob               render_preview.cc   1481 0xed30ff5  

@mont29 : shot in the dark, should it be the following?
P3173: T100850_snippet



diff --git a/source/blender/draw/engines/eevee/eevee_shaders.c b/source/blender/draw/engines/eevee/eevee_shaders.c
index 04d1168a30d..1537efddbd6 100644
--- a/source/blender/draw/engines/eevee/eevee_shaders.c
+++ b/source/blender/draw/engines/eevee/eevee_shaders.c
@@ -1302,7 +1302,8 @@ struct bNodeTree *EEVEE_shader_default_world_nodetree(World *wo)
 {
   /* WARNING: This function is not threadsafe. Which is not a problem for the moment. */
   if (!e_data.world.ntree) {
-    bNodeTree *ntree = ntreeAddTree(NULL, "Shader Nodetree", ntreeType_Shader->idname);
+    bNodeTree *ntree = ntreeAddTreeEmbedded(
+        NULL, &wo->id, "Shader Nodetree", ntreeType_Shader->idname);
     bNode *bg = nodeAddStaticNode(NULL, ntree, SH_NODE_BACKGROUND);
     bNode *output = nodeAddStaticNode(NULL, ntree, SH_NODE_OUTPUT_WORLD);
     bNodeSocket *bg_out = nodeFindSocket(bg, SOCK_OUT, "Background");
Seems to be caused by cd49fee741 `bmain` from `EEVEE_shader_default_world_nodetree` is NULL ``` 4 _BLI_assert_abort BLI_assert.c 46 0x1c1d8834 5 BKE_libblock_alloc lib_id.c 1106 0xa4854b 6 ntreeAddTree_do node.cc 2575 0xd2b386 7 ntreeAddTree node.cc 2597 0xd2b708 8 EEVEE_shader_default_world_nodetree eevee_shaders.c 1305 0x4378477 9 eevee_material_get_ex eevee_shaders.c 1463 0x43797d0 10 EEVEE_material_get eevee_shaders.c 1489 0x4379c1c 11 EEVEE_lightprobes_cache_init eevee_lightprobes.c 301 0x4311546 12 EEVEE_render_cache_init eevee_render.c 170 0x435dc0f 13 eevee_render_to_image eevee_engine.c 535 0x42edf2d 14 DRW_render_to_image draw_manager.c 2010 0x428d0c7 15 engine_render_view_layer engine.cc 945 0xa6bd87c 16 RE_engine_render engine.cc 1073 0xa6bfd99 17 RE_PreviewRender pipeline.cc 2406 0xa6fc779 18 shader_preview_render render_preview.cc 1194 0xed2d8a7 19 shader_preview_startjob render_preview.cc 1234 0xed2e0b6 20 icon_preview_startjob render_preview.cc 1481 0xed30ff5 ``` @mont29 : shot in the dark, should it be the following? [P3173: T100850_snippet](https://archive.blender.org/developer/P3173.txt) ``` diff --git a/source/blender/draw/engines/eevee/eevee_shaders.c b/source/blender/draw/engines/eevee/eevee_shaders.c index 04d1168a30d..1537efddbd6 100644 --- a/source/blender/draw/engines/eevee/eevee_shaders.c +++ b/source/blender/draw/engines/eevee/eevee_shaders.c @@ -1302,7 +1302,8 @@ struct bNodeTree *EEVEE_shader_default_world_nodetree(World *wo) { /* WARNING: This function is not threadsafe. Which is not a problem for the moment. */ if (!e_data.world.ntree) { - bNodeTree *ntree = ntreeAddTree(NULL, "Shader Nodetree", ntreeType_Shader->idname); + bNodeTree *ntree = ntreeAddTreeEmbedded( + NULL, &wo->id, "Shader Nodetree", ntreeType_Shader->idname); bNode *bg = nodeAddStaticNode(NULL, ntree, SH_NODE_BACKGROUND); bNode *output = nodeAddStaticNode(NULL, ntree, SH_NODE_OUTPUT_WORLD); bNodeSocket *bg_out = nodeFindSocket(bg, SOCK_OUT, "Background"); ```
Philipp Oeser changed title from Gpencil: crash on material color and other properties change to Regression: Gpencil: crash on material color and other properties change 2022-09-06 11:26:48 +02:00

think it should indeed, will check

think it should indeed, will check
Bastien Montagne self-assigned this 2022-09-06 12:47:11 +02:00

This issue was referenced by 6f80c60ce6

This issue was referenced by 6f80c60ce658b8877dce9af4544eee1578fac452

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