Page MenuHome

Invisible loose edges on objects used in bone visualization
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 550 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 376.54

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-05 12:32, hash: rBa6cd77bad1c1
Worked: 02.06.2020 build hash: cecda64e2ead

Short description of error
In the latest versions, one of the bones in the attached file has disappeared.
This is because the object used to view it has become invisible.

File where the bug was identified:

Exact steps for others to reproduce the error
Open the bone_w_loose_edge_obj_bug.blend file in the latest master notice that FK_forearm.L is missing in pose mode and object mode.
Open the same file in the 02.06.2020 build and the bone should be there.

Simplified file revealing the bug:

Event Timeline

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Jun 8 2020, 7:28 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".

The bone is invisible because the object related to it is invisible. And it looks like a bug.
I will update the description.

Germano Cavalcante (mano-wii) renamed this task from Bone had disappeared in pose mode and object mode to Lose edges of objects used for bone visualization are sometimes invisible.Jun 8 2020, 7:34 PM
Germano Cavalcante (mano-wii) triaged this task as High priority.
Germano Cavalcante (mano-wii) updated the task description. (Show Details)

@Germano Cavalcante (mano-wii) Thanks for simplifying the file. Now with your posted file i can crash Blender if i click the TAB-key, about less then 4 times. It seems like you have exposed more problems

Issue introduced by {bf34b0c8f4b8c64bcc4ec0f3371d343e9c2fe029}

Germano Cavalcante (mano-wii) renamed this task from Lose edges of objects used for bone visualization are sometimes invisible to Invisible loose edges on objects used in bone visualization.Jun 9 2020, 2:06 PM

I have a possible area to look at. Overlay_armature calls drw_batch_cache_generate_requested directly. this creates a second instance of batch extraction tasks and it won't be completed as it used to be.

/* TODO(fclem) needs to be moved elsewhere. */
  drw_batch_cache_generate_requested(custom);

might get in our way and we should move it somewhere else. Removing these fixes the issue for small files. larger files crash as the batches aren't up to date.

diff --git a/source/blender/draw/engines/overlay/overlay_armature.c b/source/blender/draw/engines/overlay/overlay_armature.c
index 95fd918f8c1..9e52d8ece4e 100644
--- a/source/blender/draw/engines/overlay/overlay_armature.c
+++ b/source/blender/draw/engines/overlay/overlay_armature.c
@@ -567,7 +567,7 @@ static void drw_shgroup_bone_custom_solid(ArmatureDrawContext *ctx,
   }
 
   /* TODO(fclem) needs to be moved elsewhere. */
-  drw_batch_cache_generate_requested(custom);
+  // drw_batch_cache_generate_requested(custom);
 }
 
 static void drw_shgroup_bone_custom_wire(ArmatureDrawContext *ctx,
@@ -591,7 +591,7 @@ static void drw_shgroup_bone_custom_wire(ArmatureDrawContext *ctx,
   }
 
   /* TODO(fclem) needs to be moved elsewhere. */
-  drw_batch_cache_generate_requested(custom);
+  // drw_batch_cache_generate_requested(custom);
 }
 
 static void drw_shgroup_bone_custom_empty(ArmatureDrawContext *ctx,