rigs-of-rods icon indicating copy to clipboard operation
rigs-of-rods copied to clipboard

Crash when loading grass with DDS textures

Open CuriousMike56 opened this issue 5 years ago • 7 comments

Any terrain with grass which uses a DDS texture (e.g. Wild West, Greece) throws this error, causing the game to crash:

14:04:35: Texture 'LJGreeceOA.dds': Loading 1 faces(PF_DXT1,1024x1024x1) with 10 custom mipmaps from Image. Internal format is PF_DXT1,1024x1024x1.
14:04:35: Ogre::RenderingAPIException::RenderingAPIException: D3DXLoadSurfaceFromSurface failed in D3D9HardwarePixelBuffer::blitToMemory at c:\conan\.conan\data\ogre\1.11.6\anotherfoxguy\stable\build\2d13f0c58bafe8a9fae74369aea9c086e652e9f3\rendersystems\direct3d9\src\ogred3d9hardwarepixelbuffer.cpp (line 828)
14:04:35: error loading grass!

Terrains that use PNG textures for the grass (e.g. Auriga Proving Grounds) works without issue.

CuriousMike56 avatar Jun 25 '19 18:06 CuriousMike56

it happens with opengl also?

tritonas00 avatar Jun 25 '19 18:06 tritonas00

@tritonas00 The terrain shader fails to compile for me on OpenGL, so can't test with that.

CuriousMike56 avatar Jun 25 '19 20:06 CuriousMike56

grass on those maps loads fine here (linux/opengl), so something bad with directx or your vga driver?

tritonas00 avatar Jun 25 '19 20:06 tritonas00

After further investigation it appears to only happen with DDS textures. I loaded Auriga Proving Grounds without issue, so I checked the zip and found it uses PNG textures. I converted Wild West's grass texture to PNG (RockCrawlHeavenGrassColor.dds -> RockCrawlHeavenGrassColor.png) and now the grass loads fine. I'll update the issue with this info.

CuriousMike56 avatar Jun 25 '19 21:06 CuriousMike56

@paroj any idea about this one?

tritonas00 avatar Jul 18 '19 13:07 tritonas00

maybe this https://github.com/OGRECave/ogre/commit/d9f588d031396a84618f51af3465aaebda2e4150? Although has been there for a while already..

paroj avatar Jul 18 '19 21:07 paroj

Turns out this crash is caused by Allow DirectX9Ex=Yes in ogre.cfg. Setting to No prevents this.

CuriousMike56 avatar Dec 08 '22 05:12 CuriousMike56