Forum Announcement, Click Here to Read More From EA_Cade.

@SimGuruModSquad: Need help/info about crashing with cloned hats and hairs

Hello again. :) I'm asking because so far I've had no luck resolving this and think it might be related to the swatch crashing problems encountered by early recolors and resolved by forcing all CC group and instance ID high bits on.

CC clones of hats and hairs are causing crashing in CAS when the user puts them on the sim, or removes them, or sometimes in-game when using them. It's happening mostly in games running on Windows 8.1 (but not all of them) and has also been reported on Vista. It doesn't seem to happen, or possibly very rarely, on Windows 7. And it happens with most or all hats, at least some hairs, and apparently not other CAS parts. (I've gotten a report of crashing with a shirt but of course that could have been some other problem.)

The clones contain copies of all necessary resources as far as I know, with the group and instance ID high bits on, with the exception of the custom swatch: Custom swatches will not work with a group ID of 0x80000000. I have to use 0x00000000. Also, while I've cloned the bumpmap, the diffuse and specular linked from the mesh appear not to be used so I don't clone them or change the links.

I notice this seems to affect parts (hats and hairs) with mesh parts that appear or not depending on what other items the sim is wearing. This is true of pants as well, but bottoms and tops have RegionMaps (oxAC16FBEC) with a fairly straightforward structure of one section per mesh part/sub mesh/mesh group or whatever the correct term is. Hats and hairs are not so easy to understand and have multiple RegionMap links to the same mesh. Could this be related?

Thanks for any help you can give!

Help with the @SimGuruModSquad business would be appreciated! :)
cmarNYC on MTS.

