Project

General

Profile

Bug #9676

Bug with 3 or more Mod KSPedia asset bundles

Added by JPLRepo over 8 years ago. Updated over 8 years ago.

Status:
Closed
Severity:
High
Assignee:
-
Category:
KSPedia
Target version:
-
Start date:
05/03/2016
% Done:

100%

Version:
Platform:
Windows
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

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.

dummytwo.ksp (835 KB) dummytwo.ksp [email protected] DMagic, 05/03/2016 08:45 PM
dummyone.ksp (1.07 MB) dummyone.ksp [email protected] DMagic, 05/03/2016 08:45 PM
scansat.ksp (3.84 MB) scansat.ksp [email protected] DMagic, 05/03/2016 08:45 PM

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

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

Also available in: Atom PDF