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.
8
Comments
http://chii.modthesims.info/getfile.php?file=1464595
exhibits the 'hat crash problem'.
@SimGuruModSquad, test file is ready!
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?
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
(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.
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?
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
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.
https ://www .dropbox. com/s/tpl3z8q28w1vds5/lastCrash.txt?dl=0
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!
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.