Overwriting asset library with newer version does not work #113397

Open
opened 2023-10-07 19:07:46 +02:00 by LOIC BRAMOULLE · 8 comments

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.23

Blender Version
Broken: version: 3.6.3 Release Candidate, branch: blender-v3.6-release, commit date: 2023-09-06 20:19, hash: c8c6f62cf3a3
Worked: (newest version of Blender that worked as expected)

Short description of error
If you update a library, new assets do not appear, and renamed ones are corrupted & crash blender on use.

Exact steps for others to reproduce the error

  • Have a library
  • update this library on disk (extract a zip, replaces the blend & cat & texture files making this library)
  • now in blender, new assets do not appear, and the ones that had their named changed in the new version are corrupted, no thumbnail, and crash blender on usage.

What is crazy is that this bug persists even if deleting the V1 library from both blender paths, and disk, extracting the V2, installing it again in Path. So blender keeps in memory the V1 library and corrupts the V2, even if all trace has been removed between both instals.
The only workaround to update a library seems to be to extract the V2 at a different location on disk : o

I'm the creator of Smartify Nodes that's currently the best selling product on blender market, and in a bit of panic as I did expect an asset library to just update without keeping this strange memory of the previous files, that corrupts the new blend file.

Here is two zip files I prepared with simple assets, that allows to reproduce the bug. as described above, instal V1 by uziping and adding fodler to Path, check library, then overrite on disk by extracting V2: library corrupted.

So the source file for V2 looks correct like this:
image

But once updated over the V1 that doesn't have the purple, and have red not yet renamed to orange, the V2 is corrupted like this:
image

Many thanks for any help, I'm not sure what's the best workaround for right now, as telling customers to delete previous verison and instal in another location seems very confusing.

**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.23 **Blender Version** Broken: version: 3.6.3 Release Candidate, branch: blender-v3.6-release, commit date: 2023-09-06 20:19, hash: `c8c6f62cf3a3` Worked: (newest version of Blender that worked as expected) **Short description of error** If you update a library, new assets do not appear, and renamed ones are corrupted & crash blender on use. **Exact steps for others to reproduce the error** - Have a library - update this library on disk (extract a zip, replaces the blend & cat & texture files making this library) - now in blender, new assets do not appear, and the ones that had their named changed in the new version are corrupted, no thumbnail, and crash blender on usage. What is crazy is that this bug persists even if deleting the V1 library from both blender paths, and disk, extracting the V2, installing it again in Path. So blender keeps in memory the V1 library and corrupts the V2, even if all trace has been removed between both instals. The only workaround to update a library seems to be to extract the V2 **at a different location on disk** : o I'm the creator of Smartify Nodes that's currently the best selling product on blender market, and in a bit of panic as I did expect an asset library to just update without keeping this strange memory of the previous files, that corrupts the new blend file. Here is two zip files I prepared with simple assets, that allows to reproduce the bug. as described above, instal V1 by uziping and adding fodler to Path, check library, then overrite on disk by extracting V2: library corrupted. So the source file for V2 looks correct like this: ![image](/attachments/5c726a10-571d-49e6-bb68-0d1b7eda3825) But once updated over the V1 that doesn't have the purple, and have red not yet renamed to orange, the V2 is corrupted like this: ![image](/attachments/edaa5c3e-2c0e-435b-8f1b-f51fd57b1612) Many thanks for any help, I'm not sure what's the best workaround for right now, as telling customers to delete previous verison and instal in another location seems very confusing.
LOIC BRAMOULLE added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-10-07 19:07:47 +02:00
Author

So the only/best workaround I found at the moment, was adding the version number to the library folder. so then it's zipped, shared, unzipped, and instead of overwritting the previous version (and corrupting it) it unzzips to an other folder.
Then in blender it's just editign the Path to have this version number (the new fodler) and that doesn't create the bug, as it's a different fodler.
It's one more step to update, but at least it adds this version number visible in browser for the user to know which one is installed currently, and be able to swap to previous version if ever useful.

So the only/best workaround I found at the moment, was adding the version number to the library folder. so then it's zipped, shared, unzipped, and instead of overwritting the previous version (and corrupting it) it unzzips to an other folder. Then in blender it's just editign the Path to have this version number (the new fodler) and that doesn't create the bug, as it's a different fodler. It's one more step to update, but at least it adds this version number visible in browser for the user to know which one is installed currently, and be able to swap to previous version if ever useful.
Iliya Katushenock added the
Interest
Asset Browser
label 2023-10-07 20:26:38 +02:00
Richard Antalik added
Module
Nodes & Physics
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-10-09 21:21:33 +02:00
Richard Antalik removed the
Module
Nodes & Physics
label 2023-10-09 21:23:15 +02:00
Richard Antalik removed the
Status
Confirmed
label 2023-10-09 21:34:32 +02:00

Accidentally confirmed wrong report.

I can confirm this, but will have to look why this happens. Though ASSET LIB BUG_v2 works on its own, so seems to be valid bug indeed. Worst case I won't find the cause and re-confirm

