DurtyFree / durty-cloth-tool

Durty Cloth Tool easily generates addon cloth resources for GTA 5 Singleplayer and MP mods like alt:V, FiveM or RageMP with just a couple of clicks.
https://gta.clothing
111 stars 56 forks source link

RAGE error: ERR_MEM_MULTIALLOC_FREE: Hoodie hair/Remove Hairs/Cut Hairs feature causing client crashing #294

Open LemonzPCMR opened 2 weeks ago

LemonzPCMR commented 2 weeks ago

So I converted my 4 packs and made a few minor changes for a hotfix. I then built my packs and a few items that have not been touched are now causing clients to crash. One of these items is a base game hoodie with custom textures that has hoodie hair turned on. If you need more info and testing I can rebuild these packs, just let me know if you can pin point the issue with this information.

DurtyFree commented 2 weeks ago

Hi @LemonzPCMR thank you for reporting this, I have been investigating this issue deeper yesterday and here is what I know so far. The crash (memory alloc) seems to happen when any cloth is applied to a ped that reaches a given total variations limit. Like when you put on a base game mask that has in total defined more than 160 variations it will crash the game. This is unfortunately a GTA limit. I have already had contact with FiveM and alt:V, of which it seems like alt:V will patch this but FiveM won't (as of now).

This issue happens since with latest update DCT properly understands and generates pedalternatevariations.meta, so basically to make things like the hoodie hairs or remove hairs option work we have some magic in place that generates all the correct variations entries for all cloth (including R* relevant clothes), this causes the limit to be hit on any bigger cloth resource.

As of now the only solution besides patching it in GTA is disabling some of the magic happening here so we loose some features but will atleast not crash the game.

I'll update this issue with more information as we go

DurtyFree commented 2 weeks ago

For reference; I have created an issue over at the FiveM repo to hopefully get this fixed https://github.com/citizenfx/fivem/issues/2760 (I also go more into detail there for those interested)

If you are experiencing this issue I highly suggest submitting additional crash reports to the FiveM issue I have linked above, thank you.

DurtyFree commented 1 week ago

Just a quick update on this, alt:V will introduce a patch to increase the related limits causing this crash. FiveM also seems to deliver an patch increasing the limits within the next month.

Until then I recommend deleting the pedalternatevariations meta file when issues occur. See pinned message on our Discord for more information

image

DurtyFree commented 1 week ago

DCT v3 Patch .7 introduces an option "Disable extra alternate variations" which will help in most cases where the given crash happens, to the price of some features not properly working.