Comments

  • pboxpbox Posts: 630 Member
    Help with the @SimGuruModSquad business =).
    Stuff for TS2 · TS3 · TS4
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Hey there. If you could provide me with mod(s) that exhibit the issue, I can debug it and let you know what the issue is. Can't guarantee how quickly I can do that but will do my best.
  • MyreMylarMyreMylar Posts: 80 Member
    edited September 2014
    As someone who has been experiencing it, I can say that this file, created by @cmarinetti:

    http://chii.modthesims.info/getfile.php?file=1464595

    exhibits the 'hat crash problem'.
  • cmarinetticmarinetti Posts: 147 Member
    Thanks, MyreMylar. That's the latest test version of our favorite cloned hat so as of now it's the best test case I have.
    cmarNYC on MTS.
  • pboxpbox Posts: 630 Member
    edited September 2014
    Also, can we all start to Like cmar's posts very much so that they finally get to be an actual member? Would make a lot of sense for someone who makes tools to be able to ask questions and post links on their own.

    @SimGuruModSquad, test file is ready!
    Stuff for TS2 · TS3 · TS4
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Hey guys, I tried to reproduce this crash today and could not do it on window 7 or window 8.1. If you have another example please post it, thanks.
  • cmarinetticmarinetti Posts: 147 Member
    edited September 2014
    Anubis reported these hairs are causing crashing for some people:

    anubis360. blogspot. com/2014/09/brave-soul-two-children-hairs-converted.html

    (Remove spaces since I'm not allowed to post links.)

    Maybe MyreMylar or others can link other examples.

    The thing is, if neither of your test computers are getting crashes IMO it's unlikely you'll get them with other packages. That's why this is so mysterious and difficult to deal with; it's not ALL Windows 8.1 machines although it happens consistently on the ones it happens on, and we've determined it happens with both admin and standard user accounts.

    Can you try on another 8.1 computer?
    cmarNYC on MTS.
  • MyreMylarMyreMylar Posts: 80 Member
    edited September 2014
    If it helps any the laptop on which custom hats (but so far no other custom things) crash has these specifications:

    Processor: Intel Core i7-4702MQ @ 2.20 Ghz
    OS: Windows 8.1 64 bit

    And the crash happens every time either when toggling between a custom hat and another hat in Create-a-Sim or when first equipping the hat in Create-a-sim. Though if even Maxis has no idea what's causing it then I may just throw my hands up and abandon the idea of custom hats! Thanks hugely for investigating though @SimGuruModSquad really going above and beyond :)

    Here is another crashing hat I just cloned with cmarinetti's tool if that is of any extra use:

    http://www.myrespace.com/sims4/MyreMylar_yuHat_CowboyClone.package
  • Doctor_RuinDoctor_Ruin Posts: 1 New Member
    edited September 2014
    I think I might as well join the discussion. I've had reports of crashes with a hair conversion I did: it's a female to male conversion of the default long pulled back braids and it can be found here: http: // www . mediafire . com / download / 7cf16muwckd9d5a/%5BAstraea+Nevermore%5D+Braided+-+EA+ftm+hair.rar
    (you'll need to remove the spaces for the link to work)

    The hair works with no problem in my game and I've seen screenshots from other people's games where the hair was working as well. And yet, I also had 7-8 people saying they had crashing issues with it. Now, I don't know which OS they have or what their specs are, though it seems that their game crashes as soon as they try to select the hair in CAS.

    As I said, though, the hair works just fine in my game, so I really have no idea where to start looking for a fix D: In case it's needed, I'm on a Windows 7 with an Intel Core i7-3770K @3.50 GHz and an AMD Radeon HD 7700 as video card.
    Post edited by Doctor_Ruin on
  • pboxpbox Posts: 630 Member
    Here is a link to the first testing thread with the first crashing example (also by cmar) and a couple of reports including system version etc:

    http://modthesims.info/showthread.php?t=534519

    I didn't manage to crash myself, so haven't followed this too closely, but as I understood there was no major difference between the behaviour of the test packages.

    Does it make sense to assume that graphic cards / drivers can play a role in this?
    Stuff for TS2 · TS3 · TS4
  • karlalehaduskarlalehadus Posts: 1 New Member
    hi , so i dont know how to start a discussion and stuff so im writing here . englesh is not my native language so sorry iff i make mistakes . so in my sims , i downloaded some stuff from the exchange but it made my sims look like monsters and stuff , i deleted themm now and if i want to start a knew game and add a toddler or a kid it will still look like monsters , beside deleting it i dont know what to do , please help : :(
  • Srikandi715Srikandi715 Posts: 1,753 Member
    edited October 2014
    hi , so i dont know how to start a discussion and stuff so im writing here . englesh is not my native language so sorry iff i make mistakes . so in my sims , i downloaded some stuff from the exchange but it made my sims look like monsters and stuff , i deleted themm now and if i want to start a knew game and add a toddler or a kid it will still look like monsters , beside deleting it i dont know what to do , please help : :(

    The Exchange? Sounds like a Sims 3 (or 2) question. This is the Sims 4 forum. Try posting here: http://forums.thesims.com/en_US/categories/technical-discussions-en

    The New Thread button is in the top right corner of the page :)
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Hi guys,

    Update, I tried to reproduce this crash with the following and could not get it to happen:

    _AstraeaNevermore_LongBraidedHair_male.package
    cmar_yuHat_PartyVelvet7.package
    MyreMylar_yuHat_CowboyClone.package
    MyreMylar_yuHat_TopHat_high.package
    MyreMylar_yuHat_TopHat-low.package

    Since it's not cooperating, another option would be to send me the a crash dump from someone who is experiencing the crash and that might help me to track down the issue. As follows:

    - Reproduce the crash
    - Post the file "lastcrash.txt" from the user data directory (i.e. C:\Users\<user-name>\Documents\Electronic Arts\The Sims 4\lastcrash.txt)

    Thanks.
  • glitzGEROglitzGERO Posts: 12 New Member
    @SimGuruModSquad I downloaded this just to see if I'd get the issue too. So here's a crash log. (Sorry please erase spaces.)
    https ://www .dropbox. com/s/tpl3z8q28w1vds5/lastCrash.txt?dl=0
  • pboxpbox Posts: 630 Member
    @SimGuruModSquad tagging asistance.
    Stuff for TS2 · TS3 · TS4
  • cmarinetticmarinetti Posts: 147 Member
    In case this additional information is useful since you're pursuing this:

    We found that the crashing occurs mostly, maybe only, on computers using Intel HD integrated graphics.

    And we found it's caused by certain bone assignments in cloned meshes. Using lod0 of the PartyVelvet hat as an example, it's the last two vertices of the mesh.

    When I cloned the hat my software wrote the empty bone assignments like this, the same as every other vertex in the mesh:

    Vertex Index: 0x1DC
    Position: X: -0.1335; Y: 1.8194; Z: 0.1930
    Normal: X: -0.4840; Y: -0.7192; Z: 0.4985
    UV: U: 0.5447; V: 0.2346
    UV: U: -0.4515; V: 0.0373
    Color: Color [A=1, R=0, G=0, B=0]
    BoneAssignments: 00, 01, 01, 01
    BoneWeights: W1: 0xFF; W2: 0x00; W3: 0x00; W4: 0x00
    TangentNormal: X: 0.6102; Y: 0.6328; Z: 0.4767
    Vertex Index: 0x1DD
    Position: X: -0.1335; Y: 1.8194; Z: 0.1930
    Normal: X: -0.4840; Y: -0.7192; Z: 0.4985
    UV: U: 0.8973; V: 0.2357
    UV: U: -0.4515; V: 0.0373
    Color: Color [A=1, R=0, G=0, B=0]
    BoneAssignments: 00, 01, 01, 01
    BoneWeights: W1: 0xFF; W2: 0x00; W3: 0x00; W4: 0x00
    TangentNormal: X: -0.9818; Y: 0.1874; Z: -0.0316

    This mesh caused crashing on some systems as described above.

    When I cloned the mesh keeping the same EXACT bone assignments for empty weights as the original game mesh:

    Vertex Index: 0x1DC
    Position: X: -0.1335; Y: 1.8194; Z: 0.1930
    Normal: X: -0.4840; Y: -0.7192; Z: 0.4985
    UV: U: 0.5447; V: 0.2346
    UV: U: -0.4515; V: 0.0373
    Color: Color [A=1, R=0, G=0, B=0]
    BoneAssignments: 00, 02, 01, 01
    BoneWeights: W1: 0xFF; W2: 0x00; W3: 0x00; W4: 0x00
    TangentNormal: X: 0.6102; Y: 0.6328; Z: 0.4767
    Vertex Index: 0x1DD
    Position: X: -0.1335; Y: 1.8194; Z: 0.1930
    Normal: X: -0.4840; Y: -0.7192; Z: 0.4985
    UV: U: 0.8973; V: 0.2357
    UV: U: -0.4515; V: 0.0373
    Color: Color [A=1, R=0, G=0, B=0]
    BoneAssignments: 00, 02, 01, 01
    Weights: W1: 0xFF; W2: 0x00; W3: 0x00; W4: 0x00
    TangentNormal: X: -0.9818; Y: 0.1874; Z: -0.0316

    Then the cloned hat did NOT cause crashing. The only difference I could find in the meshes with bit comparison software was that one bone assignment with a zero weight in these two vertices. Why assignments for zero weights would make a difference in the first place and why for only a couple of vertices is beyond me, and in this case it was a perfectly valid bone index either way.

    @SimGuruModSquad, your attention to this is very appreciated!
    cmarNYC on MTS.
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Hey guys,

    Thanks for the callstack, with that information I have been able to reproduce this crash.

    The problem is with the skinning code. Basically the code is computing how many matrices it needs to store by looking at the number of unique bone indices that are being referenced and that computation for the affected assets is coming out incorrect and resulting in a bad memory write. The working version of the asset has a reference to bone index 2, and that is ensuring there is enough space and avoids this memory corruption.

    I suspect this is a legitimate bug in our code and not necessary a problem with the assets other than it happens to trigger a latent bug in the code. So we are investigating on our end, I will keep you posted.

    As for why it only happens on certain machines: It only happens when software skinning is enabled, which only is enabled on Intel cards. You cannot switch to software skinning via the options. But for tool makers wanting to reproduce the crash you can go to the file GraphicsRules.sgr (next to the EXE) and set this line (~line 86):

    setProp $ConfigGroup EnableSoftwareSkinning false

    to

    setProp $ConfigGroup EnableSoftwareSkinning true

    Of course you will want to undo this change once done reproducing the crash. Note that you can always "Repair Game" in Origin if to get any modified files in the install directory back to their correct state. You should only make this change to debug this issue, otherwise you will experience reduced performance.

  • cmarinetticmarinetti Posts: 147 Member
    Interesting! Do you know if a patch will address this issue at some time? Either way, I now have a decent idea of how to adjust bone assignments when cloning or converting meshes, and this may also explain why some meshes cause crashing if unused bones are removed from the bone hash list. And thanks so much for giving us a way to test! :smiley:
    cmarNYC on MTS.
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    We need to investigate the issue further before I can say if it will be fixed in a patch. If it is a legitimate latent bug in the code, it will be fixed in a patch. If not, I will see if I can give you more info on how to construct your data to not trigger the crash.
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Hello! This issue should be fixed in today's update, v. 1.2.24.20. SimGuruGnome even deemed it worthy of adding to the patch notes:
    We fixed a crash reported on the modding forums where custom content clones of hats and hairs could cause a crash on Intel graphics cards due to an issue with the skinning code.
  • cmarinetticmarinetti Posts: 147 Member
    Thanks very much!
    cmarNYC on MTS.
Sign In or Register to comment.
Return to top