namazso / nSkinz

Skin changer for CS:GO
MIT License
219 stars 116 forks source link

Game crashes if nSkinz is loaded before main menu #47

Open peku33 opened 6 years ago

peku33 commented 6 years ago

nSkinz causes game crash on "Insert" click if loaded to early. This is most likely caused by some module handles dereferenced too soon (race condition between game initialization and nskinz).

To reproduce:

namazso commented 6 years ago

This is a known issue however i have no idea how to fix this. The item schema is lazy initialized so its not as simple as waiting for all modules to load

peku33 commented 6 years ago

Defer loading kits to first "Insert" key hit? Which line exactly causes this error?

wthueb commented 6 years ago

happens with a lot of internals. you have to wait for all of the modules you need to be loaded first On Mon, Apr 9, 2018 at 1:02 PM Paweł Kubrak notifications@github.com wrote:

Defer loading kits to first "Insert" key hit? Which line exactly causes this error?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/namazso/nSkinz/issues/47#issuecomment-379822882, or mute the thread https://github.com/notifications/unsubscribe-auth/AWFvKYmGEKn-M0vEIRr-HstWUGr4zb-Oks5tm5Q9gaJpZM4TMgcj .

anarh1st47 commented 6 years ago

There is solution from MarkHC, do u like it, @namazso? https://github.com/anarh1st47/CSGOSimple/blob/master/CSGOSimple/helpers/utils.cpp#L131-L180 It works perfectly for me

namazso commented 6 years ago

Read my first reply. Item schema is initialized when the new schema gets networked from gc. Only less shit solution would be lazy initializing our dumper / copy, probably delaying it to opening the menu

namazso commented 6 years ago

Whoops, accidental close. Anyways, working for you may be a coincidence, meaning the schema was retrieved faster than the module loads finished. They are async, can happen in any order afaik