2018-06-19 00:44 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000190Cheat Enginepublic2012-12-14 13:24
Assigned ToDark Byte 
Summary0000190: speedhack crash game.
Descriptionthe modern technique speedhack seem better than preview one, but sometime it crash the game, i do not know why, but it seem the problem sit in each time you call InitializeSpeedhack function. on my machine it always crash when change speed and play some minutes in the game "FarCry3" and "BorderLands 2". Here is examples:
set speed for 0.1 and play the game for 1 hour, so the game time is 60/10=6 minutes. at the 1 hour 1 sec i set speed to 1. then the function get game time will return "1 hour" instead return "6 minutes". i do not know this make what effect in the game but it simple crash game, i have write another version of speedhack base on your technique and modify it a bit (it worked on farcry3), if you have freetime, please review it.(i have attach source in this topic)
TagsNo tags attached.
Attached Files




ablonevn (reporter)

Last edited: 2012-12-08 09:44

the same issue if set speed to 2 and then play 1 hour then speed speed to 1, it will cause negative time, this may make the game crash too


Dark Byte (developer)

Last edited: 2012-12-08 12:47

what you describe is as if you're unticking the speedhack checkbox and then enable it again. (If you do that, don't. Edit: Actually, even with that I can't reproduce this. Do you use the forced injection plugin ? It doesn't handle duplicate dllinjects )

I've tried speed 2.0 for 30 minutes and after setting speed back to 1.0 (not unticking the speedhack) it didn't go negative.
I'll try it again for an hour
Edit: Nope, I really can not reproduce this

Can you tell me what your difference is based on this source:


ablonevn (reporter)

Last edited: 2012-12-10 06:58

uhm, they definite are same, but it must have the diff some where, at the time call to InitializeSpeedhack kernel function already had been repcace. so here is:
procedure InitializeSpeedhack(speed: single); stdcall;
Called by createremotethread
var x: int64;

 // messagebox(0,'called','called',mb_ok);
  initialoffset:=gettickcount; //this is not function call, not found in variable declare, so where does this value come from ?
// assume above is function call, we have a valid value, then following code execute (i copy it from speedhack_version get tick count):

  //time past since activation, mulitplied by speed multiplier
  initialoffset:=trunc((TGetTickCount(realgettickcount)-initialtime)*speedmultiplier)+initialoffset; // note: at the first time the initialtime haven't initialized, so it cause unknown effect




if you want reproduce error, don't set speed to 2, just set speed to 0.1, change it during you play, for your suit, start a new game, and play until you fall from bridge to river, at the cut scene the game restore speed, if the game don't crash, then don't try it any more :D may be it only effect on my slow machine ?


ablonevn (reporter)

the diffrent is initialize function after load dll,DLL_ATTACH_PROCESS event,i'm have correct the value


ablonevn (reporter)

Last edited: 2012-12-13 17:50

Here i'm found a game will always crash when change speed.
Step to reprocedure require the game "dishonored"
1/ set hotkey "1" to change speed to 0.1
2/ set hotkey "2" to change speed to 1
3/ at the startup (others screen working too) continue press "1",then "2" ,"1","2" until the game crash. it will show up speedhack_crash1.png, after press "close" button it will show up screen speedhack_crash2.png.

Reason: i think the game have multi-thread call to gettickcount to handle animation in game, and we have a bad lucky when changing speed while other thread are continuing call gettickcount and queryperformancecounter.

temporary, i think the solution is write an emulate thread "locking", is will suspend any thread call to speedhack_gettickcount and speedhack_queryperformancecounter by make these functions falling into the infinite loop and wait until InitializeSpeedHack done it task. i also rewrite the source by implement wraper for "speedhack_gettickcount" and speedhack_queryperformancecounter by calling "lockspeed" and "unlockspeed" function, it's pleasure if it can help you improve CE.


Dark Byte (developer)

Last edited: 2012-12-13 18:00

thanks, it could be a multithreading issue yes, I'll check it out.
confirmed, it's reproducible with a threading test. I'll do some tests


Dark Byte (developer)

fixed in the svn

-Issue History
Date Modified Username Field Change
2012-12-08 09:33 ablonevn New Issue
2012-12-08 09:33 ablonevn File Added: speedhack-i386.asm
2012-12-08 09:33 ablonevn File Added: speedhack-i386.def
2012-12-08 09:43 ablonevn Note Added: 0000383
2012-12-08 09:44 ablonevn Note Edited: 0000383
2012-12-08 11:13 Dark Byte Status new => acknowledged
2012-12-08 11:45 Dark Byte Note Added: 0000384
2012-12-08 11:46 Dark Byte Note Edited: 0000384
2012-12-08 11:47 Dark Byte Note Edited: 0000384
2012-12-08 11:47 Dark Byte Note Edited: 0000384
2012-12-08 11:52 Dark Byte Note Edited: 0000384
2012-12-08 11:53 Dark Byte Note Edited: 0000384
2012-12-08 12:44 Dark Byte Note Edited: 0000384
2012-12-08 12:47 Dark Byte Note Edited: 0000384
2012-12-10 06:54 ablonevn Note Added: 0000385
2012-12-10 06:56 ablonevn Note Edited: 0000385
2012-12-10 06:58 ablonevn Note Edited: 0000385
2012-12-10 06:59 ablonevn Note Added: 0000386
2012-12-13 17:34 ablonevn Note Added: 0000387
2012-12-13 17:34 ablonevn File Added: speedhack_crash1.png
2012-12-13 17:35 ablonevn File Added: speedhack_crash2.png
2012-12-13 17:35 ablonevn File Added: speedhack.rar
2012-12-13 17:49 Dark Byte Note Added: 0000388
2012-12-13 17:50 ablonevn Note Edited: 0000387
2012-12-13 18:00 Dark Byte Note Edited: 0000388
2012-12-14 13:24 Dark Byte Note Added: 0000389
2012-12-14 13:24 Dark Byte Status acknowledged => resolved
2012-12-14 13:24 Dark Byte Resolution open => fixed
2012-12-14 13:24 Dark Byte Assigned To => Dark Byte
+Issue History