erdelf / AlienRaces

Rimworld mod alien race framework
MIT License
103 stars 69 forks source link

Exception On AlienRace Pawn Create, Using AlienRace Dev Version on steam. 1.5 and Anomaly DLC enabled. #107

Open EoralMilk opened 4 months ago

EoralMilk commented 4 months ago

Does not crash every time, it seems that the hairstyle did not successfully read?

Exception when initializing node Head for pawn 希尔达: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object [Ref 6B9F7A9C] at Verse.HumanlikeMeshPoolUtility.GetHumanlikeHairSetForPawn (Verse.Pawn pawn, System.Single wFactor, System.Single hFactor) [0x0002e] in <9f0455800725468190a2ddad977330df>:0

EoralMilk commented 4 months ago

For the record, it doesn't happen every time. I generated a dozen pawns before I met this one.

EoralMilk commented 4 months ago

Also, before 1.5 was released. I never encountered this problem in beta testing yesterday.

EoralMilk commented 4 months ago

After testing, the official version of AlienRace's on steam also has this problem.

EoralMilk commented 4 months ago

This is the styleSettings of my alienrace mod

<styleSettings>
    <li>
        <key>HairDef</key>
        <value>
            <hasStyle>true</hasStyle>
            <!-- <styleTagsOverride>
                            <li>Kurin</li>
                        </styleTagsOverride> -->
            <bannedTags>
                <li>Punk</li>
                <li>Tribal</li>
                <li>Minimal</li>
            </bannedTags>
        </value>
    </li>
    <li>
        <key>TattooDef</key>
        <value>
            <hasStyle>true</hasStyle>
            <styleTagsOverride>
                <li>TattooKurin</li>
                <li>NoTattoo</li>
            </styleTagsOverride>
        </value>
    </li>
    <li>
        <key>BeardDef</key>
        <value>
            <hasStyle>false</hasStyle>
        </value>
    </li>
</styleSettings>
EoralMilk commented 4 months ago

My mod list

<?xml version="1.0" encoding="utf-8"?>
<savedModList>
    <meta>
        <gameVersion>1.5.4062 rev838</gameVersion>
        <modIds>
            <li>brrainz.harmony</li>
            <li>ludeon.rimworld</li>
            <li>ludeon.rimworld.royalty</li>
            <li>ludeon.rimworld.ideology</li>
            <li>ludeon.rimworld.biotech</li>
            <li>ludeon.rimworld.anomaly</li>
            <li>erdelf.humanoidalienraces</li>
            <li>eoralmilk.faceaddonframework</li>
            <li>eoralmilk.kurinmeowedition</li>
            <li>brrainz.cameraplus</li>
            <li>petetimessix.compacthediffs</li>
            <li>cat2002.showhair</li>
            <li>jaxe.rimhud</li>
            <li>shouer.chinesepack.rimhud</li>
            <li>oskarpotocki.vanillafactionsexpanded.core</li>
            <li>vanillaexpanded.vwe</li>
        </modIds>
        <modSteamIds>
            <li>0</li>
            <li>0</li>
            <li>1149640</li>
            <li>1392840</li>
            <li>1826140</li>
            <li>0</li>
            <li>0</li>
            <li>0</li>
            <li>0</li>
            <li>867467808</li>
            <li>0</li>
            <li>0</li>
            <li>0</li>
            <li>0</li>
            <li>0</li>
            <li>0</li>
        </modSteamIds>
        <modNames>
            <li>Harmony</li>
            <li>Core</li>
            <li>Royalty</li>
            <li>Ideology</li>
            <li>Biotech</li>
            <li>Anomaly</li>
            <li>Humanoid Alien Races</li>
            <li>Face Addon Framework</li>
            <li>Kurin Meow Edition</li>
            <li>Camera+</li>
            <li>Compact Hediffs</li>
            <li>[CAT] Show Hair With Hats or Hide All Hats</li>
            <li>RimHUD</li>
            <li>RimHUD_zh</li>
            <li>Vanilla Expanded Framework</li>
            <li>Vanilla Weapons Expanded</li>
        </modNames>
    </meta>
    <modList>
        <ids>
            <li>brrainz.harmony</li>
            <li>ludeon.rimworld</li>
            <li>ludeon.rimworld.royalty</li>
            <li>ludeon.rimworld.ideology</li>
            <li>ludeon.rimworld.biotech</li>
            <li>ludeon.rimworld.anomaly</li>
            <li>erdelf.humanoidalienraces</li>
            <li>eoralmilk.faceaddonframework</li>
            <li>eoralmilk.kurinmeowedition</li>
            <li>brrainz.cameraplus</li>
            <li>petetimessix.compacthediffs</li>
            <li>cat2002.showhair</li>
            <li>jaxe.rimhud</li>
            <li>shouer.chinesepack.rimhud</li>
            <li>oskarpotocki.vanillafactionsexpanded.core</li>
            <li>vanillaexpanded.vwe</li>
        </ids>
        <names>
            <li>Harmony</li>
            <li>核心</li>
            <li>皇权</li>
            <li>文化</li>
            <li>生物技术</li>
            <li>异象</li>
            <li>Humanoid Alien Races</li>
            <li>Face Addon Framework</li>
            <li>Kurin Meow Edition</li>
            <li>Camera+</li>
            <li>Compact Hediffs</li>
            <li>[CAT] Show Hair With Hats or Hide All Hats</li>
            <li>RimHUD</li>
            <li>RimHUD_zh</li>
            <li>Vanilla Expanded Framework</li>
            <li>Vanilla Weapons Expanded</li>
        </names>
    </modList>
</savedModList>
EoralMilk commented 4 months ago

I also tested removing the faceAddonFramework. Test the KurinMeowEdition, which is an xml mod, but it still has this problem. In addition, I did not encounter this problem yesterday, so it is almost certain that it was caused by the last update of AlienRace.

erdelf commented 4 months ago

While an interesting writeup, your error is in a vanilla method that I don't touch. There's not too much I do in there.

I can only guess an invalid head type, or a broken life stage.

EoralMilk commented 4 months ago

This is my headtype def

    <HeadTypeDef ParentName="AverageBase" Name="KurinHeadtypeBase" Abstract="True">
        <gender>Female</gender>
        <hairMeshSize>(1.5, 1.5)</hairMeshSize>
        <beardMeshSize>(1.5, 1.5)</beardMeshSize>
    </HeadTypeDef>
    <HeadTypeDef ParentName="KurinHeadtypeBase">
        <defName>KurinHeadA</defName>
        <graphicPath>KurinMeowEdition/Heads/Average_Normal</graphicPath>
    </HeadTypeDef>
EoralMilk commented 4 months ago

I seem to have found the problem, very occasionally it generates a male Pawn, resulting in this problem, but I have set

<maleGenderProbability>0</maleGenderProbability>

why will it generate a male?