Bug #9676
Bug with 3 or more Mod KSPedia asset bundles
100%
Description
A bug? has been discovered in the stock KSPedia AssetLoader?
It has been brought to a few of us modders attention and have confirmed this.
If you have THREE or more .ksp KSPedia asset bundles in your install folder it breaks KSPedia when you try to open it and you get this error:
KSPediaController: Compiling KSPedia databases
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
KSPediaController: Compiling 4 KSPedia databases
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
The AssetBundle 'file://P:\GRY\SteamLibrary\SteamApps\common\KSP 1.1.2 - testing\GameData\Squad\squadcore.ksp' can't be loaded because another AssetBundle with the same files are already loaded
(Filename: Line: 308)
NullReferenceException: Object reference not set to an instance of an object
at KSPAssets.Loaders.AssetLoader+<>c__DisplayClass50_0.<LoaderRoutine>b__0 (UnityEngine.AssetBundle b) [0x00000] in <filename unknown>:0
at System.Linq.Enumerable.First[AssetBundle] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0
at System.Linq.Enumerable.FirstOrDefault[AssetBundle] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0
at KSPAssets.Loaders.AssetLoader+<LoaderRoutine>d__50.MoveNext () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
It seems like KSPedia or the AssetLoader is trying to re-load squadcore.ksp. The strange thing is, the bundles work individually.. They work in any combination of TWO Asset Bundles.
But as SOON as you add a THIRD one you get the error above. IT does not seem to be related to any particular asset bundle. So unless we are all creating the asset bundles incorrectly from parttools there seems to be some other issue?
To recreate:
Get three or more .ksp KSPedia asset bundles from mods. (SCANsat, DeepFreeze, KPBS to name a few).
Put them into GameData and load KSP.
Try to open the KSPedia and you get the above failure and a blank KSPedia screen that breaks the game.
Reduce it to one or two KSPedia asset bundles and everything is fine.
History
#1 Updated by DMagic over 8 years ago
- Status changed from New to Confirmed
- % Done changed from 0 to 10
I am seeing the same.
I also noticed that any two additional KSPedia entries produced the warning message shown above:
The AssetBundle 'file://P:\GRY\SteamLibrary\SteamApps\common\KSP 1.1.2 - testing\GameData\Squad\squadcore.ksp' can't be loaded because another AssetBundle with the same files are already loaded
This is an orange message that doesn't appear to affect the actual KSPedia entries, stock or mod. Only the third entry seems to produce the exception, which interrupts the loading process and prevents any entries from being shown.
#2 Updated by DMagic over 8 years ago
- File dummyone.ksp dummyone.ksp added
- File dummytwo.ksp dummytwo.ksp added
- File scansat.ksp scansat.ksp added
Also, I made two quick dummy KSPedia entries, each with a few pages from the SCANsat entry. The names and titles are different. Using all three produces the error shown above.
#3 Updated by DMagic over 8 years ago
On further testing it seems that this only occurs when the squadcore asset bundle is listed as a dependency for the new entries (which can be seen in the *_kspedia.xml file). I believe using the included background images triggers this as a dependency. Simply moving the images to a new location and manually importing them solves the issue for me.
#5 Updated by JPLRepo over 8 years ago
- Status changed from Confirmed to Closed
- % Done changed from 10 to 100
Bug fixed in KSP 1.1.3