Bake from multires crash two ways: Viewport subdiv issue AND uvmap issue #115995

Closed
opened 2023-12-10 03:31:38 +01:00 by Ben Jackson · 4 comments

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.17

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-12-03 10:11, hash: b1ac047af478
Also 3.6, 4.0.1, 4.1, 4.1 nightly from 12/2
Worked: If it ever worked < 3.6

Short description of error
The attached file will crash when baking normals from multires in two different ways:

  1. With viewport subdiv set to 0 in the multires, it crashes in init_ccgdm_arrays because the DerivedMesh does not have getGridSize (it is the style created by cdDM_create). This may be related to this blend file not showing viewport subdivision (it works in sculpt mode, but even simple cubes won't show subdiv in viewport in that file, and I don't know why).
  2. With viewport subdiv set to 1 in the multires, it crashes in CustomData_get_active_layer_index when do_multires_bake is initializing uv_map

Respective stacks:

[Inline Frame] blender.exe!init_ccgdm_arrays(DerivedMesh * dm) Line 463	C++
blender.exe!do_multires_bake(MultiresBakeRender * bkr, Image * ima, ImageTile * tile, ImBuf * ibuf, bool require_tangent, void(*)(blender::Span<blender::VecBase<float,3>>, blender::Span<blender::VecBase<float,3>>, blender::offset_indices::OffsetIndices<int>, blender::Span<int>, blender::Span<MLoopTri>, blender::Span<int>, blender::Span<blender::VecBase<float,2>>, DerivedMesh *, void *, void *, ImBuf *, const int, const int, const float *, float[3] *, const int, const int) passKnownData, void *(*)(MultiresBakeRender *, ImBuf *) initBakeData, void(*)(void *) freeBakeData, MultiresBakeResult * result) Line 560	C++
[Inline Frame] blender.exe!bake_images(MultiresBakeRender *) Line 1533	C++
blender.exe!RE_multires_bake_images(MultiresBakeRender * bkr) Line 1610	C++
blender.exe!multiresbake_startjob(void * bkv, wmJobWorkerStatus * worker_status) Line 523	C++
blender.exe!do_job_thread(void * job_v) Line 401	C++
[External Code]	
[Inline Frame] blender.exe!CustomData_get_active_layer_index(const CustomData *) Line 2646	C++
blender.exe!CustomData_get_layer_for_write(CustomData * data, eCustomDataType type, int totelem) Line 3535	C++
blender.exe!do_multires_bake(MultiresBakeRender * bkr, Image * ima, ImageTile * tile, ImBuf * ibuf, bool require_tangent, void(*)(blender::Span<blender::VecBase<float,3>>, blender::Span<blender::VecBase<float,3>>, blender::offset_indices::OffsetIndices<int>, blender::Span<int>, blender::Span<MLoopTri>, blender::Span<int>, blender::Span<blender::VecBase<float,2>>, DerivedMesh *, void *, void *, ImBuf *, const int, const int, const float *, float[3] *, const int, const int) passKnownData, void *(*)(MultiresBakeRender *, ImBuf *) initBakeData, void(*)(void *) freeBakeData, MultiresBakeResult * result) Line 491	C++
[Inline Frame] blender.exe!bake_images(MultiresBakeRender *) Line 1533	C++
blender.exe!RE_multires_bake_images(MultiresBakeRender * bkr) Line 1610	C++
blender.exe!multiresbake_startjob(void * bkv, wmJobWorkerStatus * worker_status) Line 523	C++
blender.exe!do_job_thread(void * job_v) Line 401	C++
[External Code]	

Exact steps for others to reproduce the error
With the attached file:

  1. Just click bake and you should get the first crash.
  2. Open the modifiers panel, increase viewport subdiv to 1, then click bake to get the second crash.

Unfortunately I can't figure out how to start with an empty file and reach the same point. The mesh in the file is a duplicate which has had many vertex groups and shapekeys deleted. It has also had other subparts of the original mesh removed.

(side note: I do have "viewport/gpu subdivision" turned off)

