raveloda / Coatl-Aerospace

KSP Mod Repository
26 stars 22 forks source link

Juno mag/solar and Huygens probe core fail to compile #64

Closed Kerbas-ad-astra closed 6 years ago

Kerbas-ad-astra commented 6 years ago

I was driving myself crazy trying to find the new Draco core, but finally found why I was failing when I looked at the log (and found that the Juno magnetometer solar panel had the same issue):

PartLoader: Compiling Part 'Coatl Aerospace/ProbesPlus/Parts/Electrical/sp_juno_mag/sp_juno_mag'

PartLoader: Encountered exception during compilation. System.NullReferenceException: Object reference not set to an instance of an object
  at PartLoader.ReplaceTextures (UnityEngine.GameObject model, System.Collections.Generic.List`1 textureNames, System.Collections.Generic.List`1 newTextures) [0x00000] in <filename unknown>:0 
  at PartLoader.CompileModel (.UrlConfig cfg, .ConfigNode partCfg, Single scaleFactor, .AvailablePart partInfo) [0x00000] in <filename unknown>:0 
  at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0 
  at PartLoader+<CompileParts>c__Iterator66.MoveNext () [0x00000] in <filename unknown>:0 

PartCompiler: Cannot compile part

[...]

PartLoader: Compiling Part 'Coatl Aerospace/ProbesPlus/Parts/Meridiani/_Draco/ca_draco'

PartLoader: Encountered exception during compilation. System.NullReferenceException: Object reference not set to an instance of an object
  at PartLoader.ReplaceTextures (UnityEngine.GameObject model, System.Collections.Generic.List`1 textureNames, System.Collections.Generic.List`1 newTextures) [0x00000] in <filename unknown>:0 
  at PartLoader.CompileModel (.UrlConfig cfg, .ConfigNode partCfg, Single scaleFactor, .AvailablePart partInfo) [0x00000] in <filename unknown>:0 
  at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0 
  at PartLoader+<CompileParts>c__Iterator66.MoveNext () [0x00000] in <filename unknown>:0 

PartCompiler: Cannot compile part

Nothing in the config files strike me as being obviously malformed, and unfortunately I don't have any background in KSP part modeling, so this is all I've got.

PhineasFreak commented 6 years ago

Removing the texture path references from the MODEL nodes of both parts allows them to compile correctly (the Juno SAW it is only missing the mag foil texture and Huygens appears nominal).

Other parts from the same family (standard Juno SAW, Huygens parachutes) use the same textures and loading process, so there is something peculiar about the models of these two parts.

raveloda commented 6 years ago

Off top of my head, both of those use multi-textures and need those references to work correctly. I did make some changes to Huygens last minute which probably could allow the removal of it. I didn't have a chance to test.

The reason for the models doing this is to allow both multiple specular settings (which need different materials) and on some crafts it allows texture switching targetting.

I have a hard time testing because I cannot replicate the problem. It just does not happen on my computer, even with multiple mod setups. I can't find anything wrong with those texture path references :(

raveloda commented 6 years ago

Removed texture referencing on those parts. No more compilation errors that I could see