Crash on blend file load on Windows #105552

Closed
opened 2023-03-07 22:38:28 +01:00 by Janos Bonic · 9 comments

System Information
Operating system: Windows 10 and 11
Graphics card: NVIDIA 2060S

Blender Version
Broken: 3.4.1 on Windows
Worked: 3.4.1 on Linux

Short description of error

Loading a specific blend file crashes Blender instantly on load.

Exact steps for others to reproduce the error

Load the attached Blend file on Windows. Blender crashes immediately, leaving the attached crash log behind.

**System Information** Operating system: Windows 10 and 11 Graphics card: NVIDIA 2060S **Blender Version** Broken: 3.4.1 on Windows Worked: 3.4.1 on Linux **Short description of error** Loading a specific blend file crashes Blender instantly on load. **Exact steps for others to reproduce the error** Load the attached Blend file on Windows. Blender crashes immediately, leaving the attached crash log behind.
Janos Bonic added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2023-03-07 22:38:28 +01:00
Janos Bonic changed title from Crash on blend file load Windows to Crash on blend file load on Windows 2023-03-07 22:47:14 +01:00
Member

It dies on me too. My call stack looks like this:

blender.exe!blender::Array<int,32,blender::GuardedAllocator>::operator[](__int64 index) Line 198
blender.exe!mesh_render_data_polys_sorted_build(MeshRenderData * mr, MeshBufferCache * cache) Line 242
blender.exe!mesh_render_data_polys_sorted_ensure(MeshRenderData * mr, MeshBufferCache * cache) Line 202
blender.exe!mesh_render_data_update_polys_sorted(MeshRenderData * mr, MeshBufferCache * cache, eMRDataType data_flag) Line 185
blender.exe!blender::draw::mesh_extract_render_data_node_exec(void * task_data) Line 527
blender.exe!TaskNode::run_serial() Line 88
blender.exe!BLI_task_graph_node_push_work(TaskNode * task_node) Line 136
blender.exe!blender::draw::mesh_buffer_cache_create_requested(TaskGraph * task_graph, MeshBatchCache * cache, MeshBufferCache * mbc, Object * object, Mesh * me, bool is_editmode, bool is_paint_mode, bool is_mode_active, const float[4] * obmat, bool do_final, bool do_uvedit, const Scene * scene, const ToolSettings * ts, bool use_hide) Line 741
blender.exe!DRW_mesh_batch_cache_create_requested(TaskGraph * task_graph, Object * ob, Mesh * me, const Scene * scene, bool is_paint_mode, bool use_hide) Line 1949
blender.exe!drw_batch_cache_generate_requested(Object * ob) Line 3324
blender.exe!drw_engines_cache_populate(Object * ob) Line 1089
blender.exe!DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * region, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1733
blender.exe!DRW_draw_view(const bContext * C) Line 1637
blender.exe!view3d_draw_view(const bContext * C, ARegion * region) Line 1553
blender.exe!view3d_main_region_draw(const bContext * C, ARegion * region) Line 1588
blender.exe!ED_region_do_draw(bContext * C, ARegion * region) Line 541
blender.exe!wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 961
blender.exe!wm_draw_window(bContext * C, wmWindow * win) Line 1128
blender.exe!wm_draw_update(bContext * C) Line 1386
blender.exe!WM_main(bContext * C) Line 648
blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 588

The object that causes this is called "Server Rack" and it contains one mesh called "Cube.014". It dies in mesh_render_data_polys_sorted_build. It arrives with a MeshRenderData containing:

  • extract_type: MR_EXTRACT_BMESH
  • poly_len: 65616
  • edge_len: 130784
  • vert_len: 65896
  • loop_len: 262080
  • edge_loose_len: 0
  • vert_loose_len: 0
  • tri_len: 130848
  • mat_len: 10
  • ...

