Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset V2 log path not reflects custom asset source #9715

Open
lewiszlw opened this issue Sep 7, 2023 · 2 comments
Open

Asset V2 log path not reflects custom asset source #9715

lewiszlw opened this issue Sep 7, 2023 · 2 comments
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior

Comments

@lewiszlw
Copy link
Member

lewiszlw commented Sep 7, 2023

Bevy version

5eb292d

What you did

Run cargo run --features="filesystem_watcher" --example asset_processing

What went wrong

image

I must manually create imported_assets dir in project root then example works.

@lewiszlw lewiszlw added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Sep 7, 2023
@mockersf mockersf added A-Assets Load files from disk to use for things like images, models, and sounds and removed S-Needs-Triage This issue needs to be labelled labels Sep 7, 2023
@cart
Copy link
Member

cart commented Sep 7, 2023

I was wondering why people were hitting this when I never did during development. Its because the ProcessorTransactionLog "imported_assets" path always matched the configured "imported_assets" path for the AssetWriter (which creates this folder automatically).

The asset_processing example changes that path for the AssetWriter, but it doesn't do the same for the ProcessorTransactionLog.

@mockersf it is worth ensuring we create the path if it doesn't exist in the ProcessorTransactionLog, but there is a bigger problem here (a mismatch in configured paths for the imported_assets folder). Currently the fix results in two different imported_assets folders (one at the root of the project and one as a sibling of processing.rs).

We'll want a way to ensure these line up appropriately. I intentionally didn't use the AssetWriter::write API because that is intended for asset storage specifically and the log file is not an asset.

I'll give this some thought. I think the solution is either to couple processor logging to AssetWriter (to ensure things are synced up there), or to have a higher level path interface that feeds into both AssetWriter and some ProcessorTransactionLogWriter interface (or just ProcessorTransactionLog directly in the short term). The former is simpler but increases the scope of AssetWriter beyond assets. The latter adds more abstraction.

github-merge-queue bot pushed a commit that referenced this issue Sep 7, 2023
# Objective

- Related to #9715 
- Example `asset_processing` logs the following error:
```
thread 'IO Task Pool (1)' panicked at 'Failed to initialize asset processor log. This cannot be recovered. Try restarting. If that doesn't work, try deleting processed asset folder. No such file or directory (os error 2)', crates/bevy_asset/src/processor/mod.rs:867:25
```

## Solution

- Create the log directory if needed

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
@mockersf
Copy link
Member

mockersf commented Sep 8, 2023

@mockersf it is worth ensuring we create the path if it doesn't exist in the ProcessorTransactionLog, but there is a bigger problem here (a mismatch in configured paths for the imported_assets folder). Currently the fix results in two different imported_assets folders (one at the root of the project and one as a sibling of processing.rs).

Yup, that's why I didn't mark #9716 as fixing this bug. That seemed a much larger fix needed...

rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this issue Jan 9, 2024
# Objective

- Related to bevyengine#9715 
- Example `asset_processing` logs the following error:
```
thread 'IO Task Pool (1)' panicked at 'Failed to initialize asset processor log. This cannot be recovered. Try restarting. If that doesn't work, try deleting processed asset folder. No such file or directory (os error 2)', crates/bevy_asset/src/processor/mod.rs:867:25
```

## Solution

- Create the log directory if needed

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

No branches or pull requests

3 participants