**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.17 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-12-03 10:11, hash: `b1ac047af478` Also 3.6, 4.0.1, 4.1, 4.1 nightly from 12/2 Worked: If it ever worked < 3.6 **Short description of error** The attached file will crash when baking normals from multires in two different ways: 1. With viewport subdiv set to 0 in the multires, it crashes in `init_ccgdm_arrays` because the `DerivedMesh` does not have `getGridSize` (it is the style created by `cdDM_create`). This may be related to this blend file not showing viewport subdivision (it works in sculpt mode, but even simple cubes won't show subdiv in viewport in that file, and I don't know why). 2. With viewport subdiv set to 1 in the multires, it crashes in `CustomData_get_active_layer_index` when `do_multires_bake` is initializing `uv_map` Respective stacks: ``` [Inline Frame] blender.exe!init_ccgdm_arrays(DerivedMesh * dm) Line 463 C++ blender.exe!do_multires_bake(MultiresBakeRender * bkr, Image * ima, ImageTile * tile, ImBuf * ibuf, bool require_tangent, void(*)(blender::Span<blender::VecBase<float,3>>, blender::Span<blender::VecBase<float,3>>, blender::offset_indices::OffsetIndices<int>, blender::Span<int>, blender::Span<MLoopTri>, blender::Span<int>, blender::Span<blender::VecBase<float,2>>, DerivedMesh *, void *, void *, ImBuf *, const int, const int, const float *, float[3] *, const int, const int) passKnownData, void *(*)(MultiresBakeRender *, ImBuf *) initBakeData, void(*)(void *) freeBakeData, MultiresBakeResult * result) Line 560 C++ [Inline Frame] blender.exe!bake_images(MultiresBakeRender *) Line 1533 C++ blender.exe!RE_multires_bake_images(MultiresBakeRender * bkr) Line 1610 C++ blender.exe!multiresbake_startjob(void * bkv, wmJobWorkerStatus * worker_status) Line 523 C++ blender.exe!do_job_thread(void * job_v) Line 401 C++ [External Code] ``` ``` [Inline Frame] blender.exe!CustomData_get_active_layer_index(const CustomData *) Line 2646 C++ blender.exe!CustomData_get_layer_for_write(CustomData * data, eCustomDataType type, int totelem) Line 3535 C++ blender.exe!do_multires_bake(MultiresBakeRender * bkr, Image * ima, ImageTile * tile, ImBuf * ibuf, bool require_tangent, void(*)(blender::Span<blender::VecBase<float,3>>, blender::Span<blender::VecBase<float,3>>, blender::offset_indices::OffsetIndices<int>, blender::Span<int>, blender::Span<MLoopTri>, blender::Span<int>, blender::Span<blender::VecBase<float,2>>, DerivedMesh *, void *, void *, ImBuf *, const int, const int, const float *, float[3] *, const int, const int) passKnownData, void *(*)(MultiresBakeRender *, ImBuf *) initBakeData, void(*)(void *) freeBakeData, MultiresBakeResult * result) Line 491 C++ [Inline Frame] blender.exe!bake_images(MultiresBakeRender *) Line 1533 C++ blender.exe!RE_multires_bake_images(MultiresBakeRender * bkr) Line 1610 C++ blender.exe!multiresbake_startjob(void * bkv, wmJobWorkerStatus * worker_status) Line 523 C++ blender.exe!do_job_thread(void * job_v) Line 401 C++ [External Code] ``` **Exact steps for others to reproduce the error** With the attached file: 1. Just click `bake` and you should get the first crash. 2. Open the modifiers panel, increase viewport subdiv to 1, then click `bake` to get the second crash. Unfortunately I can't figure out how to start with an empty file and reach the same point. The mesh in the file is a duplicate which has had many vertex groups and shapekeys deleted. It has also had other subparts of the original mesh removed. (side note: I do have "viewport/gpu subdivision" turned off)
Ben Jackson added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-12-10 03:31:38 +01:00
Author

I just used "append" to pull the mesh into a new blender file and baking works fine (or gives errors as appropriate) so there's definitely something cursed about the history of the object in the attached file.

I just used "append" to pull the mesh into a new blender file and baking works fine (or gives errors as appropriate) so there's definitely something cursed about the history of the object in the attached file.
Member

Hi, thanks for the report. I can confirm the crash. Seems to happen when viewport subdivision count under simplify tab is 0
Making it non zero would prevent the crash. Can you check?

Hi, thanks for the report. I can confirm the crash. Seems to happen when viewport subdivision count under [simplify tab is 0](/attachments/b7775f19-ab14-4ed9-998a-f56e5a7ffccc) Making it non zero would prevent the crash. Can you check?
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-12-12 12:29:27 +01:00
Author

Yes, it does work if I increase the viewport subdivision count. I thought I had checked that!

Thanks for the quick reply.

Yes, it does work if I increase the viewport subdivision count. I thought I had checked that! Thanks for the quick reply.
Member

Thanks. Note that similar crash has been reported before, see: #91171
So I'm closing this.

Thanks. Note that similar crash has been reported before, see: #91171 So I'm closing this.
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2023-12-13 12:54:40 +01:00
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
2 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#115995
No description provided.