Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

leecher1337

14
Posts
1
Topics
A member registered Jul 22, 2018

Recent community posts

I now tried it with 3GB usermode address space, and now was able to play it through. Wow, what a great game, thank you! :-)

It took approx 2.3GB of memory during playing, so we definitely hit the 2GB barrier. Nevertheless fixing missing null-pointer checks couldn't hurt, maybe file a bug report to Unity developers, now that the issue is nailed down to a function.

Just a little note. I found debug symbols for Unity3D and therefore was able to find out that it crashes in  crnd::crn_unpacker::unpack_dxt5

Fortunately, this code seems to be available on the net:
https://github.com/toji/webgl-texture-utils/blob/master/crunch/crn_decomp.h

bool unpack_dxt5(uint8** pDst, uint32 dst_size_in_bytes, uint32 row_pitch_in_bytes, uint32 blocks_x, uint32 blocks_y, uint32 chunks_x, uint32 chunks_y);

So pDst is an array of pointers that gets filled by the unpacker, some of them being possibly NULL because allocation failed, as you suspected. 
In line 

uint8* CRND_RESTRICT pRow = pDst[f];

there needs to be a check:
if (!pRow) return false;
to fix the crash. I can add it in assembly code, maybe the game then will at least shut down properly.

I will try the method to expand memory in the evening, nevertheless the memory management of the application should be able to trim the cache automatically in order to not hit the 2GB barrier imho. So I'm looking forward to the new version which supports reduced cache size.

The crashes always occur in BatchDeleteObjects call and always at the same location:

55BC8C8A | je unityplayer.55BC8CE0                 |
55BC8C8C | lea ecx,dword ptr ds:[eax+eax*2]        |
55BC8C8F | mov eax,dword ptr ds:[esi+11C]          |
55BC8C95 | lea edx,dword ptr ds:[eax+ecx*2]        |
55BC8C98 | mov eax,dword ptr ds:[esi+10C]          |
55BC8C9E | movzx ecx,word ptr ds:[eax+edi*2]       |
55BC8CA2 | movzx eax,word ptr ds:[edx]             |
55BC8CA5 | shl eax,10                              |
55BC8CA8 | or ecx,eax                              |
55BC8CAA | mov eax,dword ptr ss:[ebp-10]           | <-- EAX is NULL here
55BC8CAD | mov dword ptr ds:[eax],ecx              | <-- Bret Hart is right!

So may be related to this Unity bug?

https://forum.unity.com/threads/batchdeleteobjects-crash-unity-5.321080/

Someone suggested to run a manual cleanup routine. Maybe you could try that?

I tried patching it to check for a null pointer and bail out, but then next times it comes with a pointer of 0x1000000, because it probably didn't clean up properly, so this is also pointless.

On my machine, it's enough to turn on highest resolution and Ultra HD Texture quality to immediately trigger it (by i.e. loading my last saved game now or opening a new game and leaving Bernards room). This always crashes it. If you want, I can give you TeamViewer access or remote debugging session to my test machine.

(1 edit)

Hi,

I thought so, as it usually happens with mem usage around 1,7-1,8GB. So I guess you forgot to check return value of some malloc()-Alike functions (VirtualAlloc, HeapAlloc, ..), and so...

;-)

As for the Win7 system, I only booted it an started up the game, so no other applications taking up memory. Pagefile is turned on, so OS should be able to do paging. I once accidentally started ROTT on Windows XP machine twice and there I was in paging hell...

I saw that your executable is large-address-aware:

dumpbin /headers RotT-Win32.exe

....         Application can handle large (>2GB) addresses

                   32 bit word machine


But I don't use the /PAE and /3GB switches in boot.ini (or its equivalent in Win7, if there is something like that), so could that be something to try? I think it was causing some troubles for me or my drivers and also it's not really recommended to be used, so that I didn't enable it. Without PAE and 3GB switch, 2GB per-process limit is still kicking in, even if executable is LAAW. Still wondering what is sucking up so much memory, though... Paging won't help if 2GB barrier gets hit somehow.

To reproduce the error, maybe you can try to use https://github.com/lowleveldesign/process-governor and enforce a tighter memory limit on the process on your machine?

Hi,
Unfortunately still a lot of crashes even at lowest resolution and texture quality:

https://pastebin.com/keH8rjvm
https://pastebin.com/HbqL2zbL
https://pastebin.com/aDm6xdLn
https://pastebin.com/qFy2tRD6

