GPv3: src_frame might point to invalid memory in insert_duplicate_frame() #114352
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#114352
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: 3080
Blender Version
Broken: (example: 2.80,
edbf15d3c0
, master, 2018-11-28, as found on the splash screen) 4.1.0.alphaWorked: (newest version of Blender that worked as expected) N/A
Short description of error
add_frame() might move the frames(), leaving src_frame pointing to invalid address. Blender will crash at the last line when that happens.
Exact steps for others to reproduce the error
GP_TOOL_FLAG_RETAIN_LAST
should be on in order to reproduce.I don't know how to change this settings so I changed this programmatically (purely for invoking this function).
Then keep inserting frames. When the keyframe number exceeds 8, this will happen.
Please see the videos as demonstration.
Thanks for the report, @Chao-Li
If I understand correctly, you are saying that there is a bug in the
insert_duplicate_frame()
function in Blender version 4.1.0 alpha.The issue occurs when the
add_frame()
function is called, which can potentially move the frames and leavesrc_frame
pointing to an invalid memory address. And this results in a crash when trying to accesssrc_frame
later on.We usually do not accept crash reports on custom builds. For these cases we suggest to use other channels: https://wiki.blender.org/wiki/Communication/Contact
But I'm giving a vote of confidence that this is indeed a bug (and not intended by the code).
Apparently the
insert_duplicate_frame()
code was implemented infd75695bed
@amelief, @filedescriptor, mind checking?
Chao Li referenced this issue2024-01-21 21:04:20 +01:00
Hi,
I'm sorry but I cannot reproduce the error.
I don't think it is possible for
src_frame
to be deleted by theadd_frame
function (only null frames are removed in this function, and they are not selectable, so they cannot be source frames). The position of the source frame in the frames vector might change, but it does not invalidate the data.Maybe I'm missing or misunderstanding something here, would you mind checking @filedescriptor ?
Note: to set
GP_TOOL_FLAG_RETAIN_LAST
from the UI, you need to go to drawing mode and check the snowflake icon in the top bar menu.