Segmentation Fault after 2 Undos using linked node tree #48042
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#48042
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
Ubuntu Linux, Windows
Blender Version
Broken: 2.77
Worked: 2.76b
Segmentation Fault after 2 Undos. Sadly I can't find out the exact reason. But appear to be related with a linked node tree.
I'm trying to create a simpler .blend, without success...
Exact steps for others to reproduce the error
Extract the Zip file 0670c0_030_dora_ambulancia_bug_d.zip , open "0670c0_030_dora_ambulancia_bug_d.blend", hide the clip on the sequencer, unhide it, hide it again, Undo, Undo again.
Changed status to: 'Open'
Added subscriber: @GabrielCaraballo
Added subscriber: @ideasman42
The zip file doesn't contain the wav file, though I changed the reference to a local file and tried to redo the bug and couldn't.
Could you double check that this zip is able to redo the bug (possible some error packing it?).
Ok, after further testing I learned that you need the Addon "Amaranth" from "Testing" enabled.
(no need to actually relink the .wav file)
Tested from the uploaded .zip file, using 2.77-01ce8d8 build
Added subscriber: @LukasTonne
Even without Amaranth i get an assert failure right away when opening the test file, here
https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_outliner/outliner_tree.c$867
(ID is of type Sound = ID_SO, not supported by outliner it seems)
I don't know the code in detail, but don't see any place before this that would filter valid outliner ID types or so. If so, this would be a bad way to use assert (assert = stuff that should never ever happen)
Added subscriber: @mont29
@LukasTonne, yes, I get this too, but this only developer builds and doesn't impact releases.
@mont29 added it, and every so often it asserts (maybe should be disabled?), since IIRC it's something shouldn't but can be safely ignored.
Notice that hiding and showing the clip is just an example, you can Undo any action and should segfault.
Testing Blender 2.77a I've noticed that the Backtrace is not always the same. What could that mean?:
First time:
Second time:
Added subscriber: @Sergey
I can't reproduce the crash.
The backtrace isn't really helpful, since it's created form a release build. Please get a backtrace from a debug build and show what
thread apply all bt
says (as a file perhaps, since it's gonna to be long).Hi Sergey, probably "you need the Addon "Amaranth" from "Testing" enabled."
( From comment https://developer.blender.org/T48042#368088 , I can't edit the issue to add that update )
Managed to reproduce it, and get an asan report for "heap use after free":
P348: (An Untitled Masterwork)
Cause for the bug is indeed on Amaranth's side:
https://developer.blender.org/diffusion/BAC/browse/master/amaranth/scene/debug.py;4dc84d67773154f08f8c2c670c88e4f76f855be4$120
This is evil! It keeps pointers stored in the panel type (!) and these become invalid when undoing.
Looks like a panel poll func (from amaranth addon?) is using a stored pointer instead of storing only local data (usually a string)… Note here I can reproduce crash too, but seems to happen in
AMTH_SCENE_PT_scene_debug
drawing func.Anyway, this is amaranth issue - it’s doing many complex and not-so-great things (like using op class to 'cache' data…).
@LukasTonne that
materials
list actually only stores strings, afaict, so should not be direct cause of issue (but again, code here is a maze, hard to to follow).@mont29 Yes, @GabrielCaraballo pointed out that it's just a string list. But the error comes from somewhere within the "Lighter's Corner" panel.
Added subscriber: @VukGardasevic
Like it was said before, the problem is the draw part.
The function AMTH_SCENE_PT_scene_debug is in the panel which means every time the cursor is over it gets redrawn.
This code should start around line 1133.
list_users in a simple scene of one material and the default cube would be:
t is "OBJECT_DATA" and finally list_users- [x] is bpy.data.objects['Cube'].
I've added a print to see what ma is and it returns something like :
ma is <bpy_struct, Object("some name here")>
The problem is the List Users for Datablock panel specifically. If there is a list of labels, (for instance a search for users of a material was done) it gets redrawn.
After Undo the string passed as a key gets replaced with gibberish.
when trying to access the name of the object.
That's a sign that the list_users and/or list_users- [x] has gone corrupted - the combination of redrawing with the access to the objects and undo doesn't end up well.
Basically, the list starts accessing random stuff in the memory like in these cases:
After the next undo or selection/action or trying to print list_users list as a debug, it's time for reminiscence about the choice of desktop wallpaper :)
Changed status from 'Open' to: 'Resolved'
Committed a refactor of the scene debug script - the major change is moving storage to a separate class and the usage of UI lists for the Lighter's corner and Images. Also object data was stored in the dictionary before - now only strings are contained.
The issue with the supplied file cannot be recreated with the current master or 2.79, however it was related to accessing nested node groups in the linked files in 2.76.10 build.
Closing as resolved for now.