waveforms are reprocessed when undoing #55414

Closed
opened 2018-06-09 02:22:48 +02:00 by Richard Antalik · 8 comments

System Information
Illegal copy of win 8.1
nVidia GF GT 630

Blender Version
Broken: 2.79.4 c78804a17af (patched by D2424)
BUILD_DATE "Fri 06/08/2018"
BUILD_TIME "04:12 PM"

Short description of error
On each undo action, waveforms of each sound file are reprocessed

Exact steps for others to reproduce the error
Load sound strip into blender VSE
Check "Draw Waveform"
Do undoable action or two(so the "Draw Waveform" stay checked to avoid confusion)
Waveform will redraw

Note
I was digging into this and found that this behavior is caused by function BKE_sound_load() in file sound.c by calling BKE_sound_free_waveform(sound); on line 395
I couldn't find any reason why I would like to free memory at this point, so I bravely commented the line and I wasn't able to cause any weird behavior or crash blender(at least not because of this) and waveforms did not redraw on undo step.

**System Information** Illegal copy of win 8.1 nVidia GF GT 630 **Blender Version** Broken: 2.79.4 c78804a17af (patched by [D2424](https://archive.blender.org/developer/D2424)) BUILD_DATE "Fri 06/08/2018" BUILD_TIME "04:12 PM" **Short description of error** On each undo action, waveforms of each sound file are reprocessed **Exact steps for others to reproduce the error** Load sound strip into blender VSE Check "Draw Waveform" Do undoable action or two(so the "Draw Waveform" stay checked to avoid confusion) Waveform will redraw **Note** I was digging into this and found that this behavior is caused by function **BKE_sound_load()** in file **sound.c** by calling **BKE_sound_free_waveform(sound);** on line 395 I couldn't find any reason why I would like to free memory at this point, so I bravely commented the line and I wasn't able to cause any weird behavior or crash blender(at least not because of this) and waveforms did not redraw on undo step.
Author
Member

Added subscriber: @iss

Added subscriber: @iss
Member

Added subscribers: @ideasman42, @lichtwerk

Added subscribers: @ideasman42, @lichtwerk
Campbell Barton was assigned by Philipp Oeser 2018-06-15 15:39:31 +02:00
Member

I'm afraid this is how Undo works in blender.
Not aware of any workaround other than disabling "Draw Waveform".
[patching like you did will work fine if you use the same sound, but will fail to draw the correct waveform if you actually load a new file into the same sound datablock...]

But will @ideasman42 decide whether this can be closed...

I'm afraid this is how Undo works in blender. Not aware of any workaround other than disabling "Draw Waveform". [patching like you did will work fine if you use the same sound, but will fail to draw the correct waveform if you actually load a new file into the same sound datablock...] But will @ideasman42 decide whether this can be closed...
Author
Member

I tested swapping sound files - it worked OK, because another function is handling this and new waveform is at different memory address.
Undoing this action will therefore correctly swap waveforms back.

EDIT: oops it's not different function, but the fact the new waveform has new address is enough. I am not looking at source now...

I tested swapping sound files - it worked OK, because another function is handling this and new waveform is at different memory address. Undoing this action will therefore correctly swap waveforms back. EDIT: oops it's not different function, but the fact the new waveform has new address is enough. I am not looking at source now...

This issue was referenced by f48e81e720

This issue was referenced by f48e81e720c1e5fcc93ba6da11f862263da9cadc

Added subscriber: @mont29

Added subscriber: @mont29
Campbell Barton was unassigned by Bastien Montagne 2018-07-20 12:07:33 +02:00
Bastien Montagne self-assigned this 2018-07-20 12:07:33 +02:00

Yeah, we actually have a system to 'pass' that kind of data across undo steps, it’s just being ignored by BKE_sound_load()...
Will fix (and slightly refactor bSound flags, there is at least one flag here that is purely runtime and should be a tag ;) ).

Yeah, we actually have a system to 'pass' that kind of data across undo steps, it’s just being ignored by BKE_sound_load()... Will fix (and slightly refactor bSound flags, there is at least one flag here that is purely runtime and should be a tag ;) ).

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
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#55414
No description provided.