Cycles Bake break when building a special mesh #45729

Closed
opened 2015-08-07 21:49:01 +02:00 by Dalai Felinto · 9 comments

Blender Version
Broken: 2.75
Worked: 2.74

Short description of error
I'm importing the mesh from SketchUp (using BlendUp plugin), so maybe the problem is in the mesh. But as soon as I bake I get a segfault.

Exact steps for others to reproduce the error

bake-bug.blend

Open the attached file with:

./blender -y -b bake-bug.blend
(the file is a simple mesh, and a simple script to call bake when you open the file, to simplify debugging)

ASAN gets the following crash:

==3206== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60180008243b at pc 0x34fe9c5 bp 0x7fffffffc160 sp 0x7fffffffc158
WRITE of size 1 at 0x60180008243b thread T0
    - 0 0x34fe9c4 in CustomData_copy_data_layer /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:2173
    - 1 0x34fee3a in CustomData_copy_data /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:2216
    - 2 0x36c4cda in BKE_mesh_split_faces /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/mesh.c:2294
    - 3 0x246cea9 in bake /home/dfelinto/blender/git/blender/source/blender/editors/object/object_bake_api.c:691
    #4 0x2470c68 in bake_exec /home/dfelinto/blender/git/blender/source/blender/editors/object/object_bake_api.c:1118  

0x60180008243b is located 3 bytes to the right of 120-byte region [0x6018000823c0,0x601800082438)
allocated by thread T0 here:
    - 0 0x7ffff4e6041a in malloc ??:?
    - 1 0x4493a07 in MEM_lockfree_mallocN /home/dfelinto/blender/git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:307
    - 2 0x34fc52c in customData_add_layer__internal /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:1832
    - 3 0x34f975e in CustomData_merge /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:1488
    - 4 0x34f9a8b in CustomData_copy /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:1515
    - 5 0x33c4045 in DM_to_mesh /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/DerivedMesh.c:715
    - 6 0x36c5b6f in BKE_mesh_new_from_object /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/mesh.c:2452
    - 7 0x246ce93 in bake /home/dfelinto/blender/git/blender/source/blender/editors/object/object_bake_api.c:690
    #8 0x2470c68 in bake_exec /home/dfelinto/blender/git/blender/source/blender/editors/object/object_bake_api.c:1118 (discriminator 2)

Which leads to the lines:

690 . me_low = BKE_mesh_new_from_object(bmain, scene, ob_low, 1, 2, 0, 0);
691 . BKE_mesh_split_faces(me_low);

I will wait for the other cycles bug to be fixed without investigating this one further.

**Blender Version** Broken: 2.75 Worked: 2.74 **Short description of error** I'm importing the mesh from SketchUp (using BlendUp plugin), so maybe the problem is in the mesh. But as soon as I bake I get a segfault. **Exact steps for others to reproduce the error** [bake-bug.blend](https://archive.blender.org/developer/F221462/bake-bug.blend) Open the attached file with: `./blender -y -b bake-bug.blend` (the file is a simple mesh, and a simple script to call bake when you open the file, to simplify debugging) ASAN gets the following crash: ``` ==3206== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60180008243b at pc 0x34fe9c5 bp 0x7fffffffc160 sp 0x7fffffffc158 WRITE of size 1 at 0x60180008243b thread T0 - 0 0x34fe9c4 in CustomData_copy_data_layer /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:2173 - 1 0x34fee3a in CustomData_copy_data /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:2216 - 2 0x36c4cda in BKE_mesh_split_faces /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/mesh.c:2294 - 3 0x246cea9 in bake /home/dfelinto/blender/git/blender/source/blender/editors/object/object_bake_api.c:691 #4 0x2470c68 in bake_exec /home/dfelinto/blender/git/blender/source/blender/editors/object/object_bake_api.c:1118 0x60180008243b is located 3 bytes to the right of 120-byte region [0x6018000823c0,0x601800082438) allocated by thread T0 here: - 0 0x7ffff4e6041a in malloc ??:? - 1 0x4493a07 in MEM_lockfree_mallocN /home/dfelinto/blender/git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:307 - 2 0x34fc52c in customData_add_layer__internal /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:1832 - 3 0x34f975e in CustomData_merge /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:1488 - 4 0x34f9a8b in CustomData_copy /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/customdata.c:1515 - 5 0x33c4045 in DM_to_mesh /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/DerivedMesh.c:715 - 6 0x36c5b6f in BKE_mesh_new_from_object /home/dfelinto/blender/git/blender/source/blender/blenkernel/intern/mesh.c:2452 - 7 0x246ce93 in bake /home/dfelinto/blender/git/blender/source/blender/editors/object/object_bake_api.c:690 #8 0x2470c68 in bake_exec /home/dfelinto/blender/git/blender/source/blender/editors/object/object_bake_api.c:1118 (discriminator 2) ``` Which leads to the lines: 690 . me_low = BKE_mesh_new_from_object(bmain, scene, ob_low, 1, 2, 0, 0); 691 . BKE_mesh_split_faces(me_low); I will wait for the other cycles bug to be fixed without investigating this one further.
Author
Owner

Changed status to: 'Open'

Changed status to: 'Open'
Author
Owner

Added subscriber: @dfelinto

Added subscriber: @dfelinto
Author
Owner

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Author
Owner

I just confirmed and the bug was introduced on 1cd4070e (Fix: Cycles bake disregards Auto Smooth (vertex per-face normals))

@ideasman42 any clues whether the issue is the file (corrupted mesh?) or your commit? Thanks :)

I just confirmed and the bug was introduced on 1cd4070e (Fix: Cycles bake disregards Auto Smooth (vertex per-face normals)) @ideasman42 any clues whether the issue is the file (corrupted mesh?) or your commit? Thanks :)
Sergey Sharybin was assigned by Dalai Felinto 2015-08-10 22:16:59 +02:00
Author
Owner

Added subscriber: @Sergey

Added subscriber: @Sergey
Author
Owner

This was actually @Sergey's patch (D1174).

This was actually @Sergey's patch ([D1174](https://archive.blender.org/developer/D1174)).
Author
Owner

Added subscriber: @Psy-Fi

Added subscriber: @Psy-Fi

This issue was referenced by c6d7562896

This issue was referenced by c6d75628968818aa38b881d0bcaca7c07fc6492a

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