What causes the skill point crash, and how can I fix it?

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
pinumbernumber
Mole Person
Posts: 4
Joined: Tue Mar 17, 2015 9:32 pm

What causes the skill point crash, and how can I fix it?

Post by pinumbernumber »

As I discovered trying to abuse the catwalk door in Brooklyn, it seems that ever acquiring more than a certain number of skill points results in the game crashing when you save/transition map/complete a goal. (Also mentioned here, ctrl-f "concerto").

I can't for the life of me figure out what causes this, though. I thought it might be overflow, but DeusExPlayer's SkillPointsTotal is just a regular signed int, and the amounts involved are nowhere near 2^31. I don't see anything fishy in the serialisation code, either.

Help?
ggrotz
X-51
Posts: 780
Joined: Tue Nov 10, 2009 12:55 am

Re: What causes the skill point crash, and how can I fix it?

Post by ggrotz »

pinumbernumber wrote: I can't for the life of me figure out what causes this, though. I thought it might be overflow, but DeusExPlayer's SkillPointsTotal is just a regular signed int, and the amounts involved are nowhere near 2^31. I don't see anything fishy in the serialisation code, either.
non 64-bit aware software will always have an unsigned integer type which represents 2^16 - 1 , as a 32-bit integer is an extended type. Of course, 2^16 - 1 is 65535, to consider it as a signed integer, it's 32767. You won't fix it unless the whole Unreal engine is recompiled/rewritten to a newer 64-bit aware environment.
pinumbernumber
Mole Person
Posts: 4
Joined: Tue Mar 17, 2015 9:32 pm

Re: What causes the skill point crash, and how can I fix it?

Post by pinumbernumber »

ggrotz wrote:non 64-bit aware software will always have an unsigned integer type which represents 2^16 - 1 , as a 32-bit integer is an extended type. Of course, 2^16 - 1 is 65535, to consider it as a signed integer, it's 32767. You won't fix it unless the whole Unreal engine is recompiled/rewritten to a newer 64-bit aware environment.
Thanks for the reply but I don't think this is correct. First, I've did plenty of Win32 coding, and sizeof(int) with any C compiler is definitely 32-bit. They'd have to have specifically used a "short" type on the native side if they wanted to store 16-bit. I also looked up the UnrealScript reference on beyondunreal/ut99 and it also states that "int" is signed 32-bit.

Second, there's already a line in the AllSkillPoints() function that sets it to > 2^16:

Code: Select all

SkillPointsTotal = 115900;
I'm not sure what that code is used for or whether it triggers the same bug, but it does show that the variable is definitely not 16-bit.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: What causes the skill point crash, and how can I fix it?

Post by Hanfling »

UnrealScript int type is signed 32 bit int. so it goes up to 2^31-1. Also 64bit ints are used at quite a few places in UE C++ code.
Can you post the crash log?
Can you explain further what you mean by abusing the catwalk door? e.g. step by step instructions how to reproduce the bug.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
pinumbernumber
Mole Person
Posts: 4
Joined: Tue Mar 17, 2015 9:32 pm

Re: What causes the skill point crash, and how can I fix it?

Post by pinumbernumber »

Hanfling wrote: Can you post the crash log?
I'm afraid not- first, it takes a while to reproduce it, and I don't have a save before it. Second, it doesn't properly crash- it just freezes forever on the "saving" screen.

Interestingly, I just tried the "allskills" cheat, and it didn't seem to trigger the problem in my quick testing.
Can you explain further what you mean by abusing the catwalk door? e.g. step by step instructions how to reproduce the bug.
* Be in the opening areas of Brooklyn Naval Shipyards
* Observe that there is a catwalk linking a warehouse to a bot storage building, and that at the latter side of this walk, there is a locked iron door
* Acquire the key to this door (from the offices in the warehouse)
* Unlock and open the door
* Observe that, as it fully opens, you receive 30 skill points
* Close the door (not fully, necessarily- you can block it so it can only start closing slightly)
* Open it again, observe that you again receive 30 points
* Observe that, by blocking the door to prevent it from closing more than an inch and rapidly spamming interact, you can acquire an obscene number of points
* Do so, then attempt to save the game
* Observe that it crashes

There's a video of the exploit (but not the crashing) here: https://www.youtube.com/watch?v=39vcZ7oDBY0 and I think there are a few other places in the game where you can get infinite points with some patience.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: What causes the skill point crash, and how can I fix it?

Post by Hanfling »

Well one can simply open the map, no need for a savegame next to it. However try letting it run for a couple of minutes and see if sth. happens. Also maybe playing in window mode and having the log window aside and see what is printed besides it. You should probably comment out all suppress lines in ini file.

/edit:
How many times or up to which skill amount did you do this?
Doesn't crash for me, but i guess i'm not patient enough for sth. like this.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
pinumbernumber
Mole Person
Posts: 4
Joined: Tue Mar 17, 2015 9:32 pm

Re: What causes the skill point crash, and how can I fix it?

Post by pinumbernumber »

Hanfling wrote:Well one can simply open the map, no need for a savegame next to it.
Indeed, got it now
However try letting it run for a couple of minutes and see if sth. happens.
You mean when it seems to have frozen? Or after acquiring the points and before saving?
Also maybe playing in window mode and having the log window aside and see what is printed besides it.
I'll be honest, I'm new to debugging DX and I'm not sure what log you're referring to or how to access it.
/edit:
How many times or up to which skill amount did you do this?
Doesn't crash for me, but i guess i'm not patient enough for sth. like this.
yeah I just set it up to autofire and held it down for minutes, getting tens of thousands of points, spent them, and saved. It's hard to pin down the threshold.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: What causes the skill point crash, and how can I fix it?

Post by Hanfling »

pinumbernumber wrote:You mean when it seems to have frozen? Or after acquiring the points and before saving?
When it appears to be frozen.
I'll be honest, I'm new to debugging DX and I'm not sure what log you're referring to or how to access it.
Either -log option appended when starting or if you enter showlog in the console.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Post Reply