Texture paint after render whilst in texture paint mode causes crash - something in undo code seems to be the cause #54546
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#54546
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
Windows 10 - 5820K - GTX 970
Blender Version
Latest local build from master (8th April)
Short description of error
Attempting texture painting after a render (whilst in texture painting mode in viewport) causes an immediate crash.
Debugger drops me into the undo code.
Exact steps for others to reproduce the error
'Interestingly' if you
All is ok.
So it seems issue is caused by rendering whilst in texture paint mode.
paintCrash.blend
Added subscriber: @RevDr
Added subscribers: @ideasman42, @lichtwerk
I can confirm the crash in undo (in current master -- while 2.79b doesnt have the issue)
@ideasman42: this one is for you? (feel free to throw back at me for further investigation, but seems due to recent undo refactor?)
OK - have spent a little time looking at the code.
I know why the crash is happening and have a (probably incorrect!) solution.
Firstly the reason...
In undo_system.c: the function BKE_undosys_step_push_with_type is called with a NULL value for string.
The string is set higher up in the stack in paint_image_undo.c function ED_image_undo_push_end which makes the call BKE_undosys_step_push(ustack, NULL, NULL).
When BKE_undosys_step_push_with_type tries to do a BLI_strncpy (line 423) it crashes because the string it is copying is NULL.
In my local copy I changed line 422
to be
which seems to fix the crash.
However, I am not sure if
a. name should ever have been passed as NULL and what the implications of ignoring that are
b. if (us->name- [x] == '\0') is actually needed - does that stop changing of us->name if it is already set.
Anyway - hope that helps a little.
Closed as duplicate of #54584