JurassicParkTrespasser
JurassicParkTrespasser copied to clipboard
Game Crashes on Window Size Misconfiguration
Bug Steps
- Did a fresh Install of Trespasser.
- Grabbed the repo and created a solution via CMAKE. (I had to grab a newer version of CMAKE because the one provided would not run on my system, but I don't think that's related.)
- Ran the game in debug mode and it defaulted to software rendering.
- Switched the driver to hardware rendering
- ****** The driver selection window did not detect possible screen resolutions, the dropdown was empty.
- Relaunch the game and it crashes
- The direct draw call ** below fails because the backbufferddsd height and width are initialized to zero, and this causes a null pointer exception later in the code.
- I resolved by manually editing the width and height in my OpenTrespasser config. I am not sure where to make changes to fix that config, but I figure this is helpful.
Lines 1929 to 1948 in RasterVid.cpp
{
CDDSize<DDSURFACEDESC2> backbufferddsd;
backbufferddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS;
backbufferddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
backbufferddsd.dwWidth = i_width;
backbufferddsd.dwHeight = i_height;
if (force16Bit)
Set16BitPixelFormat(backbufferddsd);
**hres = DirectDraw::pdd4->CreateSurface(&backbufferddsd, &pddsDraw4, NULL);**
if (FAILED(hres))
{
PrintD3D2("Buffer creation failed %x\n", hres);
AlwaysAssert(0);
return false;
}
}
The issue can be reproduced.
So far the video driver settings window has not been given much thought and testing. Choosing a screen resolution does not work either (none are listed). Manually editing the OpenTrespasser.ini
for your desired video settings is recommended at this stage.
Adressed in PR #173.