Crash when adding nodegroup asset in node editor (when large Asset Libraries are present) #104305
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
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#104305
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: Linux-5.17.15-76051715-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: Quadro RTX 6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 515.48.07
Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2023-02-02 15:15, hash:
fe5d54d3d0
Worked: ?
Short description of error
backtrace:
https://pastebin.com/gFh82k0x
Blender crashes when adding a nodegroup asset in the node editor using the search.
Exact steps for others to reproduce the error
[1] prepare a large Asset Library
-- create a file with a size ~15MB (e.g. subdivision mod level 7 on default cube, apply mod, save into a folder)
-- duplicate this file ~600 times
-- (alternatively less but bigger files [in additional subfolders] also triggerd this on my end)
-- add this folder as Asset Library in Preferences, save Preferences, restart blender
-- then do the below
[2] Create a new nodegroup asset and save the file
-- Open add menu and search for
nodegroup
-- Press Enter on first entry -> crash
From this file:
untitled.blend
ASAN spits out a heap-use-after-free
Added subscriber: @SimonThommes
Added subscriber: @mod_moder
Changed status from 'Needs Triage' to: 'Confirmed'
Can confirm crash with example file.
Also i get this:
{nav Open example file > Drag and drop asset node in node tree > Save > Exit}
Changed status from 'Confirmed' to: 'Needs Triage'
I actually feel like I can't be sure that I'm checking exactly what is needed, so someone else is most likely needed.
Added subscriber: @JulianEisel
@mod_moder thanks for testing! Interesting that you can reproduce the crash, I showed this to @JulianEisel and he wasn't able to reproduce it.
We boiled it down that the crash happens whenever the asset in the file is used in a library, even when another asset is added via the search.
Maybe the Error you noticed gives us another hint...
I'm not very familiar with assets. When searching, I get a bunch of node groups (2 of them correspond to the name you specified) and in the end I found a weekly regression on one group, and a memory leak on the other. and also errors about an unknown type of property (10, probably boolena...)
Added subscriber: @PratikPB2123
Hi, I'm unable to redo the crash in current master:
27e2b32a06197e02a000e8e51c9c4b4bf3d92406
Tried both: 1. opening file normally. 2. Redoing When file is part of asset library
Could be similar to #103086?
Can confirm.
Asset->file_data->asset
is NULL here (havent checked if this is actually the culprit already), will bisect...Hm, bisecting points to the version bump to 3.6... (
d5d48a986b
)This doesnt really help, another finding is that if I do this in main (where I could reproduce) but with Factor Defaults, the crash does not occur ( @SimonThommes : can you confirm? )
So further digging shows that this is caused by an older Asset Library in my Preferences, if I remove that, the crash does not occur ( @SimonThommes : might this be the case on your end as well? ) -- this was not there in 3.5 preferences btw., this is why the bisect went bonkers.
So suspicion is that there is something in my old Asset Library that (falsely) gets added to the items here (and used instead of the "real" nodegroup)?
I cant share my old Asset Library (it is far too big and contains every prop model from my former flat...) but will do some further digging which asset exactly might cause this
crash is in the same place as #104857 btw (but afaict it has nothing to do with the assets folder, not the culprit commit mentioned there)
OK, so after bisecting again (this time with the old Asset Library actually enabled in 3.5), the crash is indeed caused by
b3fb73f325
.Still trying to find the condition for the old Asset Library to trigger this though.
Yet another note: in some scenario, the Asset Browser seems to include Assets from libraries that were enabled once (but are now disabled, even after restart) when using "All" in the dropdown... stange, will continue digging deeper tomorrow
Thanks for investigating! Removing specific Libraries from the preferences did also fix it for me, so that sounds about right. This was an issue before the version bump though, 2 weeks before the commit you posted. Maybe it is a reoccurring issue?
OK, I think I have to stop investigation here.
What i found was a particular folder (with blend files containing assets) in my old Asset Library that was apparently the culprit.
I then (temporarily) moved the folder outside the old Asset Library, crash was gone then, then I moved the folder back in place and now this still works and I am from now on unable to repro the crash anymore :/
Correction regarding the above statement, the scenario is as follows:
If you have a blend file open, then assets in all subfolders (being in the same folder as the file you have currently open) are included in the
Asset Browser / All
view. This seems unintentional since these are not part ofCurrent File
nor any other Asset Library specified in Preferences. Checking in chat first, might create another report for this though.So, we were close, but didnt quite reach the goal of mking this a reproducable case (as-in: create steps from scratch).
For now (until we find reliable repro steps), I`ll put this on "Needs Information from User", hopefully you'll be able to indentify in your environment what the culprit Library needs to contain that causes this @SimonThommes.
OK.... heisenbug is back :)
Sorry spamming this thread, but each step takes quite a while to check and after some more tests, I think this has to do with autosave files (.blend1) in the particular folders
Ooh, that is actually interesting. I usually have the
blend1
functionality turned off, but the crash I was getting is indeed related to a library where such a file exists. Unfortunately in my test the issue still persists, when I move theblend1
file out of the library folder. So that doesn't seem to be the issue, at least in my case.I haven't had this problem in a while now as I just removed the problematic folder from my libraries, so I'm not sure I'll be able to pin this down...
I asked @JulianEisel if he could reproduce it with an exact setup we have here on our local network.
Did you have time to check that out yet?
Just FYI, after
79bce99260
it still crashes (noting this because the crash was in the same spot that above commit fixed)OK (really want to nail this), new finding is that it seems to be dependent on the amount of .blend (or .blend1) files in the library, will continue tomorrow, but I think this time I am close...
So ASAN spits out a heap-use-after-free:
This race really seems to be dependent on the amount of files (and file sizes) in the asset library, but on my end, I can repro doing the following:
@mont29 : will confirm now, is this something that rings a bell?
@lichtwerk think this is more for @JulianEisel first?
@mont29 I pinged you because it looked like relevant code could be from
f69e9681fa
?Crash when adding nodegroup asset in node editorto Crash when adding nodegroup asset in node editor (when large Asset Libraries are present))Crash when adding nodegroup asset in node editor (when large Asset Libraries are present))to Crash when adding nodegroup asset in node editor (when large Asset Libraries are present)reported this as #105180 btw.
For me beta is crushing whenever I try to add any node assets via shift+a menu(I can go to folder and subfolder lvl, but it crush at the moment when I hover mouse to reveal directly nodegroup assets menu), or via search. Tried to refreshed library, resaving assets with latest version etc, not sure if this needs separate report?
This is as far as I can go:
Hello there, is there a optimal way to help report the amount of asset I have that is causing crash during node search? I have alot of path and each have alot of geonode asset marked as well.
@genesis2303 : does it also crash if you enable only a smaller Asset Library? How many files are in the libraries you have enabled?
I think most of it just a Geonode library with 100+ node group and I also have asset pack with around 1000+ file object. (Plants asset + other asset from blenderkit lib)
well I need to test for that, by disabling some lib will trying to recreate the error. What I found is after deleting all path and re adding them. There was some period it is not crashing, but after reopening the file and doing the same thing it crash again. I only add 1 path to asset folder containing 578 blend files HDRI setup
This is the path I add. I try removing them one by one and reproduce the error, beside the empty state the error is persistent for me.
I have quite a few files there, but in this library I got just node assets, nothing heavy, no crazy meshes. HIGGSAS library is literary file with his nodes from gumroad, I just added categories, works fine in 3.4 and worked in 3.5 till around late December/early January (works fine in 19th December simulation build). When I try to load hair assets also crushing, but Bradley addon works fine.
Edit: also if I drag nodes from assets workspace to node workspace they are working fine only shift+a or search method fails.
@lichtwerk: I believe the bradley addon does not use the Asset Library and instead link nodes from a premade file with his own addon script every time we open Blender. Higgas one is using Asset Lib to call on the group nodes. I think the issue is still in the asset lib.
@B3dtest also if it would be only my library, It shouldn't crush when I try to load essentials hair assets and it does. Same story I try to load hair essentials with shift+a or with search I go to desktop before I blink, and If I drag from asset workspace to node workspace it's fine - no crush. So something must be different with methods of loading node groups via drag&drop and shit+a/search. With 3.4 it works fine, but also it was issue for me almost all alpha&beta stage back then.
I just tried with clean appdata settings, re added library and the issue disappeared, so I guess it must be some of my add-ons not updated or conflicting with asset browser, sorry for wasting your time.
@genesis2303 : have you enabled all the libraries again that you had before (like I said before, this really depends on the overall number/size of all asset library contents)?
@lichtwerk
I found out that issue is caused by my MODELS DOWNLOAD folder which is actually quite big, but I don't know if it's due to how many asset files I have there, or due to some files with large amount of assets per file, or there are just too many assets in it, so for now I randomly delete files I suspect, due to lack of better diagnostic method.
@lichtwerk when I deleted some grass files it worked, when I bring back file from trash couldn't load again so I entered the file and I wonder am I allowed to make collection and asset and at the same time make elements of collection assets as well?
There is something in this particular file which make blender crash if I make asset of it's collection and elements of collection, but no idea what it is.
https://polyhaven.com/a/grass_bermuda_01
So every grass asset have material with texture in separate folder, so this might be it as well.
@genesis2303 : think this should not be related to the crash.
Remember in my repro steps (see the report description), you dont even have to mark an asset at all to cause the crash:
@lichtwerk I did 700 copies, subdiv lvl_7 on defoult cube, clean blender no addons, no external libraries, don't won't to crash what ever I do with shift+a but I made folder on same drive as blender install then I thought maybe it's due to some between drives issue but also no, once it loads library I can't crash it no matter how hard I try.
Hm. Does it crash when you follow the original steps then (see report description again)?
@lichtwerk
Not sure what do you mean by this?
If I have clean blender, it won't find any entry if I type "nodegroup"
or do you mean this group?
Edit:
AAA so you want me to make group asset, like in new file or in this folder with cube or where?
@genesis2303 : follow the steps, or better: just download
untitled.blend
from the report description, open that and search there@genesis2303 I think if you are using the Blender 3.5 beta. There will be an essential hair node group. And you can use that to test. Just pick the essential pack on file asset window. then after dragging them use the shift + A or ctrl + A to search for an geo node. See if it crash at all.
Seems to work without any issue:
With downloaded file also 0 crashes:
Now try linking some asset library to the path. you can try https://github.com/Poly-Haven/polyhavenassets to download library assets. I tried adding path to the hdri pack and it start crashing. Is in your example you added external links to file assets? I think after reading the hires cubes you are using is a collection of internal files? Try closing blender and tried again to recreate the error.
@B3dtest ok after I loaded hdri's adding node group crash confirmed.
@lichtwerk @genesis2303 I also tested with Higgas and other geo node asset and it seams to work fine as external asset. I guess the size an amount can be the main issue. Hope this can be fixed. Thank you for helping me test it.
NOTE: This is almost certainly the same issue as #105535. It boils down to how the asset system abuses the FileBrowser listing code currently...
@JulianEisel feel free to close one of the tasks. Would consider this as a critical issue and show-stopper for 3.5.
@JulianEisel Any update here? :) We are one week away from Bcon4.
I'm working on this but it's not entirely simple.