nolmoonen/terrain3

doesn't seem to work anymore

Closed this issue ยท 6 comments

running main.cpp or terrain3.exe opens and immediately closes some window.
the program outputs:
'terrain3.exe' (Win32): Loaded 'C:\Users\zrgru\Documents\cpsc591\Source\out\build\x64-Debug\terrain3.exe'. Symbols loaded.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\wldp.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nvdmi.inf_amd64_51eba4e0afcfd5f4\nvdlistx.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\AppXDeploymentClient.dll'.
'terrain3.exe' (Win32): Unloaded 'C:\Windows\System32\AppXDeploymentClient.dll'
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_51f685305808e3a5\ig9icd64.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_51f685305808e3a5\igdml64.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'.
'terrain3.exe' (Win32): Unloaded 'C:\Windows\System32\version.dll'
'terrain3.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nvdmi.inf_amd64_51eba4e0afcfd5f4\nvdlistx.dll'
The thread 0x4268 has exited with code 0 (0x0).
'terrain3.exe' (Win32): Unloaded 'C:\Windows\System32\ResourcePolicyClient.dll'
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nvdmi.inf_amd64_51eba4e0afcfd5f4\nvdlistx.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_51f685305808e3a5\igdgmm64.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_51f685305808e3a5\igc64.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'.
'terrain3.exe' (Win32): Unloaded 'C:\Windows\System32\version.dll'
'terrain3.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nvdmi.inf_amd64_51eba4e0afcfd5f4\nvdlistx.dll'
The thread 0x3224 has exited with code 0 (0x0).
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'.
The thread 0x2ebc has exited with code 1 (0x1).
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\TextInputFramework.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'.
'terrain3.exe' (Win32): Unloaded 'C:\Windows\System32\WinTypes.dll'
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\XInput1_4.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\InputHost.dll'.
'terrain3.exe' (Win32): Loaded 'C:\Windows\System32\propsys.dll'.
The thread 0x1724 has exited with code 4294967295 (0xffffffff).
The thread 0x34e4 has exited with code 4294967295 (0xffffffff).
The thread 0x27f8 has exited with code 4294967295 (0xffffffff).
The thread 0x2ccc has exited with code 4294967295 (0xffffffff).
The thread 0x40b0 has exited with code 4294967295 (0xffffffff).
The thread 0x2aec has exited with code 4294967295 (0xffffffff).
The thread 0x2f84 has exited with code 4294967295 (0xffffffff).
The thread 0x4368 has exited with code 4294967295 (0xffffffff).
The program '[16152] terrain3.exe' has exited with code 4294967295 (0xffffffff).

Hi, thanks for checking out my project. The issue you describe could be caused by the fact that some resources (textures and shaders) could not be found at their expected paths (which are hardcoded relative to the working directory). I pushed a fix for this to the main branch, please check if this resolves your issue.

Hello, the issue has been fixed, but a new issue came up when I run debug on terrain3.exe.
It immediately gives me a Debug error from Microsoft Visual C++ Runtime Library:
Debug Error!

Program: ...gru\Documents\cpsc591\Source\out\build\x64-Debug\terrain3.exe

HEAP CORRUPTION DETECTED: before Normal block (#594) at 0x0000023ADAFB3A40.
CRT detected that the application wrote to memory before start of heap buffer.

(Press Retry to debug the application)

Clicking retry took me to a breakpoint at line 263 in nmutil\gl.h

Understand that I am looking at this repo hoping to use it as a reference for a school assignment, so don't feel too pressured to fix it if you have other priorities

Unfortunately, it's hard to tell where the problem comes from, and I cannot reproduce it myself. As has become obvious, I've not invested much effort in the error handling of the project. However, if you pipe the output to a file, it should show some info. With Command Prompt it is done like terrain3.exe > out.txt and with PowerShell like .\terrain.exe | Out-File out.txt. Alternatively, you can try putting a breakpoint just before the line where it crashes.

Based on where it crashes, it seems to be that a shader fails to compile. Maybe your GPU or it's driver does not support all features of the shader code, the log should be able to show that.

Were you able to get any output and/or resolve the issue?

no, but mainly because I didn't try very hard, because I didn't really understand the error or the code. But I have found another repository that suits my needs, and I got that one working.

Ah, sorry to hear that but I'm glad you found a different solution. I'll close this issue, feel free to re-open if you've got any other questions.