Not really playable for me currently, but looking forward to your bugfixes :)

I wonder why you want a Win7 log, isn't it even harder to analyze than XP with its ASLR? Here it is: https://pastebin.com/umY3psXx

Anyway, reducing texture quality to "HD" helped on both machines, thanks for the hint! Now let's see how far I can get... :-)

This is great, thank you! Now Bernards room gets rendered correctly!
However, as soon as I leave Bernards room, game crashes. It again doesn't seem to be OS related, I also had this crash/hangup in previous version on a Windows 7 Notebook.

https://pastebin.com/6iTLPFT4
https://pastebin.com/Vq9EtVSb

This Win32.Trojan.WisdomEyes false alarm occurs very often, I think it even flagged some of the applications that I wrote too with this false alarm. Seems to be a bad and very generic signature they use, just ignore it...

Maybe the same bug a I have here?

https://itch.io/t/262014/windows-xp-compatibility
Seems to be reated to the graphics card...

I can now hereby confirm that the problems that I encounter are related to the graphics hardware, NOT Windows XP.
I tried to play it with a Nvidia Geforce 8400GS on Windows XP and this one worked flawlessly. 
So I would suggest to incorporate my patch to the release .zip so that XP users can also play the game. Replacing the function call with the older version (InitializeCriticalSection) doesn't do any harm, as no special parameters are used anyway in the InitializeCriticalSectionEx function call.

Don't know if it helps you debugging, but if I attach an opengl tracer to the application, I get the following errors:

InterceptShaderGLSL::UseProgramPre - Invalid ID 42
InterceptShaderGLSL::UseProgramPre - Invalid ID 43
InterceptShaderGLSL::UseProgramPre - Invalid ID 46
InterceptShaderGLSL::UseProgramPre - Invalid ID 56
InterceptShaderGLSL::UseProgramPre - Invalid ID 1

The error of program with ID1 is the one that surfaces when screen goes black in Intro.

glCreateProgram()=1 glBindAttribLocation(1,0,"in_POSITION0")
glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS,062FEADC)
glGetIntegerv(GL_PROGRAM_BINARY_FORMATS,00FAE1D0)
glProgramBinary(1,0x8e21,001C1194,6989)

So there may be hope... Glad to hear, looking forward to your investigations, thanks!

When looking at RotT-Win32.exe I saw that Unity engine has a workaround for checking whether InitializeCriticalSectionEx is present, so I guess, this may be a bug of UnityEngine.dll and the IAT import of this function just "slipped in". I guess it should be reported to UnityEngine vendors as I think it is unintentional.

As for the patch: Check IAT entry at raw file offset 0xF9730A reading "InitializeCriticalSectionEx". Just overwrite the "Ex" part of this string with 0x00 bytes so that it reads "InitializeCriticalSection". As the function takes 3 parameters, not one, you need to patch the 2 PUSH instructions of second and third parameter at raw file offset 0xD4FD91:  6A 01 6A 00
NOP then out by putting 90 90 90 90 in there and you are done. I can upload patched file, if needed or a patcher, if you prefer, but as you see it's very easy to patch.

Hi catmic,

Thank you for your support!
I now patched the UnityPlayer.dll to remove the problem with the InitializeCriticalSectionEx reference. Then I got a new error:
"GLContext: failed to create context: Die angegebene Prozedur wurde nicht gefunden.

Failed to initialize graphics.
Your Windows version seems to be Windows XP, and this
application likely does not support it (it would have to
support OpenGL rendering to work on XP).
InitializeEngineGraphics failed"

I found this article:
https://blogs.unity3d.com/2017/07/10/deprecating-directx-9/

So as my graphics driver was from 2008, I updated it and the game started fine.
However there are still issues, in the Intro, after Bernard ate his sausage,
screen goes black and the rest of the Intro is not visible anymore, also when
trying to play the tutorial, I only see a cursor on black background.



I have a GeForce 9400 GT graphics board. Altough it should be DX10 compatible, I experience these weird issues.
I guess you don't have any ideas regarding these problems, do you?
If compilation settings aren't set as mentioned in the article above, would it help to make a special build with these settings?

Hi,

Any chance to make this game Windows XP compatible? It currently fails with error "InitializeCriticalSectionEx cannot be found in KERNEL32.dll". This function is only available on Vista and upward.