DerKarlos / OSMeta

OSM "Metaverse"
Other
15 stars 2 forks source link

cache issues #46

Closed oli-obk closed 7 months ago

oli-obk commented 7 months ago

First start: Just one error: 2023-11-28T17:00:33.928344Z ERROR bevy_asset::server: encountered an io error while loading asset: error fetching textures/Fabi2-putz1.png: connection closed

2nd and more starts: 15 times this 2023-11-29T09:06:07.755709Z ERROR bevy_asset::server: Failed to load asset 'textures/cc0textures/Concrete034/Concrete034_ORM.jpg' with asset loader 'bevy_render::texture::image_loader::ImageLoader': Could not load texture file: Error reading image file textures/cc0textures/Concrete034/Concrete034_ORM.jpg: failed to load an image: failed to fill whole buffer, this is an error in bevy_render.

Originally posted by @DerKarlos in https://github.com/DerKarlos/OSMeta/issues/41#issuecomment-1831511427

oli-obk commented 7 months ago

hmm... I'll add some debug logging so you can check where the files are and whether they are somehow corrupted

oli-obk commented 7 months ago

ok, pull the latest main branch and try again, it should show you the directory now.

Maybe I should just use blocking disk operations instead of relying on the async ones (which may potentially just open the file, but not actually finish writing it to disk). I have seen an empty file before, but thought it was a race condition and that I fixed it.

oli-obk commented 7 months ago

ah no, I'm just naive with async again... We need to flush, it won't do that automatically for us like std::fs::File