Crash when baking normals from selected to active without cage #63302
Labels
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#63302
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Windows-10-10.0.16299 64 Bits
GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.67
Broken: version: 2.80 (sub 53), branch: blender2.7, commit date: 2019-04-04 19:22, hash:
b2e2db94bd
Worked in 2.79a
Open attached blend file. Press bake. Crash. Doesn't crash with other types of maps (diffuse, etc.). Doesn't crash in 2.79.
bake_normal_with_decimate_crash.blend
Added subscriber: @MarcinTwarowski
Added subscriber: @ZedDB
Backtrace:
The crash happens even when no decimator modifier is present.
The current error I get is:
SUMMARY: AddressSanitizer: heap-use-after-free //source/blender/blenkernel/intern/library.c:607 in BKE_id_copy_is_allowed
Full ASAN report: P1014
I just tested it with newest build and it sometimes works fine, sometimes bakes broken normalmap. But usually crashes. It's true, now it crashes without decimate too.
Added subscriber: @Michell
First of all, I thank you very much for your patience and attention
@dalai-1 Felinto (dfelinto)
hi, please i have a offtopic question
how can I download svn from 279//, my school project is in 2.79 and I can not find it, I need the code and not the compilation, since my project focused on this and I profi my laptop, I could not recover my information and it would be a lot of work to return to change everything and I do not have so much time, my graduation is very close and I want to deliver in time for a good grade
I would like to have time to change to 2.8 but it is impossible for me, it is my one year job and I can not do it in 2 months once more
Added subscriber: @mont29
@Michell Please use this bug tracker for reporting bugs. General discussion and inquiries like that shall go through devtalk or ML (bf-committers@blender.org).
And Blender source is on git, not svn, you can either access the 2.7x branch, or the 2.79b release tag.
This comment was removed by @dfelinto
Changed status from 'Open' to: 'Resolved'
Added subscribers: @Sergey, @dfelinto
So what is happening here is:
I'm not sure what is the best course of action here. For instance we could copy the cage eval (P1016) but I'm pretty sure this violates DEG design and it leads to asan crash on blender exit.
@Sergey thoughts?
crash when baking normals from selected to active when active object has decimate modifierto Crash when baking normals from selected to active without cageChanged status from 'Resolved' to: 'Open'
@dfelinto, quick though is to use
BKE_mesh_new_from_object()
directly.please give them an apology for my audacity, you are the ones who know more about this topic and if you guide me I know I can be a good blender contributor, I did not know how to approach this community I still do not know many things about the subject
Added subscriber: @dalai-1
@dfelinto, here is a patch which fixes heap-use-after-free caused by my recent changes in the object-to-mesh area: P1017.
Unfortunately, there is something else involved here: different parts of baking seems to use different objects or meshes, making the lo-poly mesh to contain modifiers in some cases but not contain them in others.
This doesn't seem to be caused by my changes and i can not really follow the code there. Removing the Decimate modifier from low-poly mesh solves the crash.
@Sergey: me_cage should have the same totloop and totpoly as me_low. We even check for that when users set the cage manually.
Easy to spot with this P1021 / P1022 (P1017 + P1021).
For some reason
me_cage
(inside the is_cage loop) does not compute the decimator modifier when we do BKE_mesh_new_from_object or BKE_object_to_mesh.2.79 compatible sample files
Simple object with decimator modifier:
bake-279-decimator.blend
Edge Split modifier test:
bake-279-edge-split.blend
HP: High poly Object
LP-control: Control object, no modifier.
LP-modifier: Edge-Split modifier, should bake same as LP-control.
LP-applied: Edge-Split modifier applied, should bake differently.
The latter is important to test if the cage mesh was properly generated without eventual edge split modifiers in the low poly object.
@dfelinto, from the comment of
BKE_mesh_new_from_object
: Create new mesh from the given object at its current state.Now, i see the code in baker is poking around modifying modifier settings and resetting evaluated state of the object. So the following code is lacking prior to
BKE_mesh_new_from_object ()
(note that my snipped from previous comment must be applied):You can additionally add a flag
is_changed
and only reset evaluation state and re-evaluated the object if you actually disabled EdgeSplit modifier.This issue was referenced by
50ccbe6bb2
Changed status from 'Open' to: 'Resolved'
All good now, thanks Sergey!