It makes it to the "Sort per material" section then dies on line 226 BM_ITER_MESH_INDEX (f, &iter, mr->bm, BM_FACES_OF_MESH, i) {

It dies in T &operator[](int64_t index) because the value of index is -15672, but expected to be 0 or greater.

Can't see much more. I don't seem to have any other files that get here with mr->extract_type == MR_EXTRACT_BMESH so hard to tell what is wrong. And hard to debug inside this BM_ITER_MESH_INDEX macro.

It dies on me too. My call stack looks like this: ``` blender.exe!blender::Array<int,32,blender::GuardedAllocator>::operator[](__int64 index) Line 198 blender.exe!mesh_render_data_polys_sorted_build(MeshRenderData * mr, MeshBufferCache * cache) Line 242 blender.exe!mesh_render_data_polys_sorted_ensure(MeshRenderData * mr, MeshBufferCache * cache) Line 202 blender.exe!mesh_render_data_update_polys_sorted(MeshRenderData * mr, MeshBufferCache * cache, eMRDataType data_flag) Line 185 blender.exe!blender::draw::mesh_extract_render_data_node_exec(void * task_data) Line 527 blender.exe!TaskNode::run_serial() Line 88 blender.exe!BLI_task_graph_node_push_work(TaskNode * task_node) Line 136 blender.exe!blender::draw::mesh_buffer_cache_create_requested(TaskGraph * task_graph, MeshBatchCache * cache, MeshBufferCache * mbc, Object * object, Mesh * me, bool is_editmode, bool is_paint_mode, bool is_mode_active, const float[4] * obmat, bool do_final, bool do_uvedit, const Scene * scene, const ToolSettings * ts, bool use_hide) Line 741 blender.exe!DRW_mesh_batch_cache_create_requested(TaskGraph * task_graph, Object * ob, Mesh * me, const Scene * scene, bool is_paint_mode, bool use_hide) Line 1949 blender.exe!drw_batch_cache_generate_requested(Object * ob) Line 3324 blender.exe!drw_engines_cache_populate(Object * ob) Line 1089 blender.exe!DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * region, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1733 blender.exe!DRW_draw_view(const bContext * C) Line 1637 blender.exe!view3d_draw_view(const bContext * C, ARegion * region) Line 1553 blender.exe!view3d_main_region_draw(const bContext * C, ARegion * region) Line 1588 blender.exe!ED_region_do_draw(bContext * C, ARegion * region) Line 541 blender.exe!wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 961 blender.exe!wm_draw_window(bContext * C, wmWindow * win) Line 1128 blender.exe!wm_draw_update(bContext * C) Line 1386 blender.exe!WM_main(bContext * C) Line 648 blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 588 ``` The object that causes this is called "Server Rack" and it contains one mesh called "Cube.014". It dies in `mesh_render_data_polys_sorted_build`. It arrives with a MeshRenderData containing: * extract_type: MR_EXTRACT_BMESH * poly_len: 65616 * edge_len: 130784 * vert_len: 65896 * loop_len: 262080 * edge_loose_len: 0 * vert_loose_len: 0 * tri_len: 130848 * mat_len: 10 * ... It makes it to the "Sort per material" section then dies on line 226 `BM_ITER_MESH_INDEX (f, &iter, mr->bm, BM_FACES_OF_MESH, i) {` It dies in `T &operator[](int64_t index)` because the value of index is `-15672`, but expected to be 0 or greater. Can't see much more. I don't seem to have any other files that get here with `mr->extract_type == MR_EXTRACT_BMESH` so hard to tell what is wrong. And hard to debug inside this `BM_ITER_MESH_INDEX` macro.

@Harley Hey, try to bisect this, most likely something from Hans's refactorings on the structure of the mesh

@Harley Hey, try to bisect this, most likely something from Hans's refactorings on the structure of the mesh
Member

Hi, can confirm the crash. Mesh.validate has detected the invalid data: https://docs.blender.org/api/current/bpy.types.Mesh.html#bpy.types.Mesh.validate
Did you import this file from other software? or Is this file originally created in old blender versions?

ERROR (bke.mesh): C:\Users\blender\git\blender-vdev\blender.git\source\blender\blenkernel\intern\mesh_validate.cc:574 BKE_mesh_validate_arrays:         Poly 23 has invalid material (-15672)
Hi, can confirm the crash. `Mesh.validate` has detected the invalid data: https://docs.blender.org/api/current/bpy.types.Mesh.html#bpy.types.Mesh.validate Did you import this file from other software? or Is this file originally created in old blender versions? ``` ERROR (bke.mesh): C:\Users\blender\git\blender-vdev\blender.git\source\blender\blenkernel\intern\mesh_validate.cc:574 BKE_mesh_validate_arrays: Poly 23 has invalid material (-15672) ```
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-03-08 12:40:30 +01:00
Author

This mesh was created in the current version of Blender. I started it about ~2 weeks ago.

This mesh was created in the current version of Blender. I started it about ~2 weeks ago.
Member

@janosdebugs , can you verify whether uploaded file is not crashing?
@mod_moder , I don't think bisect is needed. Crash even happens in 2.93 :)

@janosdebugs , can you verify whether uploaded file is not crashing? @mod_moder , I don't think bisect is needed. Crash even happens in 2.93 :)
Member

This mesh was created in the current version of Blender. I started it about ~2 weeks ago.

@janosdebugs , can you share exact steps to reproduce the file from scratch?

> This mesh was created in the current version of Blender. I started it about ~2 weeks ago. @janosdebugs , can you share exact steps to reproduce the file from scratch?
Author

@PratikPB2123 tested, it doesn't crash.

@PratikPB2123 tested, it doesn't crash.
Author

@janosdebugs , can you share exact steps to reproduce the file from scratch?

Sadly, I can't. It's been a fairly long process. I removed a bunch of stuff on Linux to isolate the issue to the server rack. I remember starting from a cube, then go the usual way to loop cut, subdivide, and building faces manually. What I also did was join meshes into the same object. Possibly unrelated, but other meshes have lots of materials on them (~30-40).

> @janosdebugs , can you share exact steps to reproduce the file from scratch? Sadly, I can't. It's been a fairly long process. I removed a bunch of stuff on Linux to isolate the issue to the server rack. I remember starting from a cube, then go the usual way to loop cut, subdivide, and building faces manually. What I also did was join meshes into the same object. Possibly unrelated, but other meshes have lots of materials on them (~30-40).
Member

Unfortunately unless there are clear instructions on how to reproduce it from scratch we cannot debug this any further.
Sorry but I have to close this report as per the triaging policy. Feel free to comment or reopen the report if you have additional and relevant information to share.
Thanks for reporting.

Unfortunately unless there are clear instructions on how to reproduce it from scratch we cannot debug this any further. Sorry but I have to close this report as per the triaging policy. Feel free to comment or reopen the report if you have additional and relevant information to share. Thanks for reporting.
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2023-03-08 13:38:57 +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
4 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#105552
No description provided.