Crash entering edit mode with particle system #64101

Closed
opened 2019-05-03 12:24:14 +02:00 by Andrei Salamandic · 15 comments

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 399.07

Blender Version
Broken: version: 2.80 (sub 60), branch: blender2.7, commit date: 2019-05-02 17:03, hash: b331515d2e
Worked: (optional)

have a scene with a carpet (a plane with hair particle system). in rendered view (another window) entering in edit mode for that carpet blender crashes.

blender_system_info.txt

blender_debug_output.txt

**System Information** Operating system: Windows-7-6.1.7601-SP1 64 Bits Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 399.07 **Blender Version** Broken: version: 2.80 (sub 60), branch: blender2.7, commit date: 2019-05-02 17:03, hash: `b331515d2e` Worked: (optional) have a scene with a carpet (a plane with hair particle system). in rendered view (another window) entering in edit mode for that carpet blender crashes. [blender_system_info.txt](https://archive.blender.org/developer/F7003108/blender_system_info.txt) [blender_debug_output.txt](https://archive.blender.org/developer/F7003107/blender_debug_output.txt)

Added subscriber: @andreymd87

Added subscriber: @andreymd87

#65031 was marked as duplicate of this issue

#65031 was marked as duplicate of this issue
Andrei Salamandic changed title from blender crashes while entering in edit mode to blender crashes while entering in edit mode (Cycles) 2019-05-03 12:26:47 +02:00
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Cannot reproduce with the repo steps provided...

@andreymd87 : mind sharing your stripped down file?

Cannot reproduce with the repo steps provided... @andreymd87 : mind sharing your stripped down file?

carpet.blend

here is

[carpet.blend](https://archive.blender.org/developer/F7003210/carpet.blend) here is

Added subscriber: @WilliamReynish

Added subscriber: @WilliamReynish

can reproduce the crash here

can reproduce the crash here
Sergey Sharybin was assigned by Philipp Oeser 2019-05-03 13:39:57 +02:00
Member

Added subscribers: @Sergey, @brecht

Added subscribers: @Sergey, @brecht
Member

Can confirm now, too

rna_ParticleSystem_uv_on_emitter starts of checking if modifier->mesh_final has loopdata UVs, but mesh_final is already NULL in this case

1   customdata_typemap_is_valid       customdata.c        1842  0x1c02e95      
2   CustomData_get_layer_index        customdata.c        2062  0x1c0371d      
3   CustomData_has_layer              customdata.c        2506  0x1c0523c      
4   rna_ParticleSystem_uv_on_emitter  rna_particle.c      537   0x1f2cdae      
5   ParticleSystem_uv_on_emitter      rna_particle_gen.c  5165  0x1f39969      
6   BL::ParticleSystem::uv_on_emitter RNA_blender_cpp.h   50115 0x20812a3      
7   ccl::ObtainCacheParticleUV        blender_curves.cpp  254   0x2076940      
8   ccl::BlenderSync::sync_curves     blender_curves.cpp  1107  0x20805d7      
9   ccl::BlenderSync::sync_mesh       blender_mesh.cpp    1038  0x20a4043      
10  ccl::BlenderSync::sync_object     blender_object.cpp  393   0x205d76f      
11  ccl::BlenderSync::sync_objects    blender_object.cpp  543   0x205e60c      
12  ccl::BlenderSync::sync_data       blender_sync.cpp    213   0x20445c3      
13  ccl::BlenderSession::synchronize  blender_session.cpp 888   0x20351c7      
14  ccl::sync_func                    blender_python.cpp  399   0x202a425

@Sergey: mind checking? or is this for @brecht?

Can confirm now, too `rna_ParticleSystem_uv_on_emitter` starts of checking if `modifier->mesh_final` has loopdata UVs, but `mesh_final` is already NULL in this case ``` 1 customdata_typemap_is_valid customdata.c 1842 0x1c02e95 2 CustomData_get_layer_index customdata.c 2062 0x1c0371d 3 CustomData_has_layer customdata.c 2506 0x1c0523c 4 rna_ParticleSystem_uv_on_emitter rna_particle.c 537 0x1f2cdae 5 ParticleSystem_uv_on_emitter rna_particle_gen.c 5165 0x1f39969 6 BL::ParticleSystem::uv_on_emitter RNA_blender_cpp.h 50115 0x20812a3 7 ccl::ObtainCacheParticleUV blender_curves.cpp 254 0x2076940 8 ccl::BlenderSync::sync_curves blender_curves.cpp 1107 0x20805d7 9 ccl::BlenderSync::sync_mesh blender_mesh.cpp 1038 0x20a4043 10 ccl::BlenderSync::sync_object blender_object.cpp 393 0x205d76f 11 ccl::BlenderSync::sync_objects blender_object.cpp 543 0x205e60c 12 ccl::BlenderSync::sync_data blender_sync.cpp 213 0x20445c3 13 ccl::BlenderSession::synchronize blender_session.cpp 888 0x20351c7 14 ccl::sync_func blender_python.cpp 399 0x202a425 ``` @Sergey: mind checking? or is this for @brecht?
Brecht Van Lommel changed title from blender crashes while entering in edit mode (Cycles) to Crash entering edit mode with particle system 2019-05-23 13:35:18 +02:00

Added subscriber: @oenvoyage

Added subscriber: @oenvoyage

@brecht, think easiest solution for now is to explicitly ignore curves when in edit mode. A bit of a shame since we made it to work for 2.70, but currently even strands are not rendered in edit mode.
More proper solution would be to make dependency graph to load edit mesh and put object outside of edit mode for render engines.

For now i propose this: P979: Fix for #64101

diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index 1a36376f36e..29a1408d85d 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -978,7 +978,7 @@ void BlenderSync::sync_curves(
   /* obtain general settings */
   const bool use_curves = scene->curve_system_manager->use_curves;
 
-  if (!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT)) {
+  if (!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT && b_ob.mode() != b_ob.mode_EDIT)) {
     if (!motion)
       mesh->compute_bounds();
     return;
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 641bf4128d0..a3178e0407f 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -534,6 +534,11 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem,
                                              int uv_no,
                                              float r_uv[2])
 {
+  if (modifier->mesh_final == NULL) {
+    BKE_report(reports, RPT_ERROR, "Object was not yet evaluated");
+    zero_v2(r_uv);
+    return;
+  }
   if (!CustomData_has_layer(&modifier->mesh_final->ldata, CD_MLOOPUV)) {
     BKE_report(reports, RPT_ERROR, "Mesh has no UV data");
     zero_v2(r_uv);

@brecht, think easiest solution for now is to explicitly ignore curves when in edit mode. A bit of a shame since we made it to work for 2.70, but currently even strands are not rendered in edit mode. More proper solution would be to make dependency graph to load edit mesh and put object outside of edit mode for render engines. For now i propose this: [P979: Fix for #64101](https://archive.blender.org/developer/P979.txt) ``` diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index 1a36376f36e..29a1408d85d 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -978,7 +978,7 @@ void BlenderSync::sync_curves( /* obtain general settings */ const bool use_curves = scene->curve_system_manager->use_curves; - if (!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT)) { + if (!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT && b_ob.mode() != b_ob.mode_EDIT)) { if (!motion) mesh->compute_bounds(); return; diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 641bf4128d0..a3178e0407f 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -534,6 +534,11 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, int uv_no, float r_uv[2]) { + if (modifier->mesh_final == NULL) { + BKE_report(reports, RPT_ERROR, "Object was not yet evaluated"); + zero_v2(r_uv); + return; + } if (!CustomData_has_layer(&modifier->mesh_final->ldata, CD_MLOOPUV)) { BKE_report(reports, RPT_ERROR, "Mesh has no UV data"); zero_v2(r_uv); ```

Ok, I think that's fine.

Ok, I think that's fine.

This issue was referenced by blender/cycles@192e639a9f

This issue was referenced by blender/cycles@192e639a9f35df33ad4d6fbf1c3830ce407cad35

This issue was referenced by 05a9788b25

This issue was referenced by 05a9788b254d4e168f7a46d406aadf34b449d465

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