Page MenuHome

Crash when issuing an undo operation immediately after linking a collection when an outliner's display mode is set to "Blender File"
Closed, ResolvedPublicBUG


System Information
Operating system: Linux-5.3.0-26-generic-x86_64-with-Ubuntu-19.10-eoan 64 Bits
Graphics card: AMD Radeon RX 5700 XT (NAVI10, DRM 3.33.0, 5.3.0-26-generic, LLVM 9.0.0) X.Org 4.5 (Core Profile) Mesa 19.2.1

Blender Version
Broken: version: 2.82 (sub 6), branch: master, commit date: 2020-01-03 10:02, hash: rB9b74e648c512
Worked: Never

Short description of error
Blender crashes when issuing an undo operation immediately after linking a collection when an Outliner's display mode set to Blender File
It doesn't matter how many Outliners are open, as long as one is set to Blender File.
This only happens when linking, not appending. No other data blocks causes the crash except collections.

Log files:

Exact steps for others to reproduce the error
Apparently the issue occurs only if the linked collection also has linked stuff? In the test case, the collection to be linked has linked materials.
Blender does not crash when linking standalone collections.

Download these files:

  1. Open TEST.blend
  2. Link a collection from 2.blend (2.blend has an object linked from 1.blend; now the Outliner has 2 linked files)
  3. Undo the operation (Ctrl+Z)

Event Timeline

ronsn added a subscriber: ronsn.Jan 3 2020, 7:49 PM

I can not reproduce this issue.


System Information
Operating system: Linux-5.0.0-37-generic-x86_64-with-debian-buster-sid 64 Bits (Ubuntu 18.04)
Graphics card: GeForce GTX 1660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 435.21

Blender Version
version: 2.82 (sub 6), branch: master, commit date: 2020-01-03 10:02, hash: rB9b74e648c512

Robert Guetzkow (rjg) changed the task status from Needs Triage to Needs Information from User.Jan 3 2020, 8:20 PM

I cannot reproduce this on Windows with the latest master either. Is there anything special about the collection you're linking?

Rey Leonard M. Amorato (rl.amorato) changed the task status from Needs Information from User to Needs Triage.Jan 3 2020, 8:34 PM

Added more info; the collection to be linked also has linked materials.

ronsn added a comment.Jan 3 2020, 8:55 PM

Okay, I can confirm that issue, that Blender crashes if you link something from a file where also something is linked in!

ronsn changed the task status from Needs Triage to Confirmed.Jan 3 2020, 8:55 PM
ronsn added a comment.Jan 3 2020, 10:52 PM

This issue also occurs in version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e

@Robert Guetzkow (rjg): This task might have a High priority, isn't it?

Robert Guetzkow (rjg) triaged this task as High priority.EditedJan 3 2020, 11:36 PM

I can confirm this as well. Since this bug is crashing Blender, I'm setting the priority to high.

The tree elements of the outliner contain invalid pointers.

BLI_addtail(ListBase * listbase, void * vlink) Line 119	C
outliner_add_element(SpaceOutliner * soops, ListBase * lb, void * idv, TreeElement * parent, short type, short index) Line 796	C
outliner_add_library_contents(Main * mainvar, SpaceOutliner * soops, ListBase * lb, Library * lib) Line 1282	C
outliner_build_tree(Main * mainvar, Scene * scene, ViewLayer * view_layer, SpaceOutliner * soops, ARegion * ar) Line 2329	C
draw_outliner(const bContext * C) Line 3635	C
outliner_main_region_draw(const bContext * C, ARegion * ar) Line 96	C
ED_region_do_draw(bContext * C, ARegion * ar) Line 539	C
wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 628	C
wm_draw_window(bContext * C, wmWindow * win) Line 766	C
wm_draw_update(bContext * C) Line 946	C
WM_main(bContext * C) Line 424	C
main(int argc, const unsigned char * * UNUSED_argv_c) Line 520	C
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".
dupoxy added a subscriber: dupoxy.Jan 9 2020, 8:20 PM
Bastien Montagne (mont29) lowered the priority of this task from High to Normal.Jan 16 2020, 9:42 AM

This actually exhibits two issues:

  1. Outliner crash (looks like it does not like the situation generated by undo in that case).
  2. Undo code keeps reference to unused libraries, and even unused indirectly linked datablocks.

Will try to fix the crash in outliner first, then we'll see about cleaning up again that black dark magic of library handling in undos…