Accidentally confirmed wrong report. I can confirm this, but will have to look why this happens. Though `ASSET LIB BUG_v2` works on its own, so seems to be valid bug indeed. Worst case I won't find the cause and re-confirm

Checked the code, I am not sure if this is intentional behavior though. It tries to invalidate asset index file (cache) if it is obviously incorrect, but not sure if it tries to facilitate updatability.
It could store asset file last modified date in json and compare it to current one, which would be fairly good way to check index currency, but not 100% solution. It could also store file hash which would be perhaps better.

Checked the code, I am not sure if this is intentional behavior though. It tries to invalidate asset index file (cache) if it is obviously incorrect, but not sure if it tries to facilitate updatability. It could store asset file last modified date in json and compare it to current one, which would be fairly good way to check index currency, but not 100% solution. It could also store file hash which would be perhaps better.
Richard Antalik added the
Status
Confirmed
Module
User Interface
labels 2023-10-10 21:14:39 +02:00
Richard Antalik changed title from Updating an asset library with a new blend + cat files breaks it, even if deleting it from both disk and blender and reinstal. to Overwriting asset library with newer version does not work 2023-10-10 21:15:18 +02:00
Author

uh I see (I don't see but doesn't matter haha) but yea It felt like blender was keeping something in memory, creating a conflict, even if all trace of the library was wiped before updating.

I'm not an expert but I vaguely thought this was the whole point of the asset browser/libs, to have a person A create a library, and share it with X people. Not to only work locally.
Currently it's impossible, unless by changing the name of the library's folder each time it's shared/updated.
(Which will work perfectly fine as a workaround for me I think, and likely for anyone trying to share a library as well and stumbling upon this bug report)

uh I see (I don't see but doesn't matter haha) but yea It felt like blender was keeping something in memory, creating a conflict, even if all trace of the library was wiped before updating. I'm not an expert but I vaguely thought this was the whole point of the asset browser/libs, to have a person A create a library, and share it with X people. Not to only work locally. Currently it's impossible, unless by changing the name of the library's folder each time it's shared/updated. (Which will work perfectly fine as a workaround for me I think, and likely for anyone trying to share a library as well and stumbling upon this bug report)
Author

Oh just realized there is an issue with this workaround, as the folder is different, all image textures are lost when we delete the old version, so any file using assets from previous version need to use "external data > find missing files" to point to the new version of the library.
So really it would really be ideal if asset libraries could be updated.
(and version number marker can rather be stored in the catalog name so it updates with each update.)

Oh just realized there is an issue with this workaround, as the folder is different, all image textures are lost when we delete the old version, so any file using assets from previous version need to use "external data > find missing files" to point to the new version of the library. So really it would really be ideal if asset libraries could be updated. (and version number marker can rather be stored in the catalog name so it updates with each update.)
Author

I found a second workaround to this library update bug, it's not elegant and quite confusing for the user, but at least all the textures path are not lost:

In any blend file, that will display the library as corrupted because it was updated, right click on any asset, open blend file. Then save this blend file that was opened, to refresh and fix the library.

it's very plain and simple, but not super elegant to ask everyone to do that when updating.

I found a second workaround to this library update bug, it's not elegant and quite confusing for the user, but at least all the textures path are not lost: **In any blend file, that will display the library as corrupted because it was updated, right click on any asset, open blend file. Then save this blend file that was opened, to refresh and fix the library.** it's very plain and simple, but not super elegant to ask everyone to do that when updating.
Author

Ok, Third workaround is the best one I think (but only works if the library has one single blend file, which is my case.):

  • On my end as the library creator, I just edit the version number on the blend file. (so when updating, blender sees a new blend file, and doesn't corrupt the library.)
  • On the user end, First delete the old folder (so asset are not in double) Then extract here the zip file containing the updated library.

That method is much less confusing for the user than the second workaround (open & save lib) and preserves the images path (unlike the first workaround with new fodler name)

Ok, Third workaround is the best one I think **(but only works if the library has one single blend file, which is my case.)**: - On my end as the library creator, I just edit the version number on the blend file. (so when updating, blender sees a new blend file, and doesn't corrupt the library.) - On the user end, First delete the old folder (so asset are not in double) Then extract here the zip file containing the updated library. That method is much less confusing for the user than the second workaround (open & save lib) and preserves the images path (unlike the first workaround with new fodler name)
Author

Well, one big issue with that last workaround is that if user has created a custom blend file to store his custom asset for that library, we don't want them to delete the folder and lose their asset. So the user need to enter the folder and delete the previous blend file.
It seems it's still less confusing for the user than to have to open the library and Ctrl+S it to fix the library.

Well, one big issue with that last workaround is that if user has created a custom blend file to store his custom asset for that library, we don't want them to delete the folder and lose their asset. So the user need to enter the folder and delete the previous blend file. It seems it's still less confusing for the user than to have to open the library and Ctrl+S it to fix the library.
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
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
2 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#113397
No description provided.