Attempting to modify UVs with bpy results in crash with EXCEPTION_ACCESS_VIOLATION #112342
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112342
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?
System Information
Operating system: Windows 11
Graphics card: Intel Iris Xe Graphics
Blender Version
Broken: 3.5.1, 3.6.2, 4.0.0-alpha+main.fca8df9415b1-windows.amd64-release
Worked: 3.4.1
Short description of error
I wrote a basic plugin for Blender 3.4 to import a custom model format from a game I'm working on (specifically, I export the model data to a JSON file and then import that JSON using bpy). The script worked perfectly in 3.4, but when running in 3.6 (and tested on the latest 4.0 alpha as well), the script causes blender to crash. The specific error is:
blender.crash.txt is empty.
You can see my original script here. By commenting out stuff and trying to run it, I have narrowed down the cause to line 79:
I read that the MeshUVLoopLayer class was modified in Blender 3.5, so I tried upgrading this line to what looks like the new format:
However, the same crash persists.
I have verified that both
uvlayer.uv[loop_idx.vector
anduvcoords[vert_idx]
can be printed to the console without issue. I will also attach a sample model JSON file.Exact steps for others to reproduce the error
blender --background -noaudio -P ./sge_import.py ./OB0065O.sge.json blend
(substituting the correct paths to those files)Note: I'm running the script headless because it's faster, but the same crash occurs when you attempt to use it as an Import/Export add-on.
I think this might be duplicate of #107500 because the linked script creates the new
uvlayer
and the newcolor_layer
and then tries to use theuvlayer
variable that may no longer be valid because another layer (color_layer
) was added afterwards.For a potential workaround, I would suggest:
Re-ordering the creation of the layers so that
color_layer
is created first would probably also work, but I wouldn't recommend it since its relying on the internal ordering of the layers.It looks like it is a dupe of that bug because your solution fixed it! I'm going to close in favor of it. As long as this behavior is documented, I don't think it's a huge issue. Ideally, if you could add it to the 3.5 changenotes as well, that would have helped in discoverability.