Page 1 of 1
Thief 2 affinity crashing
Posted: Fri Mar 28, 2014 5:21 pm
by randoll
Thief 2 crashes if it has more than 1 CPU assigned. Does anybody know why is it happening? How to write windows application which will crash at multicore affinity?
Re: Thief 2 affinity crashing
Posted: Fri Mar 28, 2014 6:52 pm
by Bender
Yeah, I gues there are some complexities involved with rendering graphics on a multicore CPU, which the older games didn't take into consideration.
I was in the same situation a few days ago, couldn't play Scarface. There is a dirty trick, you disable the initialize other cores on startup in msconfig.
I wouldn't recommend touching msconfig, I did something wrong and screwed my whole Windows Installation.
Re: Thief 2 affinity crashing
Posted: Sat Mar 29, 2014 8:58 am
by Nable
randoll wrote: How to write windows application which will crash at multicore affinity?
I don't know about this exact application but there are some typical cases that one should keep in mind to avoid crashing on multicore configuration.
One of my typical examples: using RDTSC directly instead of doing system/library calls. TSC counter is often non-synchronized between different cores (even when they're inside one CPU) and it cannot be synchronized between separate CPUs. So when you start measurement on some core and then scheduler moves you to another one - it's possible to get negative or even zero result of (time_end - time_start). This can break some calculations and lead to exceptions.
Another common option: usage of non-reentrant/thread unsafe libraries (especially if authors tried to add some parallel computation support but didn't verify/test it enough).
Bender wrote:There is a dirty trick, you disable the initialize other cores on startup in msconfig.
Oh, why would anyone ( who knows about `CPU affinity' ) try such a dirty trick instead of looking for a way to tell OS (AFAIR, Linux and Windows include such support) about required affinity at process start time? Yes, this way looks easier but it brings possibility of breaking your OS installation, and reinstallation is often a hard process (especially when you have done a lot of customizations but don't have space for backups).