Regression: File browser shows all folders as empty if opened too soon #121235

Closed
opened 2024-04-29 23:57:42 +02:00 by Dvorakir · 8 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.34

Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-04-29 02:32, hash: 3a5389d5abe0
Broken: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: e1743a0317bc
Worked: 4.0.2
Caused by 3fcd9c9425

Short description of error
If the file browser is opened too soon after blender has started up, it will show all folders as containing "No items". The refresh button does nothing, and the only way to get files to show up is to close and reopen the file browser.

This seems to be related to loading of asset libraries; when blender is started, there's a brief green loading state displayed on the taskbar button, and the bug will happen if you open the file browser before or while blender is in this state.
It does not happen with factory settings, but as soon as I added two of my asset libraries the bug would reoccur.

I was able to reproduce the bug by creating several copies of a dummy asset library containing 500 files. The more large asset libraries you have, the more time the loading state will take.

Exact steps for others to reproduce the error

  1. download the attached asset library and extract it somewhere
  2. run the following python script inside the "dummy assets" directory, which will make 500 copies of the assetcube1.blend file
import os
import shutil

for num in range(500):
  shutil.copyfile(os.path.join(os.getcwd(), "./assetcube1.blend"), os.path.join(os.getcwd(), f"./assetcube{num+2}.blend"))
  1. make several copies of the dummy asset library folder and add them all to Blender as asset libraries.
    image

  2. restart blender and you will see the loading state
    2024-04-29_23-38-21.gif

  3. open the file browser before the loading state finishes
    the loading state will be much faster on subsequent startups of blender, but if you are fast enough you should run into the bug!

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.34 **Blender Version** Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-04-29 02:32, hash: `3a5389d5abe0` Broken: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: `e1743a0317bc` Worked: 4.0.2 Caused by 3fcd9c9425 **Short description of error** If the file browser is opened too soon after blender has started up, it will show all folders as containing "No items". The refresh button does nothing, and the only way to get files to show up is to close and reopen the file browser. <video src="/attachments/d3b958cb-2113-4b47-b845-d1beddda6238" title="browser empty.mp4" controls></video> This seems to be related to loading of asset libraries; when blender is started, there's a brief green loading state displayed on the taskbar button, and the bug will happen if you open the file browser before or while blender is in this state. It does not happen with factory settings, but as soon as I added two of my asset libraries the bug would reoccur. I was able to reproduce the bug by creating several copies of a dummy asset library containing 500 files. The more large asset libraries you have, the more time the loading state will take. **Exact steps for others to reproduce the error** 1. download the attached asset library and extract it somewhere 2. run the following python script inside the "dummy assets" directory, which will make 500 copies of the assetcube1.blend file ```py import os import shutil for num in range(500): shutil.copyfile(os.path.join(os.getcwd(), "./assetcube1.blend"), os.path.join(os.getcwd(), f"./assetcube{num+2}.blend")) ``` 3. make several copies of the dummy asset library folder and add them all to Blender as asset libraries. ![image](/attachments/21eb4b3c-7a1b-427f-914b-5dfa8c24120e) 4. restart blender and you will see the loading state ![2024-04-29_23-38-21.gif](/attachments/6d744d7d-e89f-40d8-8237-fed984084dd6) 5. open the file browser before the loading state finishes the loading state will be much faster on subsequent startups of blender, but if you are fast enough you should run into the bug!
Dvorakir added the
Status
Needs Triage
Type
Report
Severity
Normal
labels 2024-04-29 23:57:42 +02:00
Iliya Katushenock changed title from File browser shows all folders as empty if opened too soon to Regression: File browser shows all folders as empty if opened too soon 2024-04-30 00:04:47 +02:00
Iliya Katushenock added the
Interest
User Interface
label 2024-04-30 00:04:51 +02:00
Member

Hi, thanks for the report. Can confirm in 4.1 and 4.2

Hi, thanks for the report. Can confirm in 4.1 and 4.2
Member

Broke between 7e8557e6c6 and 41f9f2753a

Broke between 7e8557e6c64e and 41f9f2753a70

@JulianEisel I would venture that this one is most likely for you?

@JulianEisel I would venture that this one is most likely for you?
Julian Eisel was assigned by Bastien Montagne 2024-05-14 12:51:35 +02:00
Member

Caused by 3fcd9c9425.

Think the problem is that this commit triggers asset library loading on startup, which still uses the file browser backend (file-list), but only one file-list loading job is supported at a time. I'm not sure what to do about this short term, or if it's worth putting effort into this even. Asset library loading should simply be made independent of the file browser backend, although I'm not sure when that will happen finally. A good amount of work needs to be done first, e.g. #110462 and #110462 to not depend on the file browser backend for preview image management.

Unless this is an issue people run into commonly (which I don't think is the case), I'd mark this as "Known Issue".

Caused by 3fcd9c9425. Think the problem is that this commit triggers asset library loading on startup, which still uses the file browser backend (file-list), but only one file-list loading job is supported at a time. I'm not sure what to do about this short term, or if it's worth putting effort into this even. Asset library loading should simply be made independent of the file browser backend, although I'm not sure when that will happen finally. A good amount of work needs to be done first, e.g. #110462 and #110462 to not depend on the file browser backend for preview image management. Unless this is an issue people run into commonly (which I don't think is the case), I'd mark this as "Known Issue".
Bastien Montagne added this to the 4.2 LTS milestone 2024-05-17 13:02:49 +02:00

I was experiencing a similar issue with the asset browser a couple of days ago with main. It was a real problem for me with a debug build, as I had to wait several tens of seconds before opening the Asset browser...

Weirdly enough, I cannot reproduce it today. @JulianEisel @HooglyBoogly did you guys changed something recently in this code?

Would be good to sort it out for sure, I would consider this a blocker for 4.2 release.

I was experiencing a similar issue with the asset browser a couple of days ago with `main`. It was a real problem for me with a debug build, as I had to wait several tens of seconds before opening the Asset browser... Weirdly enough, I cannot reproduce it today. @JulianEisel @HooglyBoogly did you guys changed something recently in this code? Would be good to sort it out for sure, I would consider this a blocker for 4.2 release.

You can reproduce the issue on Linux by deleting ~/.cache/blender/asset-library-indices. If you wait for a minute or two for the cache to regenerate, the file browser will show directory contents properly.

You can reproduce the issue on Linux by deleting `~/.cache/blender/asset-library-indices`. If you wait for a minute or two for the cache to regenerate, the file browser will show directory contents properly.
Member

#123027 should fix this. Could someone confirm this? Test builds should be showing up here shortly: https://builder.blender.org/download/patch/PR123027/

#123027 should fix this. Could someone confirm this? Test builds should be showing up here shortly: https://builder.blender.org/download/patch/PR123027/
Author

I tested the build and the issue is no longer present for me at least - the file browser loads in instantly regardless of the state of the asset library loading 👍

I tested the build and the issue is no longer present for me at least - the file browser loads in instantly regardless of the state of the asset library loading 👍
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-06-11 18:31:55 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
5 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#121235
No description provided.