Closed jonnenauha closed 11 years ago
As expected, this retains the main loop fairly smooth. I'll likely briefly experiment with the write threshold.
I suspect this might have broken zip assets on Win64 builds. Will begin investigating more now.
I highly doubt it. There is no way that processing of the transfer is done before the cache write has successfully completed. If it does fail it will set empty disk source to the transfer. This will affect IAssetBundle loading if it requires a disk source to operate eg. ZipArchive does this.
I will also step in if the problem is actually in the disk write, but it does not look to me like it.
Please test with the old synchronous disk write code to see if the bug persists to rule this out. Comment out lines https://github.com/realXtend/naali/blob/tundra2/src/Core/AssetModule/HttpAssetProvider.cpp?source=c#L386-L399
Yeah, my accusation might be a bit of a stretch but couldn't come up with a more viable suspect for now.
OK, so I rebuilt ogredeps, Ogre (1.9), QtScriptBindings and Tundra and the problem seems to have been fixed by that.
Hmm, that is weird. Only thing that might have affected it somehow was this https://github.com/realXtend/naali/commit/d9152f6b69b9337f52201d943a45af8141e89ae9
If your script plugins were not somehow loading properly, maybe it failed to register the metatype and fail all cache writes like it was before that commit. The commit should have fixed that in any case, but maybe it was a case of doing a full rebuild to Tundra too?
Weird weird bug, but good thing its resolved :)
BTW I noticed a warning that x64 RelWithDebInfo build of ArchivePlugin linked to MSVCRTD, it might have something to do with this. Regardless of the warning, the new build seems to work fine though.
There was problems of zlib or zziplib linking to incorrect VC runtime, but if I recall correctly I fixed those in the deps build script at some point. Must still have something off then.
Ah here it is https://github.com/realXtend/naali/issues/598 I wonder if we didnt send this over or whats going on. I seem to have closed the issue a month from that commit so I would think it was sent over :P
See previous details at https://github.com/realXtend/naali/pull/707
Added to above:
AssetAPI
andIAsset
internals.HttpAssetProvider::AsyncCacheWriteThreshold
that is default set to 0. This means that everything is written to disk with the threaded operation. I left this variable there for easy debugging and profiling, when/if we want to find a sweet spot for disabling async writes below a particular file size.HTTPASSETPROVIDER_NO_HTTP_IF_MODIFIED_SINCE
logic use the same completedTransfer list. Can now remove ifdefs from the .h file.